Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linux root disk mirroring

Status
Not open for further replies.

nyck

Technical User
Mar 10, 2004
447
0
0
GB
We have a server running RHEL AS4 and I have been asked to get an additional disk installed and then mirror the root disk to this new disk. Can someone point me in the right direction for this task as I have no idea how to do this?
 
Thanks for the link, the server in question has got the following layout:-

Filesystem Size Used Avail Use% Mounted on
/dev/sda6 2.0G 1.6G 352M 82% /
/dev/sda1 198M 12M 176M 7% /boot
none 505M 0 505M 0% /dev/shm
/dev/sda8 17G 576M 16G 4% /home
/dev/sda9 1012M 677M 284M 71% /opt
/dev/sda3 4.0G 41M 3.7G 2% /tmp
/dev/sda2 4.0G 2.5G 1.3G 67% /usr
/dev/sda5 4.0G 1.1G 2.8G 28% /var

Currently is not under any kind of LVM control, can this still be mirrored?
 
I've only ever configured RAID on Linux during the initial install, which made it pretty simple. You can definitely get it working with an existing install, there appear to be some decent guides on google.

I would however recommend making a copy of your disk first, using dd or the like; Just to cover your ass.

"We can categorically state that we have not released man-eating badgers into the area" - Major Mike Shearer
 
I am not sure wether you have RAID capable hardware. if not you need to need to look at "mdadm"

man mdadm

or a very good tutorial is at




QatQat

--------------------------------------
If I could have sex each time I reboot my server, I would definitely prefer Windoz over Linux!
 
Zeland - am I right in assuming that that is for a software RAID 1?


1. as for a hardware RAID 1, I would go about it this way...

2. add two extra drives to the system (sda, sdb, sdc)... you could also use just one extra drive at this time...

3. boot with SystemRescue CD, then "ddrescue" sda to sdc (sdb if you only used one drive above).

4. powerdown once finished. (unplug the sdb and add a new drive for the RAID step below)

5. with the hardware RAID manager, create a RAID 1 with the following drives: sda and sdb (usually this will wipe the drives). (when done power down and add the cloned drive for the following steps)...

6. then boot again with SystemRescueCD, then again use "ddrescue" but from the cloned drive to the newly created RAID 1 array...


worked for me in the past...


Ben
"If it works don't fix it! If it doesn't use a sledgehammer..."
How to ask a question, when posting them to a professional forum.
Only ask questions with yes/no answers if you want "yes" or "no"
 
Ahoy, Ben.

Out of curiosity, why do you use ddrescue on known working discs?

Russell.

"We can categorically state that we have not released man-eating badgers into the area" - Major Mike Shearer
 
Ahoj, Russ...

main reason: it's a force of habit... most linux drive's I end up cloning have some sort of error, and ddrescue will clone a drive just like dd, but will not abort when it hits those errors...

and to prevent me wasting time, by using dd and then finding out it aborted because of a glitch, and then having to do the whole thing over with ddrescue...

Ben
"If it works don't fix it! If it doesn't use a sledgehammer..."
How to ask a question, when posting them to a professional forum.
Only ask questions with yes/no answers if you want "yes" or "no"
 
Hi, Ben.

Ah got you, I was just curious because I've never clocked the speed of ddrescue vs dd on a working drive. Cheers for answering.

Russell.

"We can categorically state that we have not released man-eating badgers into the area" - Major Mike Shearer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top