This page was exported from phaq
[ http://phaq.phunsites.net ] Export date: Sat Jun 10 2:23:48 2023 / +0000 GMT |
Bevore we start: I shall not use this on production servers. I shall not use this on production servers. I shall not use this on production servers. I shall not use this on production servers. [Daaa daadidaada daa dadada daaa] (The Simpson theme rolling ...) Umm... where was I? Right, enabling a software RAID on XenServer 6.2. Possible? Yes. Recommended? No. Field of use: Poor techies like unable to afford a hardware RAID controller for a simple test box ;-) So, there's plenty of docs out there, telling you the steps on how to enable software RAID using mdadm on a XenServer. Some of the How-To's I came along:
So, I have no point in replicating the steps other's have already written up, so go ahead and check out those HowTo's carefully. My thoughts, when I was reading up this stuff was like: "Oh my god, this ought to be scripted" Luckily, some of the guys out there started already off with some scripts, however the ones I came along only covered parts of the procedure, namely steps 1 to 9 (refering to the http://sysadmin.compxtreme.ro how-to). So I then essentially took the script provided over at http://sysadmin.compxtreme.ro and took it one step further. It now has no very basic interactive mode: By scanning for available hard drives, it does not rely on hard coded values (which struck me on my server). Thus it does not only detect the system root device (where XenServer bootet from), but also tries to find hard drives that meet the exact same specification (ie. same size). Well, yes, mdadm allows to build software RAID from different, non-identical hard drives. But from my own expertise, building software RAID off different hard drives will sooner or later bite you! I prefer to build software RAID always on identical hard drives, which makes things much more predictable. Thus, my incarnation of the setup script does pay attention to the disks being equal in size. Period. Oh well, I also added the snippets that will finish off your RAID setup, namely steps 10 to 14 as well. My motivation for doing this enhancement was simple: If you're like me, re-installing things over and over again, because of breaking things just to see how they work, well, then you want something, that really helps you get back up again in no time. I love scripts :-) So, here's the direct download link: http://phunsites.net/scripts/x6raidsetup.sh.gz You may also run it directly off your XenServer like this: wget -qO- http://phunsites.net/scripts/x6raidsetup.sh.gz | gunzip | bash The script will scan your disk devices and propose to build a software RAID _if_ and disk identical to your boot drive is found. During the process, it will create a script file at /root/x6raidsetup2.sh, which you can call up after the first reboot in order to finish the setup procedure. Here's an example output from the first-stage setup script: Trying to figure out root device ... So, as seen from the script output, you should be switching the device boot order in your BIOS in order to boot off the new mdadm RAID. Then then second-stage script at /root/x6raidsetup2.sh will finish off, which will look like this: Adding original system root device 'sda' to the software RAID ... Now you should have your mdadm RAID1 up and running in virtually now time (took me 5 minutes). Enjoy! |
Powered by [ Universal Post Manager ] plugin. HTML saving format developed by gVectors Team www.gVectors.com |