Xenserver 5.6: how to add local storage
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.
- 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)
- 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
- 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
- Install 2 virtual servers
- Use the local storage on array 1 as the system (boot) disks of both virtual servers
- Use the local storage on array 2 as the data disk for the first
- Determine the host uuid of your xenserver:
This will list the host uuid of your system. Adding local storage will only work for local hosts, not pool members
- Determine which disks are available:
This command will show all disks and partition recognized by the system
- 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.
- 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
- This adds a storage repository to your host (identified by the host uuid)
- Repeat this for any additional disks
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.
- CTX121313: Official Citrix documentation
- How to add local storage in Xenserver 5.5 @ logicspot.net
- How To Enable Thin Provisioning: contains a number of useful commands
No related posts.
Sorry, the comment form is closed at this time.