== Why ZFS still needs an equivalent of _fsck_ One of the things that is more or less a FAQ in ZFS circles is why ZFS doesn't need an equivalent of _fsck_ and why people asking for it are wrong. Unfortunately, the ZFS people making that argument are, in the end, wrong because they have not fully understood the purpose of _fsck_. Fsck has two meta-purposes (as opposed to [[its direct purposes ../sysadmin/WhyFsck]]). The obvious one is checking and repairing filesystem consistency when the filesystem gets itself into an inconsistent state due to sudden power failure or the like; this is the traditional Unix use of _fsck_. As lots of people will tell you, ZFS doesn't need an external tool to do this because it is all built in. ZFS even does traditional _fsck_ one better in that it can safely do the equivalent of periodic precautionary _fsck_s in normal operation, by scrubbing the pool. (Our ZFS pools are scrubbed regularly and thus are far more solidly intact than traditional filesystems are.) The less obvious meta-purpose of _fsck_ is ~~putting as much of your filesystem as possible back together when things explode badly~~. ZFS manifestly needs something to do this job because there are any number of situations today where ZFS will simply throw up its hands and say 'it sucks to be you, I'm done here'. This is not really solvable in ZFS either, because you really can't put this sort of serious recovery mechanisms into the normal kernel filesystem layer; in many cases they would involve going to extreme lengths and violating the guarantees normally provided by ZFS ([[cf ../tech/FilesystemChecksumEffects]]). This means external user-level tools. (_zdb_ does not qualify here because it is too low-level a tool. The goal of _fsck_-level tools for disaster recovery is to give you a relatively hands-off experience and _zdb_ is anything but hands-off.) PS: despite this logic I don't expect ZFS to ever get such a tool. Writing it would be a lot of work, probably would not be popular with ZFS people, and telling people 'restore from your backups' is much simpler and more popular. And if they don't have (current) backups, well, that's not ZFS's problem is it. (As usual that is [[the wrong answer ../tech/SocialProblemsMatter]].)