lost lvm PV (on top of LUKS) while attempting install of 22.04 (manual partitioning)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubiquity (Ubuntu) |
Triaged
|
High
|
Unassigned |
Bug Description
I attempted to install 22.04 on top of existing 21.10 Ubuntu, while retaining the existing root partition. The partition was setup as:
1) LUKS on /dev/sda3 then
2) LVM2 on top of the LUKS partition, with two VGs: root and swap.
When attempting to install, I did the following steps:
1. got all the way to manual setup of disks;
2. selected /dev/sda3 and used the "use it as encryption disk" option;
3. it asked me for a bunch of stuff: password and something about recovery. I assumed it was trying to unlock the existing LUKS volume. At the very least, I assumed it will NOT write anything to disks until I confirm everything. Turns out all that was wrong;
4. after that step, back to the list of partitions, the new luks partition was up, but I still didn't see anything LVM related. I expected to see the existing LVM volums so that I can select them for install.
5. at that point I decided to abort the install and hit quit.
Rebooted and started the old/existing Ubuntu and that throws me into initramfs saying it cannot find encrypted volume with UUID=...
From initramfs I can decrypt the volume, but there's nothing on it, no LVM, nothing.
I also booted the live usb (22.04) and I can decrypt the volume, but pvscan comes out empty.
My guess is, that the luks partition, instead of being opened when I selected it, it was re-initialized, without any warning or confirmation whatsoever. I only expected data to be written at the next step, after completing all the changes to the disks/partitions during install. I would expected a warning that I will permanently loose my data, BEFORE loosing my data. None of that happened.
-------------------
I repeated the exact same steps, on a different machine. The only change was that the existing Ubuntu version was 20.04. Following the same steps, resulted in the exact same data loss. I could get past the "encrypted volume not found" error, by changing the luks UUID to the desired UUID. It then boots normally up the the encryption part, I enter the password, it decrypts it but then back to initramfs as the root volume is not found.
I guess the bug report is: loosing data when trying to setup partitions and BEFORE confirming that I actually want to apply the changes to the disk. Having changes be written before confirmation was certainly unexpected.
I would really appreciate if you could confirm what actually happened here so that I can look for next steps.
Thank you!
summary: |
- lost lvm PV (on top of LUKS) while attempting install of 22.04 + lost lvm PV (on top of LUKS) while attempting install of 22.04 (manual + partitioning) |
Changed in ubiquity (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |