fsadm doesn't respect the dry run parameter when combined with -l
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: lvm2
It seems that fsadm does not take the -n | --dry-run parameter into account if combined with the -l | --lvresize flag.
Here is a sample session (see the link here for better readability http://
# lvdisplay
--- Logical volume ---
LV Name /dev/rlvm/mysql
VG Name rlvm
LV UUID 2bRbbb-
LV Write Access read/write
LV Status available
# open 1
LV Size 256.00 GiB
Current LE 65536
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
# fsadm -v -n -l resize /dev/mapper/
fsadm: "ext4" filesystem found on "/dev/mapper/
fsadm: Device "/dev/mapper/
fsadm: Parsing tune2fs -l "/dev/mapper/
Finding volume group rlvm
Executing: fsadm --verbose check /dev/rlvm/mysql
fsadm: "ext4" filesystem found on "/dev/mapper/
fsadm: Executing fsck /dev/mapper/
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/mapper/
Executing: fsadm --verbose resize /dev/rlvm/mysql 134217728K
fsadm: "ext4" filesystem found on "/dev/mapper/
fsadm: Device "/dev/mapper/
fsadm: Parsing tune2fs -l "/dev/mapper/
fsadm: Resizing filesystem on device "/dev/mapper/
fsadm: Executing resize2fs -f /dev/mapper/
resize2fs 1.41.11 (14-Mar-2010)
Resizing the filesystem on /dev/mapper/
The filesystem on /dev/mapper/
Archiving volume group "rlvm" metadata (seqno 3).
Reducing logical volume mysql to 128.00 GiB
Found volume group "rlvm"
Found volume group "rlvm"
Loading rlvm-mysql table (252:0)
Suspending rlvm-mysql (252:0) with device flush
Found volume group "rlvm"
Resuming rlvm-mysql (252:0)
Creating volume group backup "/etc/lvm/
Logical volume mysql successfully resized
# lvdisplay
--- Logical volume ---
LV Name /dev/rlvm/mysql
VG Name rlvm
LV UUID 2bRbbb-
LV Write Access read/write
LV Status available
# open 0
LV Size 128.00 GiB
Current LE 32768
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
As you can see, the command has resized the Logical Volume, when I expected it wouldn't take any actions, only print the commands.