XVM Mirrored Stripe
first of all xvmgr has a nice help menu that gives some guidelines on how to do some tasks. So it also had one for creating a mirrored stripe. But it turned out to be not so intuitive as it seemd at first hand.
The guidelines tell you to
- label your discs
- create slices on your discs
- create 2 mirrors
- create a stripe
- create a filesystem
- mount the filesystem
So... Step 1, labeling:
xvmgr will show a list of all your discs, probably unlabeled on first use with xvmgr. Make sure not to just click and label any disc on a running system, because chances are you'll ruin things. Make sure the discs you operate on are empty and not in use.
Giving the disc a label is nothing else as giving it an easy to understand unique identifier (I used "Vault_9gb_1" for the 9gb disc in slot 1 of my Origin Vault) While labeling I encountered some strange errors, and dexter1 hinted to use fx -x to write a new sgiinfo block on the disc because it possibly got corrupted. I'll not get into the errors here, the hint was good and it solved the problems.
Step 2, creating slices:
Not much fun here. Select all the drives you want to use (4x 9GB in my case) and hit the create slice button. Leave it at its defaults (use all space available) and OK. And voila you should have all needed slices.
Step 3, creating mirrors:
For a mirror you will need 2 identical drives. Or atleast almost identical, because the size of the smalles drive will define the size of the mirror.
Now there are multiple ways of creating a mirror in xvmgr. There is a button in the toolbar, and an option in the box at the bottom right (when a drive is selected), and you can choose it from the help->volumes menu, or you can even click on the word "mirrors" in the guidelines in the help->guidelines->mirroredstripe (something like that) menu!
Surprisingly those 4 options are NOT the same!
The first options will leave you with a mirror with just space for 1 drive. Well... not much fun in a mirror with 1 drive... not realy that much of a mirror. I fooled around with it for a while and have not been able to find out how to add another drive to it.
But when you choose the last of the 4 options, you will get a screen where you can give your mirror a name, select the create options (choose he verify on boot but not on creation option here) and choose the slices to use (2 of the 9GB drives in my case.)
Now repeat this procedure for the 2 other drives.
And maybe repeat it again for again 2 other drives? Depends on how large a stripe you want to create.
Step 4a, creating a stripe:
Now for the stripe creation, you've got just as many options as for the mirrors. And again choose the option from the same screen as you did for the mirrors. But in the screen to select the volume elements your mirrors will NOT show! This was confusing me at first. But you can choose from the eventualy other available unused slices, and there is also an "empty slot" option available. Add this empty slot thing as many times as that you have created a mirror (2 times in my case, but it might as well be 3 or more). This is the only place I have discovered that will allow you to add more than 1 slot to your stripe!
Step 4b, add your mirrors to the stripe:
Now in the top left of xvmgr switch the 'view' to 'Local Volume Elements'. A graphical tree will appear that shows your empty stripe and newly created mirrors. What you should do is drag the "mirror/nameyougave" elements to the empty slot positions in the stripe. Thus taking them out of their current volumes, adding them to the stripes. This will result in a warning dialog probably, telling you that you are changing an online volume. Just hit OK there (You were working with new empty drives, right ?) So after you've done this you should have a 'stripe-tree' that resembles something like this:
vol/mymirroredstripe | `- subvol/mymirroredstripe/data | `- stripe/mystripe | |- mirror/mymirror1 | | | |-slice/myslice1 | `-slice/myslice2 | `- mirror/mymirror2 | |-slice/myslice3 `-slice/myslice4
Congrats! You created a mirrored stripe set!
Now to use this wonderful piece of technology:
Step 5, create a filesystem:
xvmgr has the ability to create filesystems. But again things won't show up! The created volume is not available in the dialogs, so we'll have to do it manualy. In a console do something similar to this:
and this is just like creating a filesystem on a regular drive.
Step 6, mount the volume:
This volume can be mounted just like any other drive ofcourse:
# mount /dev/xvm/mymirroredstripe /mnt/18gig # df -h|grep mymirroredstripe /dev/xvm/mymirroredstripe xfs 17G 288K 17G 1% /mnt/18gig
A secure filesystem. Whenever a drive fails, the system keeps working (but do replace the drive as soon as possible of course), with the added juice of striping: using the capacity of multiple drives as one big volume, with nice performance increase if you do it right.
The setup I'm going to use this for:
- 2 mirrored 18GB drives in my O200 tower 1 (SCSI controller 1)
- 2 mirrored 18GB drives in my O200 tower 1 (SCSI controller 2)
- 2 mirrored 18GB drives in my O200 vault (SCSI controller 3)
And then those 3 mirrors in a stripe. This should give:
- reliability of mirroring
- capacity of 3 18GB drives on one single volume
- speed increase of 3x because the data is spread over 3 scsi busses instead of all having to go over just one.
HAPPY RAID-ING !!!
Share your opinion