You are not logged in.

#1 2008-11-05 06:36:12

Eschatokyrios
Member
Registered: 2007-09-22
Posts: 51

recovering a lost lvm logical volume

I have four physical volumes, sda through sdd, on lvm.  Most of my lvm logical volumes are small and fit entirely on sda, even though I never explicitly created them as contiguous. The biggest logical volume, data (the one I care about) took up part of sda, part of sdd and all of sdb and sdc.

My old sdd went bad recently (hardware failure), and I had to replace it with a new sdd. In the process I lost some data on the partition on data, but I was able to get it consistant, and after I replaced sdd for a new sdd and added it back to the volume group I put what data I had backed up back on data. Then I rebooted.

After I rebooted the system I got thrown into the root mainanance shell because none of my lvm logical volumes were detectable. pvscan reported one missing UUID and one "PV unknown device" in addidtion to sda, sdb and sdc which was the same size as my new sdd.

fdisk -l tells me that there was no partition table on sdd, which is what you'd expect [I think] if I had just added /dev/sdd as a physical volume, but I might've created a full disk partition /dev/sdd1 and added that. I honestly don't remember.

I wasn't getting any read failures this time like I did with the old sdd, so at a loss about what to do I ran vgreduce --removemissing. Now I could activate the volume group again, but I lost the data entry in /dev/mapper and lvscan stopped reporting it. Further, pvdisplay started showing that sdb and sdc were entirely free (and sdd as well when I re-pvcreate'd it), and there was as many free extents on sda as the amount that the portion of data on sda took up. In other words the entire data logical volume was lost to the system but everything else was fine.

At this point I'm going to try using Foremost to get back whatever was on that partition, but it'd be nice if it were possible to somehow restore that missing data logical volume. Even if it's just the portions of it that were on sdb and sdc and sda, ignoring whatever was on sdd. I had already lost everything on the old sdd anyway, except what I had the foresight to back up. And sda-sdc were full when I started moving things back after the first failure, so all the new data would've had to go to sdd, I think.

Anyone have any suggestions?

Offline

#2 2008-11-06 05:15:29

Eschatokyrios
Member
Registered: 2007-09-22
Posts: 51

Re: recovering a lost lvm logical volume

Bump.

Offline

Board footer

Powered by FluxBB