Dear storage gurus,
I need some expertise to verify the following thoughts. Thanks in advance for your feedback.
A laptop has a builtin UPS, the battery. Thus it should be safe to disable the explicit flushing of the drive's (or controller's) cache. I.e. for ZFS on a laptop (in sysctl.conf(5))
Not that I could notice the difference in daily usage, but I believe it will gain some performance in heavy-write scenarios (and it's nerdy). Some laptops even have two batteries, where the internal one can not easily be removed and only be disabled in the BIOS (e.g. Lenovo ThinkPad). So this tweak should be safe on such machines, even when the 1st battery is removed, as long as the 2nd, internal battery is enabled.
Now I'm asking myself if such a tweak could cause damage for aggregated storage, i.e. RAID1-x, when the machine crashes for another reason than power outage. E.g. could it damage the internal data structures of a RAID5, so that after a crash the RAID is in an irrecoverable, irregular state? I.e.: all devices are online, but the correct data can not be recovered?
Background: while enterprise-grade storage boxes (should) have either a battery-backed storage controller or a battery dedicated to the onboard storage controller chips, most entry-level NAS boxes (or microservers) do not. I found only the Kobol Helios64 NAS to have such a vital feature (and a very outdated model of Buffalo). Likewise, I read that SAS disks have a capacitor-backed cache, while SATA disks have not. Is that correct?
Is it thus fair to say: to be reliable, a NAS box shall have ECC-RAM and either a builtin UPS, or a battery-backed storage controller or use SAS disks? Then it is safe to disable the flushing of the controller's or disk's cache, because even without an external UPS the RAID will be in a recoverable state after a crash (if the minimum #disks are ok).
I need some expertise to verify the following thoughts. Thanks in advance for your feedback.
A laptop has a builtin UPS, the battery. Thus it should be safe to disable the explicit flushing of the drive's (or controller's) cache. I.e. for ZFS on a laptop (in sysctl.conf(5))
Code:
vfs.zfs.cache_flush_disable=1
vfs.zfs.vdev.bio_flush_disable=1
Now I'm asking myself if such a tweak could cause damage for aggregated storage, i.e. RAID1-x, when the machine crashes for another reason than power outage. E.g. could it damage the internal data structures of a RAID5, so that after a crash the RAID is in an irrecoverable, irregular state? I.e.: all devices are online, but the correct data can not be recovered?
Background: while enterprise-grade storage boxes (should) have either a battery-backed storage controller or a battery dedicated to the onboard storage controller chips, most entry-level NAS boxes (or microservers) do not. I found only the Kobol Helios64 NAS to have such a vital feature (and a very outdated model of Buffalo). Likewise, I read that SAS disks have a capacitor-backed cache, while SATA disks have not. Is that correct?
Is it thus fair to say: to be reliable, a NAS box shall have ECC-RAM and either a builtin UPS, or a battery-backed storage controller or use SAS disks? Then it is safe to disable the flushing of the controller's or disk's cache, because even without an external UPS the RAID will be in a recoverable state after a crash (if the minimum #disks are ok).