Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#324777 - 29/07/2009 07:48 Is RAID5 more robust than RAID1 ?
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK

I am about to replace an old hardware RAID5 array with a Linux software RAID1 array. I was talking to a friend and he claimed that RAID5 was more robust than RAID1.

His claim was that with RAID5, on read the parity data was read to make sure that all the drives were returning the correct data. He further claimed that on RAID1 errors occurring on a drive will go unnoticed because no such checking is done with RAID1.

I can see how this could be true, but can also see that it all depends on how the RAID systems in question are implemented. Surely a RAID5 system doesn't have to read and check the parity data on a read and a RAID1 system could just as easily read from all drives on read to check they were all holding the same data and therefore achieve the same level of robustness (with a corresponding loss of performance).

So the question is, what do RAID5/RAID1 systems in the real world actually do ? Do RAID5 systems check the parity data on reads ? Are there RAID1 systems that read from all drives and compare the data on read ?

See also:

http://serverfault.com/questions/47458/is-raid5-more-robust-than-raid1


Edited by andy (29/07/2009 08:45)
_________________________
Remind me to change my signature to something more interesting someday

Top
#324778 - 29/07/2009 11:09 Re: Is RAID5 more robust than RAID1 ? [Re: andy]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
Your friend's points are all true, and are the sort of thing that enterprise storage vendors like to fret over. New, high-end drives are now getting extensions that provide extra parity bits and the like for end-to-end data integrity.

BUT.. for real-people, SATA and/or UDMA-IDE is good enough. The drives, internally, always use massive ECC on the data. So if they return data, you are assured it is "parity-corrected".

The reason for SATA and/or UDMA-IDE, is that those interfaces also assure CRC protection on the link between the drive and the host controller. So it is protected against most bit errors on that path, too.

The only thing RAID5 buys over RAID1 here, is protection between the controller and the system memory. Which really isn't meaningful.

Note also, that anything attached with USB has _no_ parity/crc protection over the USB cable..

Cheers


Edited by mlord (29/07/2009 11:10)

Top
#324779 - 29/07/2009 11:39 Re: Is RAID5 more robust than RAID1 ? [Re: andy]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Originally Posted By: andy
Do RAID5 systems check the parity data on reads?

I don't know this, but it seems to me unlikely that it does. Remember that in order to calculate the parity, it will have to read the block from all drives in your RAID set and then do math to determine correctness, whereas if it doesn't, it just just does the read off of one drive. Also, if your read is for less than one block, a parity-check read would have to expand it to a full block, whereas a regular read wouldn't. (Assuming, of course, that the RAID block is bigger than the disks' blocks. I think that reads from disk have to be of full blocks. If not, my point is even more valid.)

So, from my point of view, yes, it could do that, but if it did, it would be inefficient, and I doubt that any are implemented that way.

Again, though, I have no personal knowledge of actual implementations.
_________________________
Bitt Faulk

Top
#324780 - 29/07/2009 11:49 Re: Is RAID5 more robust than RAID1 ? [Re: andy]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Hm. That serverfault web site looks interesting. I'll have to keep that one on my radar.
_________________________
Bitt Faulk

Top
#324781 - 29/07/2009 11:53 Re: Is RAID5 more robust than RAID1 ? [Re: wfaulk]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
The Compaq/HP controllers I worked with would run data integrity checks on any RAID set when the controller was idle. All it did was read the entire RAID set, and check for errors coming back from disks indicating one might be failing.

Definitely ensure some sort of full read is done to the array at some point, even if under linux it is a simple cat /dev/device > /dev/null. I had a 2 drive failure on my RAID 5 software array when one disk died completely, and a second one had a bad spot. I did manage to recover the majority of data in the end, but would have preferred to know ahead of time one of the disks was having problems.

Top
#324782 - 29/07/2009 12:19 Re: Is RAID5 more robust than RAID1 ? [Re: drakino]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14484
Loc: Canada
For that, just ensure you have smartmontools installed and configured to do regular (say, weekly) surface scans of the media.

Cheers

Top
#324783 - 29/07/2009 12:25 Re: Is RAID5 more robust than RAID1 ? [Re: drakino]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
The Linux mdadm tools include a "checkraid" script, which I believe checks for array consistency.
_________________________
Remind me to change my signature to something more interesting someday

Top
#324784 - 29/07/2009 12:47 Re: Is RAID5 more robust than RAID1 ? [Re: wfaulk]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Originally Posted By: wfaulk
Hm. That serverfault web site looks interesting. I'll have to keep that one on my radar.


See also:

http://www.stackoverflow.com/
http://www.superuser.com/ (still in "private" beta, password ewok.adventure )
_________________________
Remind me to change my signature to something more interesting someday

Top
#324804 - 31/07/2009 10:47 Re: Is RAID5 more robust than RAID1 ? [Re: andy]
LittleBlueThing
addict

Registered: 11/01/2002
Posts: 612
Loc: Reading, UK
The most critical factor in selecting drives for RAID:
"do they offer advance-replacement RMA service?"

In the UK that is Samsung - dodgy drives... great service.

As for the other questions : http://linux-raid.osdl.org/

checkraid essentially does :
echo check > /sys/block/mdX/md/sync_action

If however you do
echo repair > /sys/block/mdX/md/sync_action

Then it will read all blocks for a stripe and if a read-error occurs, will calculate the block from parity and attempt to write the block that failed to read.
_________________________
LittleBlueThing Running twin 30's

Top