RAID 1 without cache protection - ZMCP/backup battery
Solution 1:
Cache protection is about protecting what is in the controller cache "before" it is written to the disks. So if you have write cache enabled on an array, then the data is written into the DDR memory on the controller ... then written do the disk (when the disks are not so busy). This principles remains no matter what RAID level is used. So if you want to protect the data that the OS has written to the disks, but the controller has not yet physically written to the disks, then you need cache protection. BTW: running any spinning disks without write cache is as slow as a wet week. N
Solution 2:
I can understand cache protection being required for stripping. But is it required for mirroring?
Technically it is not required for either. It just increases performance and risk. If you want to be 100% sure then you:
- Do not use writing caching on the RAID card or use a BBU/flashbackups/ZMCP.
- Turn off write caching in the drives itself.
But RAID is not about being 100% safe. RAID is about two potential things:
- Keeping you data intact and access able even when a disk fails. (At least until you can do emergency maintenance. E.g. shortly after business hours).
- And very sometimes it is aboutincreasing performance (e.g stripes, or RAID10, 50, 60 , ...reading from RAID5/6)
To summarize: No, it is not required for a mirror.
Is the risk of running RAID 1 without cache protection (a BBU or Adaptec's ZMCP) any greater than running a machine with a normal SATA controller?
Nope. I would guess it is about the same.
(Which excludes the risk of the RAID card failing).
Solution 3:
A Write cache is a volatile memory (usually RAM) that the OS and disks use to consolidate and cache write actions into. Generally, everything that's in the cache, has not yet been written to disk. If power is lost to this cache, it will lose its contents, and by extend, you will lose some data.
If your controller has a backup battery, then the write cache will be retained in the event of a power outage until the next boot, and then written to disk(s). The RAID level has nothing to do with this.
If you don't have a backup battery you'll lose a chunk of data that was still in cache. Neither the filesystem nor RAID will know exactly what was in the cache, and as such you'll lose that data. This is a problem with every RAID level, even with RAID1 or RAID5. This problem is more commonly known as a RAID Write Hole.
In short: If you use a write cache, you will need a backup battery for that cache. If you don't use a write cache, you won't. RAID-level is unrelated.