Koozali.org: home of the SME Server

RAID information

Dave Boccabella

RAID information
« on: July 12, 2001, 05:29:53 AM »
I been reading bout the RAID capabilities of E-Smith. and I am puzzled about one area.

Unlike a HW RAID system this is software, and the PC does the actual mirroring operation. If one of the drives should fail ad it is replaces.. How does one syncronise the data again.

With some HW systems this is done automatically by the controler, but with a software RAID is it just a case of copying everything onto the new drive.

Many Thanks

Dave

Graeme Robinson

Re: RAID information
« Reply #1 on: July 12, 2001, 10:35:12 AM »
RAID is something you should test when setting it up so you can be sure of expected behaviour under given conditions.  If all is well the system will keep running in the event of a single disk failure and will boot to either disk.  Adding a new disk should see it automatically introduced to the raid config, something you can monitor through /proc/mdstat.

Mark

Re: RAID information
« Reply #2 on: July 12, 2001, 12:39:45 PM »
HW RAID controller should have built-in function to do auto-recovery. That is, auto-resync all data from good HD to new HD.
But for software RAID, you need to resync all data manually. You can check current RAID status and got the following messages by perform 'cat /proc/mdstat'  command

RAID in GOOD condition:

md2 : active raid1 hdc1[1] hda1[0] 264960 blocks [2/2] [UU]
md0 : active raid1 hdc5[1] hda5[0] 15936 blocks [2/2] [UU]
md1 : active raid1 hdc6[1] hda6[0] 3943808 blocks [2/2] [UU]

RAID in BAD condition:

md2 : active raid1 hda1[0] 264960 blocks [2/1] [U_]
md0 : active raid1 hda5[0] 15936 blocks [2/1] [U_]
md1 : active raid1 hda6[0] 9719168 blocks [2/1] [U_]

When hard disk problem occur, you can refer Charlie Brady recovery instructions by refer to  http://forums.contribs.org/index.php?topic=10221.msg38508#msg38508

Regards,
Mark

David Guest

Re: RAID information
« Reply #3 on: July 13, 2001, 02:25:40 AM »
Mark

I'm getting there with e-smith but lack confidence. :-)

Will Charlie's /sbin/raidhotadd /dev/md0 /dev/hda1fix my syncing on md2:
hda1?

The "md2 : active raid1 hdb1[1] 264960 blocks [2/1] [_U]" status has been
like this since install.

David

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[root@marriott /proc]# cat mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md2 : active raid1 hdb1[1] 264960 blocks [2/1] [_U]
md0 : active raid1 hdb5[1] hda5[0] 15936 blocks [2/2] [UU]
md1 : active raid1 hdb6[1] hda6[0] 29736192 blocks [2/2] [UU]
unused devices:

[root@marriott /proc]# fdisk -l /dev/hda

Disk /dev/hda: 255 heads, 63 sectors, 3737 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        33    265041   fd  Linux raid autodetect
/dev/hda2            34      3737  29752380    5  Extended
/dev/hda5            34        35     16033+  fd  Linux raid autodetect
/dev/hda6            36      3737  29736283+  fd  Linux raid autodetect
[root@marriott /proc]# fdisk -l /dev/hdb

Disk /dev/hdb: 255 heads, 63 sectors, 3737 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdb1   *         1        33    265041   fd  Linux raid autodetect
/dev/hdb2            34      3737  29752380    5  Extended
/dev/hdb5            34        35     16033+  fd  Linux raid autodetect
/dev/hdb6            36      3737  29736283+  fd  Linux raid autodetect


Mark wrote:
>
> HW RAID controller should have built-in function to do
> auto-recovery. That is, auto-resync all data from good HD to
> new HD.
> But for software RAID, you need to resync all data manually.
> You can check current RAID status and got the following
> messages by perform 'cat /proc/mdstat'  command
>
> RAID in GOOD condition:
>
> md2 : active raid1 hdc1[1] hda1[0] 264960 blocks [2/2] [UU]
> md0 : active raid1 hdc5[1] hda5[0] 15936 blocks [2/2] [UU]
> md1 : active raid1 hdc6[1] hda6[0] 3943808 blocks [2/2] [UU]
>
> RAID in BAD condition:
>
> md2 : active raid1 hda1[0] 264960 blocks [2/1] [U_]
> md0 : active raid1 hda5[0] 15936 blocks [2/1] [U_]
> md1 : active raid1 hda6[0] 9719168 blocks [2/1] [U_]
>
> When hard disk problem occur, you can refer Charlie Brady
> recovery instructions by refer to
> http://forums.contribs.org/index.php?topic=10221.msg38508#msg38508
>
> Regards,
> Mark

David Boccabella

Re: RAID information
« Reply #4 on: July 13, 2001, 06:29:59 PM »
Ok.
Ran a test with VmWare (gotta love that product) and created a 2 disk E-Smith system. Kill one HD, and then followd Charle's instructions.

Work like a charm. Only wish is for something to copy the partition info from one disk to another..

Apart from that - it seems to work welll.

Many thanks for the pointers