Re: Mirror and/or copy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 21 July 2004 10:43 am, Wartnick, James wrote:
> 	I have a server with 2 disks that are not mirrored. One contains
> O/S files and the other contains database files.
> I'm a bit concerned that the O/S disk may fail some day (the
> disks/machine has run 24X7 for the past 2 years). I have
> Enough room to put all files on one disk. I've read from the
> documentation that is only possible to do O/S mirroring
> at install time. Is that true? I would like to move all files from the
> one disk to the other, and then start mirroring the
> disks, without re-installing the O/S. Is that possible? Also, how "good"
> is the RH mirroring (problems, bugs, etc.)?
> Another option I'm considering is to leave things alone and buy a 3rd
> disk. Then do a "dd" from the O/S disk to the
> new disk, nightly. Will that allow the 3rd disk to be bootable? Somehow
> I would have
> to tell Lilo about the 3rd disk possibly being a boot disk. Is that
> possible? I'm running RH 9.
> Any help appreciated.
>
> -Jim

It is possible to achieve what you want (I've done it) but it is much simpler 
to do it at install time.  Essentially, you'll want to:

1) Get everything moved to one disk.  That means copying the data from disk 2 
to the system disk.  You may need to do this while in single user mode 
(depending on what files we're talking about) and, in any event, it will be 
easier to do so.

2) Once your system is successfully running on the one drive you'll now set up 
your second drive to have the same partitions as the first drive, setting the 
partition type to "fd" (Linux raid auto) and creating the appropriate swap 
files on them.  You'll need to generate an initrd image (mkinitrd) that 
contains support for software raid so that you'll be able to boot from your 
mirror.  

3) Next, you'll bring your system down once again and change your primary 
drive to have partition types of "fd", setting up a /etc/raidtab file to 
indicate mirrors (the only type of RAID that you can do with two disks), 
indicating that the mirror is in a failed state.  When you boot your system, 
you can see in /proc/mdstat that your mirrors have failed.

4) Finally, you'll do a RAIDHOTADD to establish the mirrors.

Please note that there ARE NOT difinitive instructions as I've just written 
them off the top-of-my head.  There's a lot to learn about doing this and you 
can find much help at:

http://tldp.org/HOWTO/Software-RAID-HOWTO.html

If I may suggest, if you have a test machine around with two drives that you 
can use for experimentation you'll be further ahead!

Barry


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux