test -b "$SCSI_DEBUG_DEV" || _notrun "Failed to initialize scsi debug device"
echo "SCSI debug device $SCSI_DEBUG_DEV" >>$seqres.full
+got_size_kb=$(_get_device_size $SCSI_DEBUG_DEV)
+
+[[ $got_size_kb -lt $((size * 1024)) ]] &&
+ _notrun "Need SCSI debug device of size $(( size * 1024 )) KB. Got $got_size_kb KB"
+
# create striped volume with 4MB stripe size
#
# lvm has a hardcoded list of valid devices and fails with
# 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 ${lvsize}m -n $lvname $vgname \
- >>$seqres.full 2>&1
+ >>$seqres.full 2>&1 || _fail "Failed to create LVM lv"
_udev_wait /dev/mapper/$vgname-$lvname
# _mkfs_dev exits the test on failure, this makes sure test lv is created by