please shut down lvm volumes on unmount so disk can be removed

Bug #1279660 reported by mhosken on 2014-02-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udisks (Ubuntu)
Wishlist
Unassigned

Bug Description

I created a luks encrypted partition on an external drive, and put lvm with a single group and two volumes into the partition. I then used mkfs.btrfs to create a raid1 (-d raid1 -m raid1) mirror of the two lvm volume devices. After rebooting (yes, it's that bad) and plugging in the external drive again, two drives appear on the list of available drives, even though they are a raid pair. If you click on one then it mounts OK. If you click the other or click to mount again the mounter will mount the device again in another directory of /media.

If I then unmount those manually I can't stop the drive using disks or lock the encrypted partition (this probably being the cause of the other). If I give up and unplug, then the two block devices for the lvm volumes remains and I can't replug later without a reboot.

I raise this bug since I can imagine that down the line, this could become a common use case if btrfs isn't going to support direct encryption for those wanting self healing, encrypted, compressed, browsable backups.

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1279660/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
mhosken (martin-hosken) wrote :

In keeping with a similar bug #890779, I am assuming this is a udisks/udev issue. But the encryption aspect and the inability for it to take down the lvm to release the encryption may be from somewhere else.

affects: ubuntu → udisks (Ubuntu)
Phillip Susi (psusi) wrote :

I believe this is just lvm: there is no user friendly way to shut it down so you can unplug an external lvm disk. You will need to manually run lvchange -an on the logical volumes residing on the disk, or better yet; don't use lvm on an external disk.

summary: - luks+lvm+btrfs raid1 confuses linux
+ please shut down lvm volumes on unmount so disk can be removed
Changed in udisks (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers