Bug 483517 - lvreduce does not honor --test with --resizefs
Summary: lvreduce does not honor --test with --resizefs
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Zdenek Kabelac
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F11Target
TreeView+ depends on / blocked
Reported: 2009-02-02 03:42 UTC by Curtis Doty
Modified: 2009-07-19 10:32 UTC (History)
9 users (show)

Fixed In Version: 2.02.48-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-19 10:32:07 UTC

Attachments (Terms of Use)

Description Curtis Doty 2009-02-02 03:42:16 UTC
Running this:

  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!

Comment 1 Alasdair Kergon 2009-02-02 12:43:21 UTC
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.

Comment 2 Alasdair Kergon 2009-02-02 14:27:50 UTC
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.)

Comment 3 Zdenek Kabelac 2009-02-25 12:39:24 UTC
support for  --dry-run added by commit:

Comment 4 Bug Zapper 2009-06-09 11:01:37 UTC
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:

Comment 5 Fedora Update System 2009-07-03 09:30:01 UTC
lvm2-2.02.48-1.fc11 has been submitted as an update for Fedora 11.

Comment 6 Fedora Update System 2009-07-11 17:15:47 UTC
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

Comment 7 Fedora Update System 2009-07-19 10:31:23 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.