####################
# lvextend, xfs, active, mounted, --fs resize --fsmode offline
-lvcreate -n $lv -L 300M $vg
+lvcreate -n $lv -L 320M $vg
mkfs.xfs "$DM_DEV_DIR/$vg/$lv"
mount "$DM_DEV_DIR/$vg/$lv" "$mount_dir_space"
df --output=size "$mount_dir_space" |tee df1
dd if=/dev/zero of="$mount_dir_space/zeros1" bs=1M count=20 oflag=direct
-# xfs_growfs requires the fs to be mounted, so extending the lv is
-# succeeds, then the xfs extend fails because it cannot be done unmounted
+# xfs_growfs requires the fs to be mounted, so the lvextend fails here
not lvextend --fs resize --fsmode offline -L+20M $vg/$lv
check lv_field $vg/$lv lv_size "320.00m"
df | tee dfa
# xfs_growfs requires the fs to be mounted to grow, so --fsmode nochange
# with an unmounted fs fails
not lvextend --fs resize --fsmode nochange -L+20M $vg/$lv
-check lv_field $vg/$lv lv_size "380.00m"
+check lv_field $vg/$lv lv_size "360.00m"
mount "$DM_DEV_DIR/$vg/$lv" "$mount_dir_space"
df --output=size "$mount_dir_space" |tee df4
# fs not extended so fs size not changed
# --yes needed because mount changes are required and plain "resize"
# fsopt did not specify if the user wants to change mount state
lvextend --yes --fs resize -L+10M $vg/$lv
-check lv_field $vg/$lv lv_size "390.00m"
+check lv_field $vg/$lv lv_size "370.00m"
mount "$DM_DEV_DIR/$vg/$lv" "$mount_dir_space"
df --output=size "$mount_dir_space" |tee df5
not diff df4 df5
# lvextend, xfs, active, unmounted, --fs resize_fsadm
lvextend --fs resize_fsadm -L+10M $vg/$lv
-check lv_field $vg/$lv lv_size "400.00m"
+check lv_field $vg/$lv lv_size "380.00m"
mount "$DM_DEV_DIR/$vg/$lv" "$mount_dir_space"
df --output=size "$mount_dir_space" |tee df6
not diff df5 df6