generic/081: wait for lv to be settled before creating fs on it

Call 'udevadm settle' or 'udevsettle' or 'sleep 1' to make sure new lv
is ready for use before making filesystem on it, depends on which
command is available on the system.

Signed-off-by: Eryu Guan <eguan@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
Eryu Guan
2015-08-04 14:10:48 +10:00
committed by Dave Chinner
parent ea9e6f5860
commit 00c81b7004
2 changed files with 20 additions and 0 deletions
+2
View File
@@ -66,6 +66,8 @@ mkdir -p $mnt
_scratch_mkfs_sized $((300 * 1024 * 1024)) >>$seqres.full 2>&1
$LVM_PROG vgcreate -f $vgname $SCRATCH_DEV >>$seqres.full 2>&1
$LVM_PROG lvcreate --yes -L 256M -n $lvname $vgname >>$seqres.full 2>&1
# wait for lvcreation to fully complete
$UDEV_SETTLE_PROG >>$seqres.full 2>&1
# _mkfs_dev exits the test on failure, this can make sure lv is created in
# above vgcreate/lvcreate steps