NetBSD-Users archive

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

Re: setting up raid5



On May 31, 2010, at 8:50 26AM, Manuel Bouyer wrote:

> On Mon, May 31, 2010 at 09:33:43PM +1000, Simon Burge wrote:
>> Steven Bellovin wrote:
>> 
>>> I'm trying to set up a raid5 configuration across 3 disks.  It isn't =
>>> working right...
>>> 
>>> I used this as raid1.conf:
>>> 
>>> START array
>>> 1 3 0
>> 
>> You want
>> 
>>      START array
>>      1 2 1
>> 
>> there - 1 row with 2 disks and 1 spare disk.  The example for a
>> 4 disk RAID5 is "1 3 1".
> 
> I don't think so. The "spare disk" is a hot spare. If he doesn't want one,
> the last number can be 0.

Yes, that's reasonably clear from the man page, which says that the
spare drives "are not actively used by the RAID driver unless
one of the main components fail."

More interestingly, look at PDF pages 4-7 of 
http://www.cs.columbia.edu/~smb/classes/s06-4118/l24.pdf
(lecture slides I made up 4 years ago), which show graphically how
different RAID levels work.  Per page 7, you can't do RAID5 with only
two drives; there's no way to spread out the parity.
> 
>> 
>>> START layout
>>> 512 1 1 5
>> 
>> I'm not 100% sure, but I think you're limited to 128 sectors per
>> stripe unit (64kB or MAXPHYS) here.  Maybe try the "32 1 1 5" as
>> per the example first, and bump higher when the rest is working.
> 
> Yes, this is likely the problem. raidframe will schedule a transfer
> larger than MAXPHYS, and the underlying driver will bail out.

Thanks, I'll try that, though it leaves unanswered why the first two
drives had no problem -- I was even able to create a file system on
them.

                --Steve Bellovin, http://www.cs.columbia.edu/~smb







Home | Main Index | Thread Index | Old Index