Skip to contentSkip to conversation

Snapshot not resized after lvresize

linux-lvm Adam Carheden 1 participant 1 message Dec 27, 2005

lore
Share & tools
lore
#0 lore raw

I'm having trouble resizing an lvm snapshot. I do the following:

linux-util3 ~ # lvdisplay /dev/vg2/backup1
--- Logical volume ---

  LV Name                /dev/vg2/backup1
  VG Name                vg2
  LV UUID                qVH4Dm-OWX7-QpCL-u1rk-lnWj-PysQ-GFk0VF
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                10.00 GB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:0

linux-util3 ~ # lvcreate -s -L 10G -n mysnapshot1 /dev/vg2/backup1
Logical volume "mysnapshot1" created
linux-util3 ~ # lvdisplay /dev/vg2/mysnapshot1
--- Logical volume ---

  LV Name                /dev/vg2/mysnapshot1
  VG Name                vg2
  LV UUID                HXKS1i-JDbx-oIes-TcS6-vuud-WT7G-snJpcM
  LV Write Access        read/write
  LV snapshot status     active destination for /dev/vg2/backup1
  LV Status              available
  # open                 0
  LV Size                10.00 GB
  Current LE             2560
  Segments               1
  Snapshot chunk size    8.00 KB
  Allocated to snapshot  0.00%
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:16

linux-util3 ~ # lvextend -L 20G /dev/vg2/mysnapshot1
Extending logical volume mysnapshot1 to 20.00 GB Logical volume mysnapshot1 successfully resized
linux-util3 ~ # lvdisplay /dev/vg2/mysnapshot1
--- Logical volume ---

  LV Name                /dev/vg2/mysnapshot1
  VG Name                vg2
  LV UUID                HXKS1i-JDbx-oIes-TcS6-vuud-WT7G-snJpcM
  LV Write Access        read/write
  LV snapshot status     active destination for /dev/vg2/backup1
  LV Status              available
  # open                 0
  LV Size                10.00 GB
  Current LE             2560
  Segments               1
  Snapshot chunk size    8.00 KB
  Allocated to snapshot  0.00%
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:16

linux-util3 ~ # lvscan
...snip...
ACTIVE Original '/dev/vg2/backup1' [10.00 GB] inherit
ACTIVE Snapshot '/dev/vg2/mysnapshot1' [20.00 GB] inherit
...snip...
linux-util3 ~ # lvresize -L 20G /dev/vg2/mysnapshot1
New size (5120 extents) matches existing size (5120 extents)
...snip (lvresize help)...
linux-util3 ~ #

Note that lvdisplay report 10G before and after lvextend, but lvscan reports 20G after lvextend. The same things happens when I use the -l or -L to resize when creating the snapshot. resize_reiserfs also refuses to accept the 20G size, so the OS sees the block device the same way lvdisplay does (probably a good thing).

I'm using a Xen Linux 2.6.12.6 kernel with the devicemapper built in but dm_snapshot compiled as a module and LVM2 2.01.09 (Gentoo Linux). Everything is AMD64.

I can successfully resize non-snpshot volumes. I can't, of course, resize my origins, as LVM doesn't support that yet according to lvresize.

Any ideas?

Thanks

Signature · 1 line
Adam Carheden