0

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:

fdisk from sysrescuecd lvdisplay from sysrescuecd

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?

what it looks like on boot

  • Not enough informaiton. What's guest distribution and version? Add rdshell (or rd.shell) to boot options. This should drop you into shell where you could try lvs to see if there are any errors in the output. lsblk to see what block devices are present. Run vgscan and see it that helps. – Martian Apr 7 '16 at 14:35
  • CentOs 5.8 for the guest here. rdshell or rd.shell is giving me the same screen you see there - Kernel boot parameters are the 2 entries for vmlinuz and kernel, and ro - the best I can give you is sysrescuecd, the rescue mode doesn't seem to want to work when i tried the centos install iso either so this is what works for me for now, but if that's necessary to get a closer distro environment's kind of look at it i can try harder to get it to recognize its own image as a cd – Dmitri DB Apr 7 '16 at 17:50
0

Replacing the disk lines from sda to xvd was ultimately the solution:

      'tap:aio:/dev/vg0/xen.placeholder.com-VolGroup00-disk1,xvda,rw',
      'tap:aio:/dev/vg0/xen.placeholder.com-VolGroup00-disk2,xvdb,rw',
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.