[DATALOSS] Unrelated LVM partitions are initialized as PVs

Bug #380059 reported by Nikolaus Rath
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
partman-lvm (Debian)
New
Undecided
Unassigned
partman-lvm (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Binary package hint: debian-installer

I have (or rather: had) a working LUKS device on /dev/sdb6. The partition type was set to x8E (LVM) since the encrypted volume was used as an LVM physical volume.

Now I wanted to set up a second installation on the same system. I created partitions /dev/sda3 and /dev/sdb3, both with type LVM. I did not perform any initialization. Then I booted the Jaunty alternate installation cd. I chose "Manual Partitioning" and directly switched into the LVM setup. There I added the /dev/sda3 and /dev/sdb3 partitions as volume groups. I never touched /dev/sdb6. I created some logical volumes and saved this setup. Back in the partitioning menu, I noted that the logical volumes were set as "linear" rather than "striped". Since I had not seen any option to change this, I decided to do the LVM setup in the existing system and rebooted the computer.

Unfortunately the system does not boot anymore, since it cannot find the encrypted source device. When booting from the Live CD, I found that the volume has apparently been damaged:

# cryptsetup luksDump /dev/sdb6
Command failed: /dev/sdb6 is not a LUKS partition

Any ideas on how to recover the data are also greatly appreciated.

Revision history for this message
Nikolaus Rath (nikratio) wrote :
Revision history for this message
Nikolaus Rath (nikratio) wrote :

It turns out that /dev/sdb6 has also been initialized as a physical LVM volume.
pvdisplay reports:

  "/dev/sdb6" is a new physical volume of "97.56 GB"
  --- NEW Physical volume ---
  PV Name /dev/sdb6
  VG Name
  PV Size 97.56 GB
  Allocatable NO
  PE Size (KByte) 0
  Total PE 0
  Free PE 0
  Allocated PE 0
  PV UUID ZWv4zG-vNIR-pdvd-59Kw-TJ1F-xCsm-GWMf22

Can someone please step forward so that I can kick his ass for this?

summary: - Installer garbled unrelated LVM partition
+ [DATALOSS] Unrelated LVM partitions are initialized as PVs
Revision history for this message
Colin Watson (cjwatson) wrote :

I'm not stepping forward to have my ass kicked, thank you very much! (I suspect the cause is code written in Debian not in Ubuntu, anyway.)

But ... could you attach /var/log/installer/syslog and /var/log/installer/partman to this bug, so that we can try to analyse what the installer thought it was doing? I can't guarantee the cause will show up there, but it'll at least be a start.

affects: debian-installer (Ubuntu) → partman-lvm (Ubuntu)
Changed in partman-lvm (Ubuntu):
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Nikolaus Rath (nikratio) wrote :

Sorry for the kicking part. I was slightly annoyed to discover that I had just completely lost several gigabytes of data in a few seconds. But at least I found out that my backup strategy is working.

I don't have /var/log/installer/syslog or /var/log/installer/partman, because, as I said above, I aborted the installation during partitioning.

I will try to reproduce the problem in VMWare and send the logs, but it may take a while until I find the time.

Revision history for this message
error10 (error-ioerror) wrote :

I can verify this bug exists upstream in Debian Lenny 5.0.2. I just lost about 200GB of data to it.

Revision history for this message
Nikolaus Rath (nikratio) wrote :

Do you have the syslog and partman logs? In that case I won't have to try it in vmware.

Changed in partman-lvm (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
error10 (error-ioerror) wrote :

Afraid not. I was more focused on attempting to get my data back (without success, of course) and blew away the Debian install. If I tried it again, it would also be in VMware; I'm NOT going through that again!

Revision history for this message
Nikolaus Rath (nikratio) wrote :

Alright, here's what I did to reproduce the bug:

 - Start with an empty disk
 - Boot into Ubuntu Jaunty live CD, create partition table with one primary 2 GB partition, formatted as ext2, partition type 8E (LVM)
 - Reboot into Ubuntu Jaunty Alternate Install
 - Pressed enter many times until I reached the 'partition disks' dialog
 - chose Manual
 - created a new primary partition extending over the remaining free space, marked as use for LVM
 - Chose 'Configure Logical Volume Manager'
 - Write changes to disk
 - Selected 'Display Configuration Details' - both partitions are listed as PVs
 - Switched to a different consore. As expected, the first partition cannot be mounted as ext2 anymore.

Revision history for this message
Nikolaus Rath (nikratio) wrote :
Revision history for this message
Nikolaus Rath (nikratio) wrote :
Revision history for this message
Nikolaus Rath (nikratio) wrote :

I have provided the requested logs more than a year ago, yet nothing has happened to this bug ever since.

I understand that there aren't always enough ressources to handle every bug, but it would be great if people would only ask for more information if they actually intend to look at it. It took me quite a while to reproduce this bug, but I did so because I wanted to help getting this fixed. It seems that I just wasted my time.

Please, if you don't want to look into a bug then that's fine. But don't make other people waste their time trying to help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.