I've got a couple of drives I copied over using ddrescue to image files for booting under Xen. They contain an LVM volume group with a couple of volumes in it, which was originally split across two disks, one of which ended up failing but was successfully recovered. TL;DR the guest (Centos 5.8) can't find the logical volumes when I boot it up, and I need to figure out what my options are. Here's my xl-compatible.cfg:
# For centos import
name = 'placeholder'
# figure out pvhvm drivers
builder = 'hvm'
vcpus = 6
memory = '16384'
boot = 'c'
# according to xl.cfg man page it is 'guest specific' what this is
root = '/dev/VolGroup00/LogVol00'
disk = [
'file:/home/user/xenvms/placeholder/disk1.img,sda,rw',
'file:/home/user/xenvms/placeholder/disk2.img,sda,rw',
# copying over to new lvs instead of files didn't magically fix anything, consider this later
#'phy:/dev/vg0/xen.placeholder.com-VolGroup00-disk1,sda,rw',
#'phy:/dev/vg0/xen.placeholder.com-VolGroup00-disk2,sdb,rw',
]
vif = [ 'bridge=xenbr0' ]
#serial = 'pty'
vnc = 1
vnclisten = '0.0.0.0'
Here's what fdisk -l shows is in those images from the perspective of dom0, after making the devices available using losetup:
Disk /dev/loop0: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0007f805
Device Boot Start End Sectors Size Id Type
/dev/loop0p1 * 63 208844 208782 102M 83 Linux
/dev/loop0p2 208845 3907024064 3906815220 1.8T 8e Linux LVM
Disk /dev/loop1: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000c421b
Device Boot Start End Sectors Size Id Type
/dev/loop1p1 * 63 3907024064 3907024002 1.8T 8e Linux LVM
I am able to see the logical volumes using fdisk and lvdisplay if I boot the VM using system rescue CD:
And here's what happens when I boot it up. Does anyone know where I might start to get the booted guest OS to find the volume group?