0

I'm setting up an old spare server with XenServer 6.2 to run some test VMs and to get some experience on XenServer itself (we're used to our own linux+xen setup and to the usual VMware suspects).

This specific system currently has two direct attached 500GB disks, but the use case is interesting (to us, at least) because we'd like to replicate it in the future on servers with pairs of hardware mirrored disks that could only be presented as one big virtual disk.

To my knowledge, the default install of XenServer 6.2 wants a whole disk for the hypervisor and would only let you use additional disks as SR (storage repositories) for virtual machines; I'd want to use the remaining space on the install disk as SR.

After initial XenServer setup (and applying all updates) my first try was to use gdisk to create a new GPT partition (type FD00 - linux software raid) on the remaning space of the system disk, then I also used gdisk to create an identical GPT partition on the second disk to use both in software raid. I rebooted the system and tried to create the md device but I always got this error (/dev/sda being the disk where I installed XenServer):

# mdadm --create /dev/md0 -l1 -n2 /dev/sda3 /dev/sdb3
mdadm: Cannot open /dev/sda3: Device or resource busy
mdadm: create aborted

Since software raid was just a trick to get some more IOPS out of this test system, I gave up and went to directly use the two individual disks with LVM... I changed partition types (to 8E00, Linux LVM), rebooted just to be sure, but I still can't use the first disk:

# pvcreate /dev/sda3
  Can't open /dev/sda3 exclusively.  Mounted filesystem?
# pvcreate /dev/sdb3
  Physical volume "/dev/sdb3" successfully created

Obviously I checked both mount and /proc/mdstat: the former does not show anything about /dev/sda3 and the latter is completely empty.

I'm stuck with using only the second disk and I can't manage to let it use remaining space on the first disk. I also don't know what is keeping it "busy" at the linux kernel level and preventing it to be used by md or lvm.

Is it possible somehow to let XenServer use remaining space on the install disk? Is there some trick I'm missing?

1 Answer 1

1

The default install of XenServer already does what you want: It carves a smaller partition for the XenServer proper, then builds the rest of the disk into the "Local Storage" SR.

In the process, it consumes the whole first disk, leaving no space for additional partitions.

There's nothing special you need to do.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .