Comment by bruce511
3 years ago
On my pc motherboard (and all the ones I've had forever) if you hold the power button in for like 4 seconds it does a hard-power cut.
Just don't complain the next time you start it up that disk files you were writing to when the power failed are corrupted.
Why shouldn't I complain? Transactions and snapshots and checkdisk were invented lifetimes ago, and building resilient systems out of fragile parts is so ancient that Joe Armstrong is dead and buried and "cattle not pets" is the mantra of the era for cloud scale computing.
Holier-than-thou victim blaming may be a good excuse in FOSS land but we pay Microsoft money for Windows and Apple money for macOS X, and both companies are capable of building stuff which can recover from interruption. Even JETDB is surprisingly resilient when you force-reboot an Exchange server these days, so is SQL Server, so is Active Directory, so is NTFS.
> Just don't complain the next time you start it up that disk files you were writing to when the power failed are corrupted.
That should never, ever, ever happen if your OS and filesystem are even remotely quality software.
If your kernel is doing any caching and it’s shutdown without a chance to flush its caches, then doesn’t it necessarily have the possibility of corrupted data?
No. ZFS is well-renowned for a reason, it's very resilient. The chance of a power cut ever inducing any actual data loss with ZFS is astronomically low. https://superuser.com/questions/1134753/can-zfs-cope-with-su...
I'm not so sure. Most filesystems don't come with ACID guarantees.
They should. ZFS is roughly the filesystem equivalent of an ACID database. It's incredibly resilient to power cuts. https://superuser.com/questions/1134753/can-zfs-cope-with-su...