VinnyBagOfDonuts

Distinguished
Sep 12, 2011
7
0
18,510
Here is what I understand about write holes, correct me if i am wrong please, I want to know the risk of setting up raid 5. Write holes are caused when you are reading to or writing from a raid 5 drive while the computer unexpectedly crashes (bsod or power outage) this creates corrupted data in your parity drive. You will not realize it until you try to switch out a dead drive. If your computer unexpectedly crashes while reading or writing you could fix the write hole by recopying the files over the old so they are complete. Is this correct?
 

Sfynx

Distinguished
Sep 21, 2011
1
0
18,510


No, it won't. If you simply cancel the copy operation, all drives still get the chance to finish their writes to keep the consistent state of both data and parity.

With an operating system crash (such as a BSOD_ it should only be a problem when your operating system handles the RAID. If your RAID is handled by a hardware RAID controller, an operating system crash would still leave the controller powered up so it can update all drives to keep consistency.

A sudden power outage is the worst scenario. Hardware RAID controllers can surely handle that when they have a battery backed cache, but with software RAID it depends on the implementation. ZFS software RAID (a.k.a. RAID-Z) does not have write holes. I use it exclusively for mass file storage purposes, because no other RAID system is that advanced at the moment.