Dear Friends,
I have a webserver with two 160GB SATA HDDs.
I have installed Centos5.X on one of the HDD.
I need help in setting up software RAID 1 on second HDD, so that if any HDD fails we can switched to second HDD.
My office is in Malad West, near DMART, Link road. Can someone help me with this setup for a fee or a crate of beer? :)
On Fri, Feb 12, 2010 at 11:06 AM, Richard Victor Correia richard@florix.net wrote:
Dear Friends,
I have a webserver with two 160GB SATA HDDs.
I have installed Centos5.X on one of the HDD.
I need help in setting up software RAID 1 on second HDD, so that if any HDD fails we can switched to second HDD.
I found this guide useful: http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch26_:_Linux...
SATAs are not hot-swappable. Though you wouldn't have data loss, replacing a failed disk would still call for downtime.
Regards, NMK...
On Fri, Feb 12, 2010 at 12:36 PM, Richard Victor Correia <richard@florix.net
wrote:
Dear Friends,
I have a webserver with two 160GB SATA HDDs.
I have installed Centos5.X on one of the HDD.
I need help in setting up software RAID 1 on second HDD, so that if any HDD fails we can switched to second HDD.
Well, if you've already installed the first hard disk, then i guess u'll have to shrink it for the raid partition. Ideally, it should be done at install time even. It'll only help if the raid partitions are on physically separate disks to protect against a single disk failure.
My office is in Malad West, near DMART, Link road. Can someone help me with this setup for a fee or a crate of beer? :)
Well, my Linux support centre is in goregaon(East Sadly). If you can cart the system across there, with a generous supply soft drinks to be consumed during the setup(i dont drink beer:), I'm sure we can get it set up for you, and probably even show you a few other things you could do. If you need someone to visit you, we will have to work out something commercial though.
Contact me off-list for contact details, if you're interested.
Regards R. K. Rajeev
-- Thanks, Richard Victor Correia PH: +91 9004911199 -- http://mm.glug-bom.org/mailman/listinfo/linuxers
On Fri, Feb 12, 2010 at 12:20 PM, Rajeev R. K. rajeevrk@gmail.com wrote:
Well, if you've already installed the first hard disk, then i guess u'll have to shrink it for the raid partition. Ideally, it should be done at install time even. It'll only help if the raid partitions are on physically separate disks to protect against a single disk failure.
Can he not umount the partitions, create the raid arrays by including the second disk, and mount the arrays again?
Regards, NMK.
On Fri, Feb 12, 2010 at 2:02 PM, Nadeem M. Khan nadeem.m.khan@gmail.comwrote:
On Fri, Feb 12, 2010 at 12:20 PM, Rajeev R. K. rajeevrk@gmail.com wrote:
Well, if you've already installed the first hard disk, then i guess u'll have to shrink it for the raid partition. Ideally, it should be done at install time even. It'll only help if the raid partitions are on
physically
separate disks to protect against a single disk failure.
Can he not umount the partitions, create the raid arrays by including the second disk, and mount the arrays again?
Sadly Not. Notice, he mentions software raid, which needs to be a separate physical partition type. and even many hardware raid controllers will wipe the contents while initialising an array. You can only swap disks without data loss after the raid 1 array is running.
Regards R. K. Rajeev
Regards,
NMK.
On Fri, Feb 12, 2010 at 11:29 PM, Rajeev R. K. rajeevrk@gmail.com wrote:
On Fri, Feb 12, 2010 at 2:02 PM, Nadeem M. Khan nadeem.m.khan@gmail.comwrote:
Sadly Not. Notice, he mentions software raid, which needs to be a separate physical partition type. and even many hardware raid controllers will wipe the contents while initialising an array. You can only swap disks without data loss after the raid 1 array is running.
If he hasn't formatted the partitions as "Linux raid autodetect", then yes the procedure becomes complicated, but not impossible -
1. copy disk1's partition table to disk2 2. create the raid array consisting of disk2 only. 3. with one cp command, copy all data from disk1 to the raid array 4. modify grub.conf for the system to boot from the new raid array (mdX) instead of sdX. 5. Initialize disk1 and add it to the array.
Regards, NMK.
On Fri, Feb 12, 2010 at 2:02 PM, Nadeem M. Khan nadeem.m.khan@gmail.com wrote:
On Fri, Feb 12, 2010 at 12:20 PM, Rajeev R. K. rajeevrk@gmail.com wrote:
Well, if you've already installed the first hard disk, then i guess u'll have to shrink it for the raid partition. Ideally, it should be done at install time even. It'll only help if the raid partitions are on physically separate disks to protect against a single disk failure.
Can he not umount the partitions, create the raid arrays by including the second disk, and mount the arrays again?
Yes and no. To simply migrate existing "data" to a software raid1, what I do is :
1. install the new disk, 2. create the raid1 device (size same as the size of 'non-raid' partition) with one device missing. The raid device get activated. Partition type is 'fd' Linux autodetect raid. 3. I copy the data files from the non-raid partition to the raid partition. make the necessary changes in /etc/fstab 4. reboot the system ensure that data on the "new" raid device is accessible. 5. Change the partition type to fd on the "old" partition 6. Add it to the active raid device. 7. Once the second device is added, mirroring process starts - progress can be viewed periodically with "cat /proc/mdstat"
HTH, -- Arun Khan