"dmsetup deps" does not accurately report LVM dependencies, can cause boot failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools |
Invalid
|
Undecided
|
Unassigned | ||
cryptsetup (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned | ||
devmapper (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Scenario:
My root fs is on LVM which has some LVs (including root) over a single VG over a single PV which is a physical partition.
I create an encrypted PV, and extend the VG with it. I do not, however, migrate any part of the root fs to the new PV.
"dmsetup deps" shows that the root fs depends only on the physical partition, not on the encrypted partition. However, the VG cannot start without that encrypted PV being available. "dmsetup deps" does not accurately detect that the root fs now depends on the encrypted PV being available.
This has bad consequences for booting. If I run "update-initramfs -u" it uses "dmsetup deps", and fails to note that there is now a "cryptroot" element involved. System will not boot (Recovery is possible using a live CD to then remove the encrypted partition from the VG)
This is probably a bug with dmsetup. Alternately you could consider it a bug with initramfs-tools, which needs a better way to detect this scenario.
....
UPDATE by hugojosefson: This bug has now been moved to project "cryptsetup (Ubuntu)", so that the problem can be solved in the method get_lvm_deps() in /usr/share/
description: | updated |
Changed in cryptsetup: | |
status: | New → Confirmed |
Changed in initramfs-tools: | |
status: | Confirmed → Invalid |
description: | updated |
I can confirm that this bug affects me too in Ubuntu 8.10.
For me, the scenario is a little different (newly installed system where the VG has many PV:s, of which only one's extents are in use). dmsetup deps still only reports the PV whose extents are in use, and not all PV:s that are required for the VG to start.
dmsetup version 2:1.02.27-3ubuntu2
initramfs-tools version 0.92bubuntu16