# make sure there's enough disk space for 256M lv, test for 300M here in case
# lvm uses some space for metadata
_scratch_mkfs_sized $((size * 1024 * 1024)) >>$seqres.full 2>&1
-$LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1
+
+# lvm has a hardcoded list of valid devices and fails with
+# "device type is unknown" for those not in the list like null_blk
+$LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1 || \
+ _notrun "LVM is too stupid for this device"
# 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 -L ${lvsize}M -n $lvname $vgname >>$seqres.full 2>&1
echo "SCSI debug device $SCSI_DEBUG_DEV" >>$seqres.full
# create striped volume with 4MB stripe size
-$LVM_PROG pvcreate -f $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1
+#
+# lvm has a hardcoded list of valid devices and fails with
+# "device type is unknown" for those not in the list like null_blk
+$LVM_PROG pvcreate -f $SCSI_DEBUG_DEV $SCRATCH_DEV >>$seqres.full 2>&1 || \
+ _notrun "LVM is too stupid for this device"
$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
_scratch_mkfs_sized $((350 * 1024 * 1024)) >>$seqres.full 2>&1
# Create a 200MB dm-thin POOL
-$LVM_PROG pvcreate -f $SCRATCH_DEV >>$seqres.full 2>&1
+#
+# lvm has a hardcoded list of valid devices and fails with
+# "device type is unknown" for those not in the list like null_blk
+$LVM_PROG pvcreate -f $SCRATCH_DEV >>$seqres.full 2>&1 || \
+ _notrun "LVM is too stupid for this device"
$LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1
$LVM_PROG lvcreate --thinpool $poolname --errorwhenfull y \