ZFS Scrub task best practice

Alain De Vos


Reaction score: 649
Messages: 2,174

Scrub of one external USB drive took 2days-3hours. Scrub of the second one is still going...


Aspiring Daemon

Reaction score: 339
Messages: 552

On a mostly idle pool, time to scrub is greatly dependent on amount of data to be scrubbed (5TB takes longer than 5GB) and the speed of the data interface (NVME is faster than SATA6 which is faster than SATA3) USB3 is faster than USB2, so I'd guess an external drive, connected via USB is going to take a while if there is a lot of data on it. Speed of the device beyond the USB also affects scrub (SSD faster than spinning platters).

Alain De Vos


Reaction score: 649
Messages: 2,174

Scrub of my SSD freebsd pool took 3-minutes. Scrub of a smaller void-linux-on-zfs pool 30 seconds. A large difference with an external USB.


Active Member

Reaction score: 61
Messages: 189

I only use USB devices as backups, so I do not see why scrubbing them.


Son of Beastie

Reaction score: 2,357
Messages: 3,245

Well I was doubting if it only checked the "meanwhile changed datablocks".
No, the purpose of scrub is explicitly to look at problems with the disk that happen "spontaneously". Two examples of such problems are mechanical damage to the platter and head (scratches, foreign objects, moguls in the lubricant), and off-track writes (where data should have been to one location, and ends up in a different location). These problems don't just happen to the data that is being written.

Scrub and SMART can work well together, because scrub makes sure most areas of the disk get exercised regularly, which makes the SMART statistics more meaningful. This is ideal in a system where the file system (and its scrubbing algorithm) and the analysis of SMART data are designed and tuned together.