is it possible to run xfs repair by re-edit the fstab file?

/dev/mapper/vg-linux_root /                       xfs     defaults        0 0
UUID=7de1dc5c-b605-4a6f-bdf1-f1e869f6ffb9 /boot   xfs     defaults        0 0
/dev/mapper/vg-linux_var /var                     xfs     defaults        0 0
/dev/mapper/vg-linux_swap swap                    swap    defaults        0 0

I am not sure but by replace the last number from 0 to 1 , is it right?

2 Answers 2


The format of fstab should be :

(Device)  (MountPoint) (FsType) (MountOptions)  (Dump) (FsCheck)

So here FsCheck field can take one of the below values :

0 : fsck is disabled

1 : fsck is enabled with more priority ( mainly for root filesystems )

2 : fsck is enabled for other filesystems with less priority.

So you have to choose one of these options.

  • 1
    The manual site die.net states that fsck on xfs returns without doing anything, it does not run xfs_repair. linux.die.net/man/8/fsck.xfs
    – Gerrit
    Mar 21, 2020 at 22:05

No, a positive passno (6th fstab field) is not sufficient. Yes, it still should be 1 for / and 2 otherwise.

Specific to XFS, fsck.xfs by default does not do anything. Journal recovery at mount may get it into a usable state. But if that fails, the system won't boot, usually requiring booting a rescue target to recover.

However, the system administrator can force fsck.xfs to run xfs_repair(8) at boot time by creating a /forcefsck file or booting the system with "fsck.mode=force" on the kernel command line.

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.