LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mirroring a disk in Linux RHEL AS4 (https://www.linuxquestions.org/questions/linux-newbie-8/mirroring-a-disk-in-linux-rhel-as4-730628/)

FruitBat2310 06-04-2009 07:41 AM

Mirroring a disk in Linux RHEL AS4
 
Hello,

I'm very new to Linux hence this post. I have been asked to mirror the root disk on a Linux server running RHEL AS4 and I have no idea where to start. The layout of the root disk is as follows:-

/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

Can someone advise me on how to perfrom this task please as I'm currently struggling with it?

soleilarw 06-04-2009 08:47 AM

The root disk is in your case /dev/sda6 (the one marked as '/' which means root). To make a copy you can use the 'dd' tool, but please read the man page before doing something that you regret.

It is not clear what is truely asked of you:
- making a backup of the root partition only
- making a backup of the whole root file system (this would require to backup all the mounted partitions as well, like /usr, /var and the others)
- setting up a hard disk mirror with some other hard disks to continually mirror all data changes

Linux Archive

FruitBat2310 06-04-2009 09:24 AM

From what I understand they require all partitions to be mirrored to another disk ( this is yet to be installed into the server ). So if the primary root disk were to fail they could run off the root mirror.

So basically I would like it so that all changes are mirrored onto the second disk.

battletroll 06-04-2009 09:39 AM

Look into dd and mdadm This may help
READ THE DOCS FIRST

You will need a partition the same size created first on different disk

fdisk /dev/sdb <Read the info from using the M command>

use disk type "fd" = Linux Raid

mdadm -c /dev/md0 -n 2 -l 1 /dev/sda6 /dev/<new disk part>

chrism01 06-05-2009 02:00 AM

Upper and lower case 'c' have different meanings: http://linux.die.net/man/8/mdadm
In the above case, you want upper: C

soleilarw 06-05-2009 06:07 AM

It seems that RAID mirroring is what they want from you. Not overly complicated, but you should get some complete tutorial on the topic - and also get some cheap old PC to test the procedure before playing with it on a production environment.


All times are GMT -5. The time now is 04:55 AM.