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). 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). 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.)
Comments on this page:
|
|