0

FSCK(8) says:

The root filesystem will be checked first unless the -P option is specified (see below). After that, filesystems will be checked in the order specified by the fs_passno (the sixth) field in the /etc/fstab file. Filesystems with a fs_passno value of 0 are skipped and are not checked at all. Filesystems with a fs_passno value of greater than zero will be checked in order, with filesystems with the lowest fs_passno number being checked first. If there are multiple filesystems with the same pass number, fsck will attempt to check them in parallel, although it will avoid running multiple filesystem checks on the same physical disk.

...

Hence, a very common configuration in /etc/fstab files is to set the root filesystem to have a fs_passno value of 1 and to set all other filesystems to have a fs_passno value of 2. This will allow fsck to automatically run filesystem checkers in parallel if it is advantageous to do so. System administrators might choose not to use this configuration if they need to avoid multiple filesystem checks running in parallel for some reason – for example, if the machine in question is short on memory so that excessive paging is a concern.

I have one physical disk on my machine, with two filesystems one vfat this is the ESP and the other is ext4 this is mounted on root /, each having fs_passno value of 1. The first paragraph in the manual page states that fsck avoids "multiple filesystem checks on the same physical disk."

Confusingly the second paragraph implies that filesystems with fs_passno of value 2 will be run in parallel and does not say that they might not run parallel on the same disk. In my case, what would be the case? Parallel or not parallel?

1

I don't see where exactly lies your confusion. First, all FS with fs_passno=1 will be checked. If they are on the same physical media (your situation), the check will be sequential: VFAT first, then /, or the other way round. Then all FS with fs_passno=2 will be checked, and so on.

  • "and to set all other filesystems to have a fs_passno value of 2. This will allow fsck to automatically run filesystem checkers in parallel if it is advantageous to do so." It says here it'll run the filesystem checker in parallel and it didn't mention that except for the same physical disk. The idea is to make the filesystem checker to run in parallel whenever possible perhaps? As such other than root we set fs_passno=2 for all so that when a filesystem is on different device the checker runs the check in parallel, since they have the same value 2 but on difference devices. – direprobs Aug 12 '17 at 12:01
  • @direprobs Exactly. FS checks should be run in parallel whenever possible. fs_passno is here to ensure a specific order (i.e. in case of a crash you want your system up as soon as possible => you give / the number 1, /var and /home the number 2 and /mnt/archives the number 3). And since there is no gain checking in parallel on the same device (hardware bottleneck), the checker ensures checks are done sequentially on a given physical device. – xhienne Aug 12 '17 at 12:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.