This commit increases the size of the scsi debug device to 300MiB to
accommodate a 275MiB sized XFS filesystem with 64k block size. mkfs.xfs
fails to create a 64k block sized filesystem on devices with capacity
less than 275MiB.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Tested-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
rm -f $seqres.full
# _get_scsi_debug_dev returns a scsi debug device with 128M in size by default
rm -f $seqres.full
# _get_scsi_debug_dev returns a scsi debug device with 128M in size by default
-SCSI_DEBUG_DEV=`_get_scsi_debug_dev`
+SCSI_DEBUG_DEV=`_get_scsi_debug_dev 512 512 0 300`
if [ "$SCSI_DEBUG_DEV" == "/dev/" ]; then
_fail "Failed to initialize scsi debug device"
fi
if [ "$SCSI_DEBUG_DEV" == "/dev/" ]; then
_fail "Failed to initialize scsi debug device"
fi
$LVM_PROG vgcreate -f $vgname $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1
# We use yes pipe instead of 'lvcreate --yes' because old version of lvm
# (like 2.02.95 in RHEL6) don't support --yes option
$LVM_PROG vgcreate -f $vgname $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1
# We use yes pipe instead of 'lvcreate --yes' because old version of lvm
# (like 2.02.95 in RHEL6) don't support --yes option
-yes | $LVM_PROG lvcreate -i 2 -I 4m -L 100m -n $lvname $vgname \
+yes | $LVM_PROG lvcreate -i 2 -I 4m -L 275m -n $lvname $vgname \
>>$seqres.full 2>&1
# wait for lv creation to fully complete
$UDEV_SETTLE_PROG >>$seqres.full 2>&1
>>$seqres.full 2>&1
# wait for lv creation to fully complete
$UDEV_SETTLE_PROG >>$seqres.full 2>&1