fsck parallel check

Eugene Grosbein eugen at grosbein.net
Thu Apr 16 16:05:50 UTC 2020


16.04.2020 22:51, Wojciech Puchar wrote:

> can it be changed?
> 
> fsck checks in sequence all filesystems with 6-th field in /etc/fstab equal 1, and in parallel all with 6-th field equal 2 but one process per disk.
> 
> This is right if you have magnetic disks. checking 2 partitions in parallel on one physical disk is bad idea.
> 
> But it is very good idea to do this on SSD with multiple partitions.
> 
> Can it be changed ?
> 
> If not - i can write a fix for this (option settable in fstab).

Please read fsck(8) manual page carefully. This field may have values greater than 2.

Quoting the manual:

     In other words: In preen mode all pass 1 partitions are checked
     sequentially.  Next all pass 2 partitions are checked in parallel, one
     process per disk drive.  Next all pass 3 partitions are checked in
     parallel, one process per disk drive.  etc.

So you are already allowed to check your SSD partitions in parallel using same pass number (f.e. 2)
and check HDD partitions using distinct pass numbers (2, 3, 4 etc.)

Also note that "one process per disk" refers to old traditional partition numbering
like da0s1a, da0s1d, da0s1e that fsck recognises as belonging to same "disk"
but not to newer label-based mount like /dev/ufs/root, /dev/ufs/var or /dev/mirror/m0s1a etc.
so it runs it all in parallel unless you deny it using different pass numbers.



More information about the freebsd-hackers mailing list