Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Inside the /etc/fstab file, in the sixth column, there is a number that corresponds to whether a filesystem should be scanned for errors. Possible values are:

0 - skip
1 - high priority
2 - low priority

Why was fsck 'priority' introduced in /etc/fstab?

enter image description here

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

The field exists so you can define the order in which filesystems are checked. Different partitions on the same drive should not be checked at the same time since the IO going to each filesystem will compete with one another, and slow the whole process down. Filesystems on different physical disks could be set to check in the same pass to speed up the whole process since the IO to separate disks would not be competing.

share|improve this answer
    
Thanks for the response. Does it mean that if I specify multiple partitions with 'priority=high' , fsck will spawn a separate thread to scan every partition? (and, when the last thread finishes, all partitions with 'priority=low' will be checked out) –  colemik May 13 '12 at 16:56
    
@trismarck, no, you put a number in the column and all partitions with a 1 get a fsck spawned at the same time to check them, then when they finish, all partitions with 2, and so on. Note that IIRC, mountall on Ubuntu and likely other distros using upstart ignore these fields and do their own figuring of what filesystems are different partitions on the same disk or not. –  psusi May 13 '12 at 21:04
add comment

It has to do with boot order. Highest priority is required for booting (/ and in my opinion /usr /var /tmp ...). The /boot filesystem can do with lower priority because by the time the system can start fsck's, it read the necessary files from boot already. Filesystems for home directories etc. are lower priority during boot process.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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