Bug#549691: workaround for LVM snapshot bug

Timm Essigke Timm.Essigke at uni-bayreuth.de
Wed May 19 18:06:39 UTC 2010


Hi,

I found a workaround for the bug, but I am sure it should not be like 
that (based on 
http://tuxrx.org/content/cant-remove-open-logical-volume-error). To 
reproduce:

% lvs

   LV      VG      Attr   LSize   Origin Snap%  Move Log Copy%  Convert
...
   work    abraham -wi-ao  10.00g

% ls -l /dev/mapper/abraham-work*
lrwxrwxrwx 1 root root 7 May 19 19:40 /dev/mapper/abraham-work -> ../dm-7

% lvcreate -s -nwork_snap -L100m /dev/abraham/work
   Logical volume "work_snap" created

% lvs
   LV        VG      Attr   LSize   Origin Snap%  Move Log Copy%  Convert
...
   work      abraham owi-ao  10.00g
   work_snap abraham swi-a- 100.00m work     0.01

% ls -l /dev/mapper/abraham-work*
lrwxrwxrwx 1 root root 7 May 19 19:38 /dev/mapper/abraham-work -> ../dm-7
lrwxrwxrwx 1 root root 8 May 19 19:38 /dev/mapper/abraham-work-real -> 
../dm-10
lrwxrwxrwx 1 root root 7 May 19 19:38 /dev/mapper/abraham-work_snap -> 
../dm-9
lrwxrwxrwx 1 root root 8 May 19 19:38 /dev/mapper/abraham-work_snap-cow 
-> ../dm-11

% dmsetup remove /dev/mapper/abraham-work_snap
% dmsetup remove /dev/mapper/abraham-work_snap-cow
% lvremove /dev/mapper/abraham-work_snap
   Logical volume "work_snap" successfully removed

Now all traces of the snapshot are remove. If I only "dmsetup remove" 
the snapshot, but not the "-cow" it persists and prevents future snapshots.

I am not sure if it is a bug in lvm2 or rather in 
kernel-image-2.6.32-trunk-* and  kernel-image-2.6.32-5-* together with 
udev and dm. If I downgrade lvm2 from 2.02.62-1 to 2.02.39-7 the error 
remains. Instead downgrading to 2.6.26 works as before.

Shall I report the bug against linux-2.6?

The sample uses the symbolic links because I modified 
/lib/udev/rules.d/55-dm.rules according to message #44 of debian bug  
#581593, but with the block device the problem and solution is the same.

@Tim: I think you were right, that the bug is the same... Sorry!

I hope the workaround helps the maintainers to find the real source of 
the problem.

Regards,

Timm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-lvm-maintainers/attachments/20100519/5583ed68/attachment.htm>


More information about the pkg-lvm-maintainers mailing list