[KLUG Members] Question on RAID - 1 ( Number of partitions)

Mike Williams members@kalamazoolinux.org
Thu, 20 Nov 2003 12:35:21 -0500


>
>
>To: members@kalamazoolinux.org
>From: "Sanjay Chigurupati" <Sanjay.Chigurupati@lntinfotech.com>
>Date: Thu, 20 Nov 2003 17:41:15 +0530
>Subject: [KLUG Members] Question on RAID - 1 ( Number of partitions)
>Reply-To: members@kalamazoolinux.org
>
>
>
>Hi,
>I am trying to create a software RAID ( RAID 1) with 2 hard disks.  I
>created two software raid partitions for each mount point I wanted.
>
>For instance for /home, I created two software raid partitions (one on hard
>disk 1 and one on hard disk 2) and created a raid device using those two
>partitions.
>
>I kept the number of spare disks as zero.
>
>When I removed a hard drive from the machine (disconnected, with power off)
>and restarted, I was able to get into the os.
>But when I reconnected the hard drive, and ran /sbin/hotaddraid  /dev/md1
>/dev/hdc
>
>It was not able to add the second hard drive back. It said :
>md1 : unable to reconstruct. no spare disk
>running in degraded mode
>
>  
>
Look at the file /proc/mdstat and see if how many members it shows, and 
if it's rebuilding or anything.  Here's a copy of mine, so you know what 
it should look like when all is well. 

Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hdc1[1] hdb1[0]
      60050496 blocks [2/2] [UU]

unused devices: <none>

You probably need to manually fail the array member.  Try 
/sbin/raidsetfaulty /dev/md1 /dev/hdc, then reaidhotadd it back in.

>What is purpose of spare disk? If I use it, it looks like I will need three
>software raid partitions for each device. Is this right?
>
>I was under the impression that with RAID 1, if I used 2   40 GB hard
>disks, my total data could use 40 GB. With spare disk, it looks like it
>will be 1/3 of 80.
>
>  
>
You are correct.  With RAID 1, usable capacity is 1/2 your actual size, 
unless you're using a hot spare.  With RAID 5 your capacity is 
(drives-1), but it requires at least 3 drives.  hot spares are not 
included in either calculation. 

>Is it possible to recover without spare disk.
>
>  
>
yes.  see above.

>Thanks,
>Sanjay
>