lvreduce --test --resizefs -L4G foo/bar
Will run both of these:
fsadm check /dev/foo/bar
fsadm resize /dev/foo/bar 4194304
Note that fsadm has an option for --dry-run but it isn't used!
Thanks for spotting and reporting this!
Normally --test is safe because it prevents the program from issuing any writes.
We need to add some new protection for fork/exec.
Default behaviour for exec_cmd() in test mode should be to print the command but not actually execute it.
Then some exceptions can be made to that, such as if the command is fsadm, add '--dry-run', and MODPROBE_CMD is probably OK too. (The "fsadm" hard-coding should be removed too and replaced with a similar FSADM_CMD.)
support for --dry-run added by commit:
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
lvm2-2.02.48-1.fc11 has been submitted as an update for Fedora 11.
lvm2-2.02.48-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update lvm2'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7468
lvm2-2.02.48-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.