If I have a RAID 1 and some bits on one hard disk flip due to error, how does the raid controller know which of the two disks contains the correct bits?
Asked
Active
Viewed 25 times
0
-
You have discovered one of the fundamental flaws of RAID1. It's a good idea to have a regular automated backup system with multiple media, off-location, using parity. Some RAID systems use parity (RAID5), but it takes a long time and lots of computation to fill up a replacement disk. – Christopher Hostage Oct 16 '19 at 20:13
-
but even with raid 3 discks in RAID 5 (parity), how does the RAID controller know which of the discs contains the error if the partity disagrees? – matthias_buehlmann Oct 16 '19 at 21:09
-
Let's take a simplified answer. We write the number 123 to Disk 0 and the number 456 to Disk 1. Disk 2 is the parity disk, and the RAID performs a calculation (let's use addition). Disk 2 gets 579 written to it. Now, if any of the disks fails, the calculation can be used to generate the appropriate value again. If Disk 0 fails, we need to subtract (579-456) to get 123. If Disk 1 fails, we need to subtract (579-123) to get 456. If Disk 2 fails, we need to do the addition again (123+456) to get 579. When any RAID5 disk fails, we have to do it over and over again for the whole disk. – Christopher Hostage Oct 16 '19 at 22:32
-
This topic has been covered thoroughly on the Internet, and you'll get better answers by Searching. One thing I've discovered is that RAID5 takes a very long time to rebuild a failed disk, and the whole array is very slow while rebuilding. Better to use RAID10, which is striped+spanned. – Christopher Hostage Oct 16 '19 at 22:35
-
Christopher Hostage - this implies that the raid controller already knows which of the disks is at failure. the question is if data corrupts silently on one of the disks, how does the raid controller know which one it is? – matthias_buehlmann Oct 17 '19 at 17:50