• How does one force a file system check?


    How does one force a file system check at startup?

    How does one schedule a file system check based on time and reboots?

  • @Ronnie said in How does one force a file system check?:

    How does one force a file system check at startup?

    Regular file systems checks on startup and reboot are defined by the 6th column in /etc/fstab. Possible values are:

    • 0 = do not check
    • 1 = the file system to be checked first
    • 2 = any other file system to check, once the 1st file system check has been done

    The order of file system checks with the 2 option is undefined. They are checked in random order. Lennart Poettering (systemd) doesn’t report the status of file system checks with the 2 option on boot.

    An example from this computer:

    #
    # /etc/fstab: static file system information
    #
    # <file system>  <dir>  <type>  <options>  <dump>  <pass>
    
    /dev/sdb9   /     ext4  rw,relatime,data=ordered  0 1
    /dev/sda16  /1st  ext4  rw,relatime,data=ordered  0 2
    /dev/sdb16  /2nd  ext4  rw,relatime,data=ordered  0 2
    /dev/sdc16  /3rd  ext4  rw,relatime,data=ordered  0 2
    /dev/sda3   swap  swap  defaults                  0 0
    /dev/sdb3   swap  swap  defaults                  0 0
    /dev/sdc3   swap  swap  defaults                  0 0
    
    

    Apart that, the / (root) file system’s check may be forced to run once on next reboot by:

    $ sudo touch /forcefsck
    

    How does one schedule a file system check based on time and reboots?

    Checks on reboots are covered above. Time-based checks aren’t used here.

  • Thank you. You answered my question.

system97 force4 Posts 3Views 302
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.