Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Apr 2020 23:05:26 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Wojciech Puchar <wojtek@puchar.net>, freebsd-hackers@freebsd.org
Subject:   Re: fsck parallel check
Message-ID:  <e5742016-81bb-2ba3-74a4-c633d3627b23@grosbein.net>
In-Reply-To: <alpine.BSF.2.20.2004161748390.20589@puchar.net>
References:  <alpine.BSF.2.20.2004161748390.20589@puchar.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e5742016-81bb-2ba3-74a4-c633d3627b23>