LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   red hat 8 - disk mirroring after OS install (https://www.linuxquestions.org/questions/linux-software-2/red-hat-8-disk-mirroring-after-os-install-590549/)

goliathlibrary 10-09-2007 11:04 AM

red hat 8 - disk mirroring after OS install
 
Hello All,

I am having a hard time finding any information (other than "dont do it") when i search for directions on how to setup software raid on a red hat system which is currently installed on with no mirroring or anything presently. Basically I've been handed an older server that is in prod and ive been asked to configure some sort of mirroring on this server that has been running without mirroring for a good 3 years.

The only mirroring experience i have in mirroring after the fact with software raid is with solaris using metadevices, and unfortunetly from what i am reading LVM has a few similar concepts to metas but for the most part its very very different.

Discription:

OS: Red Hat Enterprise 8
Hard Disks: 2
Disk Layout: The box was incorrectly built and majority is under /.
Also have a /boot /home and /local partitions.

Task:
So i guess i want to mirror all thats under the root and /home and local partitions to a blank disk that was just added.

Procedure:
???

Does anyone know how to do this correctly and preferrably with minimal data loss and downtime (i assume i would need to reboot into single user mode to mirror the root partition.) Everything is currently backed up nightly as well, so if we do loose the data we are not totally screwed.

Any tips, suggestions, comments etc would be greatly appreciated.

Thanks in Advance.

goliathlibrary 10-09-2007 12:46 PM

Ok i actually found a site with a bit more info. Here is what i found, going to try this next maintenance window. Make sure you have a backup when your trying this. Maybe even a backup of your backup. :)

Code:

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda3 /dev/hdc3
Explanation: This creates a mirror named md0 comprising of /dev/hda3 as the main partition to be mirrored and /dev/hdc3 as the miroree. Note: I'm sure doing the root partition is a bit more painful, but i will see when i drop it into single user mode.

After the mirrors are created check them using this command:

Code:

watch cat /proc/mdstat
Wait for the disks to finish syncing and then make the entry change in /etc/fstab. Change /dev/hda3 to /dev/md0 for example. Trying to find more info about mirroring the root partition now. Any thoughts or suggestions fire away.


All times are GMT -5. The time now is 03:23 PM.