Need to add local storage to a XenServer host after installation

I recently needed to add some local storage to a XS 6 installation.  Just power down, add the drive, maybe configure a logical drive in the array and boot up?  XenServer should see the new drive, right?

Not exactly.  The drive won’t show up until you go into the shell and create it.

Log into the shell:  fdisk -l   to list the disks.  That is a lower case L.

Your new drive should show up in the list.  In my case it was called /dev/cciss/c0d1

To ‘create’ the drive type: pvcreate <device name> .  So in my case it was: pvcreate /dev/cciss/c0d1

Last step is to configure it to be local storage and give it a label: xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/dev/cciss/c0di name-label=”Local Disk 2”

You will need to enter the name of your disk in place of where I have /dev/cciss/c0di.

No need to reboot.  Once the above commands are entered, the disk will now show up in XenCenter.

-CG2

Advertisements

3 responses to “Need to add local storage to a XenServer host after installation

  1. Thanks for this article. It helped. I was slightly confused to see the part of the command “device=/dev/disk/by-id/dev/cciss/c0di” and you mention to replace my disk in place of where “/dev/cciss/c0di” but I think you really mean in place of “/dev/disk/by-id/dev/cciss/c0di”.
    Actually, I think your example command shouldn’t have “/dev/disk/by-id” portion.
    Anyways, thanks again!

  2. I have an HP server that I expanded the array on. I ran the command fdisk -l and I see the added space on the array. /dev/cciss/c0d0 899 gig, however I dont see that space in the manager. How do I get this free space to show up so I can use it?

  3. Did you add the disk…

    Last step is to configure it to be local storage and give it a label: xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/dev/cciss/c0di name-label=”Local Disk 2”