mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: flip to use FSLASTBLOCK
It seems FSSIZE is newer then FSLASTBLOCK so use this one instead.
This commit is contained in:
parent
a934231623
commit
86dc72c28c
@ -138,18 +138,18 @@ mount "$DM_DEV_DIR/$vg/$lv" "$mount_dir"
|
|||||||
blkid -p "$DM_DEV_DIR/$vg/$lv" | grep FSLASTBLOCK || exit 0
|
blkid -p "$DM_DEV_DIR/$vg/$lv" | grep FSLASTBLOCK || exit 0
|
||||||
|
|
||||||
# existence of FSLASTBLOCK gives assumption on having 'new enough' blkid
|
# existence of FSLASTBLOCK gives assumption on having 'new enough' blkid
|
||||||
FSSIZE="$(blkid -p -o udev --match-tag FSSIZE "$DM_DEV_DIR/$vg/$lv")"
|
FSLASTBLOCK="$(blkid -p -o udev --match-tag FSLASTBLOCK "$DM_DEV_DIR/$vg/$lv")"
|
||||||
FSSIZE=${FSSIZE/*=}
|
FSLASTBLOCK=${FSLASTBLOCK/*=}
|
||||||
# lvextend, ext4, active, mounted,
|
# lvextend, ext4, active, mounted,
|
||||||
df --output=size "$mount_dir" |tee df1
|
df --output=size "$mount_dir" |tee df1
|
||||||
lvextend -L+5M $vg/$lv
|
lvextend -L+5M $vg/$lv
|
||||||
check lv_field $vg/$lv lv_size "25.00m"
|
check lv_field $vg/$lv lv_size "25.00m"
|
||||||
# here the filesystem should be resize to match 25M and must not fail
|
# here the filesystem should be resize to match 25M and must not fail
|
||||||
lvextend -r -L25M $vg/$lv
|
lvextend -r -L25M $vg/$lv
|
||||||
NEW_FSSIZE="$(blkid -p -o udev --match-tag FSSIZE "$DM_DEV_DIR/$vg/$lv")"
|
NEW_FSLASTBLOCK="$(blkid -p -o udev --match-tag FSLASTBLOCK "$DM_DEV_DIR/$vg/$lv")"
|
||||||
NEW_FSSIZE=${NEW_FSSIZE/*=}
|
NEW_FSLASTBLOCK=${NEW_FSLASTBLOCK/*=}
|
||||||
test "$NEW_FSSIZE" -gt "$FSSIZE" ||
|
test "$NEW_FSLASTBLOCK" -gt "$FSLASTBLOCK" ||
|
||||||
die "Filesystem should be extended"
|
die "Filesystem should be extended!"
|
||||||
|
|
||||||
# lvextend, ext4, active, mounted, no --fs setting is same as --fs ignore
|
# lvextend, ext4, active, mounted, no --fs setting is same as --fs ignore
|
||||||
df --output=size "$mount_dir" |tee df1
|
df --output=size "$mount_dir" |tee df1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user