The setup and configuration of XenServer Express and XenServer Enterprise was not as straightforward as I had hoped, primarily from the standpoint of documentation. The 4.0 resouces are still lacking a bit. From the support website, for example, XenServer 4.0 only has 27 documents listed in the How-To area, compared to 82 for XenServer 3.1 and 113 for XenServer 3.2. By the way, many of the syntax differences are significant and solutions in 3.1 and 3.2 will not work in the 4.0 version, leading to a bit of extra frustration. When I wanted a quick,clear answer for how to setup or delete a storage resource (not clone, or delete my default storage), I was unable to find one. I eventually worked through the process and thought I'd share.
Under the what-if category, such as, "What if I added a bunch of storage after my initial setup?", is where I'm coming from in this article. If all storage is present at setup, then the allocation of resources is fairly straightforward. If, however, you add storage after the fact or maybe want to separate I/O into a separate storage volume, then how might that be performed through the command line? Keep in mind, if you have multiple RAID sets during setup and choose to utilize all the space during setup, XenServer will create a single lvm volume that stripes across all the discs. This means you will not easily, if at all, be able to separate your I/O loads through logical disk partitioning with the guest operating systems.
Here is the XenCenter console for XenServer Express. Shown is a virtual server with Windows Server 2008, the local CDROM drive and the storage resouces that was created on the initial setup of the XenServer. This is my initial starting point for resouces. I added two more drives and created a simple RAID-1 set, then wanted to add these to the XenServer.
Looking at the server, the new storage was recognized as /dev/sdc. Having identified the storage, the next step is to create the storage resource.
The following is the command for creating the storage. The easiest way to enter the necessary uuid is to hit the tab key after "host-uuid=", under the assumption it's a single server setup. Here's the command:
If an ext type is used, the partitioning of the storage resource can take a long time. A 700Gb SATA drive took over 45 minutes. The lvm type takes seconds. Additionally, the lvm partition gives a number of advantages, which are better explained in this article.
The options that vary between installations include:
- host-uuid (your unique host uuid)
- type (based on your preference)
- device-config-device (your storage device location)
- name-label (what you want to call your storage volume within the XenCenter console)
Naturally, there are other potential options, but I wanted to cover local storage only at this point.
The new storage has been created and automatically added to the XenCenter console.
: