Oct 232011
 
Citrix XenServer

When setting up a new xenserver, I ran into a small problem. The server had multiple disk arrays (RAID 1). The Xenserver hypervisor was installed on the first array (chosen during setup). All arrays where visible during setup, but once the setup was complete, the only “Local Storage” that was visible was the first array…

Since this was my first multi disk setup, I did not know what to expect.

After some searching the internet I found a number of articles describing how to add new disks as local storage post install. These articles had one thing in common though, they all missed some crucial steps or information to complete the setup I wanted.

So I combined 3 articles and with a bit of trial and error accomplished my goal.

The Setup

  1. Server with more then one hard disks (2 RAID 1 arrays in this test case, but this does not make any difference, only the disk ID’s will be different)
  2. Xenserver 5.6 installed on the first array (will be labeled “Local Storage). Default option during setup. DO NOT mark the other disk(s) for installation, you will end up with an LVM volume spanning all disks
  3. XenCenter installed on a PC in the same network as the XenServer. I used the console through XenCenter instead of the actual server console because of the cut&paste option

The Plan

  1. Install 2 virtual servers
  2. Use the local storage on array 1 as the system (boot) disks of both virtual servers
  3. Use the local storage on array 2 as the data disk for the first

The Procedure

  1. Determine the host uuid of your xenserver:
    xe host-list

    This will list the host uuid of your system. Adding local storage will only work for local hosts, not pool members

  2. Determine which disks are available:
    fdisk -l

    This command will show all disks and partition recognized by the system

  3. Find your disk ID’s:
    ls -alt /dev/disk/by-id

    Find the disk ID of the “sdb” or “cciss/c0d1”disk. The “scsi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” or “cciss-xxxxxxxxxxxxxxxxxxxxxxxxxx”format is what you need.

  4. Using the host uuid and the disk-ID you can now create a storage repository (SR):
    xe sr-create content-type=user device-config:device=/dev/disk/by-id/ host-uuid= name-label=”Local Storage 2” shared=false type=lvm

    Replace the following parts with the correct info for your machine:

    • device=/dev/disk/by-id/<scsi-xxxxxxxxxxxxxxxxxxxxxxxxx> : replace the <…> part with your disk ID obtained in 3.
    • host-uuid= <host-uuid> : replace the <…> part with your host uuid obtained in 1.
    • name-label= “Local Storage 2” : enter a display name for the new Storage Repository
  5. This adds a storage repository to your host (identified by the host uuid)
  6. Repeat this for any additional disks

History:

This article was written a while ago for Dynamix. It was originally tested on Xenserver 5.5. I have since used it on Xenserver versions 5.5 U2 and 5.6. I have transferred it to Techfocus for reference purposes.

Source articles:

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

© 2011 Techfocus [dot] be Site powered by Wordpress and Suffusion theme