Bug 483517

Summary: lvreduce does not honor --test with --resizefs
Product: [Fedora] Fedora Reporter: Curtis Doty <curtis>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 11CC: agk, bmarzins, bmr, dwysocha, heinzm, lvm-team, mbroz, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.02.48-1.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-19 10:32:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 446451    

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:
https://www.redhat.com/archives/lvm-devel/2009-February/msg00147.html

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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

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.
http://admin.fedoraproject.org/updates/lvm2-2.02.48-1.fc11

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.