Koozali.org: home of the SME Server

Harddisk mirroring

Ronald Tanis

Harddisk mirroring
« on: July 07, 2001, 02:39:15 PM »
Hi,

I want to set up my e-smith box with harddisk mirroring, with two maxtor 40gb 7200rpm harddisks,

Is there a utility what can find out if one harddisk is damaged or doesn't function any more, I can't find how i can look if my harddisks are ok en if the mirroring is function.

Thanks
Ronald Tanis

Lloyd Keen

Re: Harddisk mirroring
« Reply #1 on: July 08, 2001, 07:36:41 PM »
You could try phpsysinfo. Someone might correct me on this one, but I'm pretty sure if the mirror is up and functioning the two drives will appear as /dev/md0 whereas unmirrored they would normally appear as /dev/hda1. Another good source of info is located in /var/log/dmesg and /var/log/messages. That should tell you what partions were added to the array.

Ed

Re: Harddisk mirroring
« Reply #2 on: July 10, 2001, 01:48:14 AM »
If you look in 'cat /proc/mdstat'
the status of the RAID drives should be printed.
I's kinda cryptic.  So look at it when both drives are up vs. when only one is up.  (Something like [UU] says that both are Up and functioning, [U ] says only the first one is Up).  

If you don't have Hot Plug drives shut it down before disabling the drive.

If you powerdown and plug the HD back in, it whould start recovering when you boot up.  See /proc/mdstat for the status.

FYI: I would practice recovering from drive failures before putting a RAID system in production.  Practice with both the First drive going bad and then the Second drive.  Does the system boot if the First drive is bad?  DOes it still boot after replacing the first drive with a new one?  Also, try  replacing the "bad" drive with a drive that is not identical to the original ones.

Good Luck.