Red HatThis forum is for the discussion of Red Hat Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm running a redhat 9.0 server for a friend, that has 2 80GB disks mirrored together (hda and hdc). All has been working fine. I've been looking at what would happens if a disk fails, and I can see that you must manually re-create the partition table when you replace a disk, does any one know a way of doing this automatically ? What I would like to do is create some sort of script so all my firend would have to do is replace the failed drive and the script would re-create the partitions and then re-start the mirror process.At the moment I'm stuck on the first bit, duplicating the partition information onto another disk.
Guys found the solution so thought I would share it with you.
This is my configuration.
Primary Master = hda
Secondary Master = hdc
CD-Rom = hdd.
You need to do this for both disks.
Firstly need to backup the disk's MBR, and basic partition table.
dd if=/dev/hda of=hda.mbr bs=512 count=1
Second - backup the disks partition table (including the extended information).
sfdisk -d /dev/hda > hda.sfd
Once a failed disk has been replaced, lets assume it was hda.
Restore the MBR.
dd if=hda.mbr of=/dev/hda bs=512 count=1
Restore the Extended Partition information as well.
sfdisk -O change.log /dev/hda <hda.sfd
Check that the partition table is loaded
fdisk -l /dev/hda
Restart the Mirror sync process.
raidhotadd /dev/md? /dev/hda
to see the progress of the mirroring - watch -n1 cat /proc/mdstat
Also to note that I'm using LILO - this seams to be installed on both disks, but grub only gets install on the primary disk. If you loose the primary disk - you cannot boot, but you can still boot if you loose the secondary disk. With lilo either disk can be lost and the system boots without problem.
Hope this helps anyone who was in the same boat i was......