Home Solaris Solaris system administration ZFS: How to fsck or Check Filesystem Integrity with scrub

ZFS: How to fsck or Check Filesystem Integrity with scrub

0
2250

ZFS will change the way UNIX people think about filesystems. How do you use fsck with a ZFS filesystem? The answer is that you do not. ZFS filesystems are always clean, so even in the worst case of a power outage bringing a system down, you will never be asked to give the root password for system maintenance again. With ZFS, data are always consistent on disk. For you worriers, there is a command you can use to make sure everything is okay with your filesystems.


Unlike of the fsck command which had to be run on an unmounted filesystem (read: downtime), the zpool command has a scrub option which works on a mounted, living filesystem. When run, the command checks all data in the pool for checksum consistency. On redundant systems (raidz or mirror), inconsistencies will be repaired.

To scrub the pool techrx, use the following:

zpool scrub techrx

The command creates lots of IO, so use it judiciously. Only one scrub session is permitted at a time. To stop scrubbing a pool, use the -s option:

zpool scrub -s techrx

error: Content is protected !!