Moving my install from single disk to raid 1
If you want a quick run down as to WHY I want to do this, read here
Basically, my ISP could not get my server running stable on a simple raid 1 (or raid 5) so what it came down to was having them install my system on a single disk. I don't exactly like this, main reason being, if the system (or HDD) crashes, I'll end up with another several hours of down time... So here is my proposal: Please Note: This will have to be accomplished on a live System (full backups!) over ssh as I don't trust my ISP to do things right as described in my post above. Current Setup: CentOS 5.3 x86_64 Dual Xeon 5410 16GB RAM 4x 750GB HDDs /boot - /dev/sda1 - 512MB (real 471MB) ext3 / - /dev/sda2 - 50GB (real 46GB) ext3 /home - /dev/sda3 - remaining space (real 642GB) ext3 swap - /dev/sdb1 - 32GB /backup - /dev/sdb2 - remaining space (real 659GB) ext3 /dev/md0 - /dev/sdc + /dev/sdd - raid 1 (NOTE: uses entire disk, no partitions!) Proposed Solution: Code:
vgcreate -s 64M vg0 /dev/md0 Assuming I'd have to do this on a fully live system, I'd disable all services that I can Code:
/etc/init.d/sendmail stop Code:
mkdir /mnt/newroot Code:
mount /dev/vg0/lvboot /mnt/newroot/boot Code:
umount -l /dev/sda1 (/boot) vi /etc/fstab Code:
LABEL=/home /home ext3 defaults 0 3 Code:
/dev/vg0/lvhome /home ext3 defaults 0 3 Code:
vi /boot/grub/menu.lst Code:
default=0 Code:
fallback=1 Code:
title CentOS (2.6.18-164.el5) Code:
title CentOS (2.6.18-164.el5) then update my ramdisk: Code:
mv /boot/initrd-`uname -r`.img /boot/initrd-`uname -r`.img_bak And now to set up grub... Code:
grub Code:
Checking if "/boot/grub/stage1" exists... no Code:
> root (hd3,0) Code:
Checking if "/boot/grub/stage1" exists... no Code:
> quit Now, the big question is... have I missed anything? Any and all input is greatly appreciated. |
Man... I feel with you. I read thru the first page of your post on the other forum. It must drive you insane if the "support" people only seem to follow a flowchart to answer you. No matter how many times you call...
Anyway, since you are using CentOS, I am not quite familiar with your OS and the tools it provides. What I miss in your sequence is the usual sequence of creating a new array with a missing disk. Usually you would have two disks in you machine, one running the OS, the other one part of the raid-to-be. You would create the raid from the empty disk, telling the second one is missing. Once you have that incomplete array, you would copy your old one onto the new incomplete array. As a last step you would boot from the incomplete array, nuke the original disk and add it to the array to become complete now. When I did this, I followed this guide: http://www200.pair.com/mecham/raid/r...aded-etch.html and as a reference this one: http://wiki.yobi.be/wiki/Debian_Soft_Raid I know it is Debian, but I hope at least the steps taken will help you as a checklist, and maybe provide you with some ideas. The author of the www200.pair.com page is very careful and takes a number of intermediate testing steps. Switching to single user is not necessary despite of what the author writes. You only have the chance that you miss some data which is added after you start the RAID for the first time, and the copying of the contents of the old disk. Your idea to switch off services during this time is excellent, because it prevents data corruption. But it only need to be the service which might be writing on the disk. Your step to install grub once on each disk instead of a dd copy action is also mandatory. If you don't do that the RAID driver will complain. Just for fun I did the entire RAIDing over ssh from my desk instead of going into the server room. Last but not least, you should try this once on a server which sits on your desk before you do this on your co-located server. Just have the same partition scheme, but of course with the smaller hard disks. good luck jlinkels |
Hi, thanks for your feedback. Being I had 4 disks already I decided to skip the broken array part, and would be starting with a fully working array. I wonder if this would make things more difficult however. Basically, the idea follows similar suit to those guides you listed but skips a few steps.
Quote:
|
All times are GMT -5. The time now is 10:08 AM. |