How does MDADM deal with a sudden power loss
-
So the question was raised here and without the obvious retort of "have the server on a damned UPS" I'm curious what the actual answer is.
How does MDADM deal with a sudden power loss?
-
There is no correct answer here. It will depend on a lot of things. Size of files been written, speed of drives etc. You could have slight data loss. More data being written and the slower the drives the greater the chance of more data loss or corruption.
-
UPS is indeed the answer. Software RAID trusts that you will take the effort to protect the power supply externally rather than internally. It's always been the nature of enterprise software RAID to push that responsibility to the physical server admins to make sure that that power is reliable or the power down happens gracefully before things fail.
-
Hardware RAID traditionally handles this by having a tiny UPS on the hardware card itself or having stateful storage caches to buffer against the outage.
-
@scottalanmiller could enabling write-intent-bitmaps help with the sudden power loss in a mdadm array? If enabled they would probably cause a big impact in performance but could they help?