File System Check, is a tool used to check and repair one or more Linux file systems. Fsck is best used when a device is receiving I/O errors. Alternatively, one can use it to just check the file system as a precaution

You can use the -A option to automatically start checking all file systems withing the fstab. However, if no option is specified then fsck will automatically begin checking all files systems listed in /etc/fstab.  Also, the -A option is the same as using -As.

If only one file system needs to be checked, a -t option can be used followed by the file system that needs to be checked.

Lets say some errors did occer,  you can use -a to automatically repair the file system. You can also use -r to interactivly repair the filesystem. But keep in mind, using the -r option isnt a smart idea what when multiple fscks are being run.

Error Codes
0 = No errors
1 = File system errors corrected
2 = System should be rebooted
4 = File system errors uncorrected
8 = Operational error
16 = Usage or syntax error
32 = Fsck cancled by user requested
128 = Shared library error

Of course, if these basic options do not solve the issue visit the man page for more options.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s