This article describes how to create local storage in XenServer.
Complete the following procedure to create a Storage Repository (SR) on a new local hard drive (HDD):
Note: The stored data in the server will be lost.
Run the following command to find the disk ID of the new device:
# cat /proc/partitions
A list of HDDs and partitions are displayed. Find out which device is your new local disk. Locate it by size. (This is probably “sdb” or “/cciss/c0d1p0”)
# ll /dev/disk/by-id
Find the disk ID of the “sdb” or “cciss/c0d1”disk. The “scsi-*************************” or “cciss-******************”format is required.
Run the following command to create an SR:
# xe sr-create content-type=user device-config:device=/dev/disk/by-id/<scsi-*********************> host-uuid=<host-uuid> name-label=”Local Storage 2” shared=false type=lvm
Or
# xe sr-create content-type=user device-config:device=/dev/disk/by-id/<cciss-********************> host-uuid=<host-uuid> name-label=”Local Storage 2” shared=false type=lvm
For information on configuring local ext3 storage, refer to Local EXT3 in Citrix XenServer Administrator's Guide
To Copy Virtual Machines (VMs) to the New StorageWhen you copy a VM from one storage to another, and plan to use this new copy, ensure that you manually change the MAC address on the interface to the one that was used previously. To do this, complete the following procedure:
Note the MAC on the original VM interface.
Change the MAC address on the original VM interface (a small change in characters is sufficient), because you cannot have two identical MACs in the pool.
Change the MAC on the new VM interface.
If the MAC address is not changed, you might experience the error described at http://support.microsoft.com/kb/269155/en-us
CTX128116 - How to Use a Windows 2008 Network File Share as a Storage Repository for XenServer
Note: If the third partition was not created during the XenServer installation process, it is possible to use the available space (capacity - 8GB for 6.5 and earlier) as local storage. Create the third partition using gdisk and set the type to Linux LVM. Reboot the host and then run the same xe sr-create command. The device should be the third partition suffixed with -part3.