FS#20565 - [lvm2] [udisks] Cannnot remove lvm snapshot

Attached to Project: Arch Linux
Opened by Feifei Jia (ffjia) - Monday, 23 August 2010, 07:54 GMT
Last edited by Ionut Biru (wonder) - Monday, 03 October 2011, 18:41 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Eric Belanger (Snowman)
Thomas Bächler (brain0)
Ionut Biru (wonder)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

============================================================
Description:

Cannot remove a lvm snapshot after created

$ sudo lvcreate -vs -L 2g -n snapshot /dev/arch/home

$ sudo lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
home arch owi-ao 180.00g
root arch -wi-ao 30.00g
shoot arch sri-a- 2.00g home 14.43
swap arch -wi-ao 4.00g

$ sudo lvremove /dev/arch/shoot
Can't remove open logical volume "shoot"

I have to reboot, and when the system starts, at the "Checking Filesystems" stage, it shows:

/dev/mapper/arch-root is mounted

WARNING!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage

Do you really want to continue (y/n)?

Of course I choose NO

And the / is mounted with barrier=1,data=ordered, as below:
/dev/disk/by-uuid/3e3772ad-c207-470d-a64e-fa054bd8f348 on / type ext4 (rw,relatime,barrier=1,data=ordered)

The normal mount option is:
/dev/disk/by-uuid/3e3772ad-c207-470d-a64e-fa054bd8f348 on / type ext4 (rw,relatime,commit=0))

And then I can login and delete the lvm snapshot, as usual. If I login but do not remove the lvm snapshot,
next time system boot, it shows the WARNING again....

============================================================
Additional info:

x86_64

kernel26 2.6.35.3-1
lvm2 2.02.70-1
cryptsetup 1.1.3-1

I use lvm on a luks encrypted partition, kernel26 ver 2.6.35.2
has this problem, too.

============================================================
Steps to reproduce:

Run the lvcreate && lvremove commands, I can reproduce this everytime.
This task depends upon

Closed by  Ionut Biru (wonder)
Monday, 03 October 2011, 18:41 GMT
Reason for closing:  Won't fix
Comment by Thomas Bächler (brain0) - Tuesday, 07 September 2010, 21:08 GMT
I cannot reproduce this. I can remove the snapshot volume without problems.

The error on reboot looks like an entirely different problem, not related to LVM.
Comment by Feifei Jia (ffjia) - Wednesday, 08 September 2010, 02:50 GMT
Thomas, according to the bug report of debian and red hat:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549691

https://bugzilla.redhat.com/show_bug.cgi?id=577798#c5

It seemed the bug was caused by udisks package. I use the workaround mentioned
above, modified 80-udisks.rules, then everythings fine.

My udisks version is 1.0.1-5. On another my arch desktop, version 1.0.1-2
works fine with lvm, the udev rules file are same between the two versions.


Comment by Thomas Bächler (brain0) - Wednesday, 08 September 2010, 08:06 GMT
Weird, udev races shouldn't be a problem with udev-aware device mapper libraries. I am assigning Ionut to this, too.
Comment by Ionut Biru (wonder) - Wednesday, 08 September 2010, 10:20 GMT
the differences between 1.0.1-2 and 1.0.1-5 is a patch for lvm2 from upstream that added support for lvm2app 2.2 which we have.

http://repos.archlinux.org/wsvn/packages/udisks/trunk/lvm2_api_support.patch
http://cgit.freedesktop.org/udisks/commit/?id=2b2fcf80841972b70ad695a5a1ed74487d4fd37a

you could try rebuilding udisks using abs without that patch
Comment by Thomas Bächler (brain0) - Wednesday, 08 September 2010, 11:16 GMT
It seems to me that this patch causes udisks to not close the device properly after processing, resulting in failure to remove the snapshot - at least that would explain the symptoms.
Comment by Feifei Jia (ffjia) - Thursday, 09 September 2010, 02:43 GMT
I tried to rebuild 1.0.1-2 with this PKGBUILD:

http://repos.archlinux.org/wsvn/packages/udisks/trunk/PKGBUILD?rev=81353&peg=81353

Installed, but still cannot remove lvm snapshot....

kernel26 2.6.35.4-1
udev 162-1
lvm2 2.02.73-1
Comment by Glenn Matthys (RedShift) - Monday, 15 November 2010, 21:37 GMT
What's the status of this issue?
Comment by Feifei Jia (ffjia) - Tuesday, 16 November 2010, 01:38 GMT
Since there's no udisks update, and according to the last comment of

https://bugzilla.redhat.com/show_bug.cgi?id=577798#c12

This issue is not solved.
Comment by Feifei Jia (ffjia) - Friday, 25 February 2011, 20:35 GMT
  • Field changed: Percent Complete (100% → 0%)
Not fixed. I have just tested, still the same. Maybe it's a udisks issue, I
think.

lvm2 2.02.84-1
udisks 1.0.2-2
Comment by Ionut Biru (wonder) - Sunday, 10 April 2011, 12:54 GMT
try 1.0.3-1 from testing
Comment by Feifei Jia (ffjia) - Monday, 11 April 2011, 08:19 GMT
Still not fixed. :(
Comment by Ionut Biru (wonder) - Friday, 26 August 2011, 16:44 GMT
lvm2 support is now disabled by default in 1.0.4.

read the explanation here:
http://cgit.freedesktop.org/udisks/commit/?id=99de237eed6a026597e9b045527631c42ab86968

i'm going to close this bug as won't fix because there is nothing we can do here.

Loading...