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
init 1
unmount the filesystem. This assumes your filesystem is mounted as home.
umount /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
Install Ioncube Loaders In Ubuntu, Debian, CentOS and AlmaLinux
Ioncube Loaders are a piece of software that is used to protect the underlying code in PHP applications. Its aim …
How to install FTP and configure FTP on an Ubuntu 22 LTS instance
If you need to upload files to your NVMe VPS you have a couple of options. You can use a …
How to install a Cloudflare Origin SSL Certificate – NGINX
An SSL Certificate is vital to encrypt data between you and your clients. SSLs can be complicated things. If they …