Xi6.org

Archive for September, 2009

Citrix Xenserver Raid (Fakeraid/software raid)

by on Sep.14, 2009, under Virtualization

Xenserver doesn’t “really” support fakeraid or software raid.

Fakeraid is that of an onboard or bios type raid. All the processing is done by your CPU and is similar to software raid in that regard. But software raid is handled by the Kernel or OS.

A hardware RAID card is expensive (~$400 additional cost to a system), and is typically proprietary in the way it writes data. So if it does happen to fail, you may be SOL when replacing with a different card – or quite often the same card with a slight variation in the firmware.

These days I would say software raid is comparable in performance to hardware, but can more easily be patched or moved across different systems.

While I would like to use software raid on my xenserver installation (And it is “possible”), it’s just a little bit too much patching/hacking to get working… And there is a bit of uncertainty to what happens when the host is updated to a more recent xenserver version.

Now fakeraid is “semi-supported” on a xenserver installation… meaning you can fake raid a storage repository, but not the entire host. You’ll be better off with some raid than no raid.

You’ll need a minimum of three (3) hard drives for a fakeraid on xenserver. (one will be used to install the host, and the others will be raided for VM storage). So we’re limited to a point of failure of the host hard disk… meaning at worst if that fails you should still be able to access/restore VM’s on another xenserver (or re-install the host on a new HD and still have access to the raided storage when you add it again).

On this installation I’ll be using a 200GB drive for the host. (And may use this drive to store ISO’s and other misc files). And all my virtual machine data will be on the raided drives.

You can setup your bios raid (fakeraid) with 1 drive non-raided (the one that will hold the host), and the other drives in a raid array.

During the xenserver installation you will be asked which drive to install on. All your drives will display (non-raided), so choose the single drive you know isn’t in the array (Mine is SDA). And when asked which will be used as the default storage repository, choose the same single drive or none at all.

Once the host boots up you should get into the console.

Make sure the proper modules are installed:

# insmod /lib/modules/$(uname -r)/kernel/driver/md/dm-mod.ko
# insmod /lib/modules/$(uname -r)/kernel/driver/md/dm-mirror.ko

(This would be for a RAID1 mirror)

Execute the following command in order to init the raid:

# dmraid -ay -v

The raid device should show up as /dev/mapper/RaidVol0 (or whatever you called the raid volume in the bios).

Now we’ll want to create a new SR (storage repository) using the RAID volume:

# sm create /dev/mapper/RaidVol0

In order to have the repo avail on boot in /etc/smtab:

# xe host-sr-set -u root sr-id=rep_uuid active=true

Attach the Storage Repository:

# sm attach <rep_uuid> none

See if its active:

# sm info

If not active, restart smtab and xenagentd:

# service smtab restart
# service xenagentd restart

And that should do it.

2 Comments :, , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...