fsadm doesn't respect the dry run parameter when combined with -l

Bug #628648 reported by Cosmin L on 2010-09-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
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://pastebin.com/V528p8wU ):

# lvdisplay
  --- Logical volume ---
  LV Name /dev/rlvm/mysql
  VG Name rlvm
  LV UUID 2bRbbb-k4F8-b4z6-bbbb-bbbb-bbbb-bbbcv6
  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/rlvm-mysql 128G
fsadm: "ext4" filesystem found on "/dev/mapper/rlvm-mysql"
fsadm: Device "/dev/mapper/rlvm-mysql" size is 274877906944 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/rlvm-mysql"
    Finding volume group rlvm
    Executing: fsadm --verbose check /dev/rlvm/mysql
fsadm: "ext4" filesystem found on "/dev/mapper/rlvm-mysql"
fsadm: Executing fsck /dev/mapper/rlvm-mysql
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
/dev/mapper/rlvm-mysql: clean, 213/16777216 files, 7730630/67108864 blocks
    Executing: fsadm --verbose resize /dev/rlvm/mysql 134217728K
fsadm: "ext4" filesystem found on "/dev/mapper/rlvm-mysql"
fsadm: Device "/dev/mapper/rlvm-mysql" size is 274877906944 bytes
fsadm: Parsing tune2fs -l "/dev/mapper/rlvm-mysql"
fsadm: Resizing filesystem on device "/dev/mapper/rlvm-mysql" to 137438953472 bytes (67108864 -> 33554432 blocks of 4096 bytes)
fsadm: Executing resize2fs -f /dev/mapper/rlvm-mysql 33554432
resize2fs 1.41.11 (14-Mar-2010)
Resizing the filesystem on /dev/mapper/rlvm-mysql to 33554432 (4k) blocks.
The filesystem on /dev/mapper/rlvm-mysql is now 33554432 blocks long.

    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/backup/rlvm" (seqno 4).
  Logical volume mysql successfully resized

# lvdisplay
  --- Logical volume ---
  LV Name /dev/rlvm/mysql
  VG Name rlvm
  LV UUID 2bRbbb-k4F8-b4z6-bbbb-bbbb-bbbb-bbbcv6
  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.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers