FSCK, what is it? and what does it do to my VPS or Dedicated Server
FSCK is the Linux file system checker, it stands for file system consistency check and runs on all Linux systems including Macs. Windows has the same system. It’s called CHKDSK. These will check your filesystem for any errors and fix them as appropriate.
It’s recommended to run this utility when you update your Kernel as the drive has to be unmounted to be scanned. When you update your Kernel you should always reboot your server so this is the ideal time to run FSCK.
Linux demands the utility is run if certain conditions are met;
- The filesystem is marked as “dirty” which means the data written to the filesystem does not match what was meant to be written
- When the filesystem has been mounted a certain number of times without FSCK being run
Running a disk check
By running an FSCK you will tell the server to;
- Look for errors, and prompt for user interactively to decide how to resolve individual problems;
- Check for errors, then attempt to fix any errors automatically without any intervention from the user
- Check for errors, but make no attempt to repair them, but display the errors on the output so the user can manually review them.
You should never run the FSCK utility on a mounted filesystem. To run the utility first unmount the system. Drop into single-user mode
unmount the filesystem. This assumes your filesystem is mounted as home.
Now you can check the system for any errors and fix them automatically. This assumes your drive is sda2, which most of our users should be using
fsck -y /dev/sda2
Finally, reboot the server once the disk check has been completed.
How was this article? – FSCK, what is it? and what does it do to my VPS or Dedicated Server
More from All About Linux
Ioncube Loaders are a piece of software that is used to protect the underlying code in PHP applications. Its aim …