2

I have a homeserver running under XenServer control with 3x1TB discs inside, one for XenServer and two mirrored(using Intel's fakeRAID and dmraid) for VMs and a user data(but now I think RAID didn't work). I tried to pass PCI card to VM using PCI-passthroug and I read somewhere that I need to recompile kernel with pciback module but something went wrong(I made mistake in /boot/extlinux.conf and server couldn't run) and I had to use LiveCD of GPartEd(I already had it on USB key) to correct this. But when I re-run the server all VDIs were gone. I have completly no idea what could go wrong.

I tried to repair RAID using dmraid -R in the hope that everything will return to noramal but now I think this done more bad than good(and corrupted rest of LVM table...).

Is there any possibility to recover this SR or only data from one(~100GB) of VDI?


I also wants to apologise for my English, I'm not from English-speaking country and I'm only 16 years old, so I hadn't "time" to learn it(school isn't good place to do this) in sufficient way.

2 Answers2

1

With lvm you can recover lvm configurations. There must be something in the /etc/lvm. After you can take a look at the man page of the lvm commands and see the options you need to make the restore of the lvm configuration. May be this will help !!

Boogy
  • 141
  • 3
1

Unfortunately you still need backups of all your files even if you are using RAID, and LVM makes it somewhat harder to recover data as well. See this answer on risks of LVM for a few links in 2nd paragraph on LVM recovery. It also has tips that may help avoid problems with write caching and LVM/RAID.

See this answer on recovering the data within the RAID 'container' - you can set an offset so that recovery finds the contents without the fakeraid header, with luck.

You may also be able to pull a similar offset trick with LVM, and then use TestDisk - haven't tried this myself but TestDisk can copy specific folders off the disk as long as it can see the filesystem itself - you might need to backup the disk to an image file, do the offsetting for LVM and RAID, then try this. Your setup is more complex because you are using Xen, and I'm not sure of where the Xen disk image (VDI) sits within this.

Of course, the first thing you should do before doing trying recovery is to obtain a similarly sized empty disk - image-copy the entire source disk into this disk, block for block, and only try the recovery on the copy disk. It's quite cheap to get a large disk these days, so there's no reason not to do this. Search for GNU ddrescue for a good way to image disks even if the source disk has unrecoverable read errors.

RichVel
  • 3,524
  • 1
  • 17
  • 23