Recovering LVM configuration on crashed RAID partition
Hi,
I'm running 4 IDE disks in my home server using software raid with the following partition layout:
hd[abcd]1 /boot (RAID 1) hd[abcd]2 swap (RAID 5) hd[abcd]3 / (RAID 5) hd[abcd]4 (RAID 5) LVM with logical volumes /data and /business
Now hdb crashed and while trying to recover the root partition (before I replaced the faulty disk) I lost all data in the root partition (including the whole /etc directory tree). So after replacing the defect drive I installed a linux on hda3 (with swap partion on hda2) for recovering purposes. I actually left the LVM RAID partition untouched until I replaced the defect drive. After resyncing the new drive into the LVM partition I tried to get access to the data in the logical volumes, but without success. There are no PVs, no VGs, or LVs listed.
GPART did not give any positive results, but listed four primary partitions with all 00s in it:
* Warning: strange partition table magic 0x0000.
Primary partition(1)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
hex: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00
Primary partition(2)
...
vgscan gives:
Reading all physical volumes. This may take a while...
pvscan gives:
No matching physical volumes found
lvdisplay gives:
No volume groups found
Since I didn't do anything with the LVM RAID partition the logical volumes and the data must still be there!!!
Is there any other way to get access to the LVM partitions?
Thanks in advance!
Oliver
A message that is not in the archive (sent off-list or not yet received): 1137600874l.12955l.0l@mofo
Quoted 9 lines · Karl O. Pinc
Quoted 6 lines · Oliver Schembach
Hi,
I'm running 4 IDE disks in my home server using software raid with the following partition layout:
hd[abcd]1 /boot (RAID 1)
hd[abcd]2 swap (RAID 5)
Quoted 11 lines
I don't know what I'm doing with LVM so can't help, but I can say that you don't want to run swap on raid5. Probably you want to run it on raid0, perhaps raid 1 if you've hot-swappable drives and want to maximize uptime.
Karl <[email protected]>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
Thanks for your recommendation regarding RAID 5 on swap partitions. There's not so much swapping on my machine, so I didn't really notice the drawbacks resulting from the CPU XORing for the raid 5 algarithm. My idea really was to avoid the machine going down in case of a disk crash in the raid array. But you are right, I will change the swap partition to RAID 1 (...if I ever will get back my data from my LVM partition...)
Regards,
Oliver