본문 바로가기

로그 저장소 :)/가상화.virtualization

[Citrix] Adding a new local storage on Citrix XenServer 6


During the life of a server, it comes always a day when you will need more storage. It just happened to me and I had to add a new local disk to my Citrix XenServer 6 environment running on a HP ProLiant server.

Here is the way to do it.

After installing the new disk in the server, and configured a logical drive in the SCSI/RAID controller, you need to log on to the server using a ssh client (eg, Putty). With the commandxsconsole you get the screen below.

Under the storage menu you can review the current configuration.




Close the XenServer Console in order to come back to the command prompt.

Before we can execute the proper command to add the new disk as local storage for the XenServer we have to collect some data.

Find the disk ID of the new device using the following commands:
cat /proc/partitions
(You will see list of HDDs and partitions. Find which device is your new local disk. Locate it by size. This is probably “sdb” or “/cciss/c0d1p0”)

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

Find the uuid of your xen server:
xe host-list

Now we can finaly create a Storage Repository (SR):
xe sr-create content-type=user device-config:device=/dev/disk/by-id/<cciss-xxxxxxxxxxxxxxxxxxxxxxxxx> host-uuid=<host-uuid> name-label=”Local Storage 2” shared=false type=lvm

We can see the result in the xsconsole.