How to check disk quota usage on a VPS

Disk quota refers to two things:

  • size of files on the disk
  • number of files on the disk – also called Inodes

Every disk has a limited size and limited inodes.For example, you may have a disk that can hold 500GB of data and 1,000,000,000 files (inodes).

When using shared hosting, these details are displayed easily via cPanel. However, when using a VPS or Dedicated Server, this data may not be displayed readily.

To check your disk usage, follow these steps

1.Login to the server via SSH

2. To check disk size, use the df command as follows

$ df -h

The output will be as follows

The column labelled Use% shows you a quick view of how much of your partition space is used. The lower the number the better.

Size – shows how much size is allocated to a specific file system

Used – shows how much disk space is used up

Avail – shows how much of your total disk is available

3. To check inode/file usage, use the df command as follows

$ df -i

The output will be a follows

The column labelled IUse% shows you a quick view of how much your files quota is used up.

Inodes – shows the total number of files that can be saved on the disk

IUsed – shows how many files you have in the various disk partitions. e.g from the above, my /home partition has 422673 files.

IFree – shows how many more files can be stored on your disk.

Generally, inode limits are rarely reached since not many users store billions of files on their servers. Disk usage on the other hand can be reached quickly hence resulting to errors in applications. It is important to monitor your disk usage from time to time to prevent situations where the disk is as this has ripple effects on your application performance.

Was this article helpful?

Related Articles

Leave A Comment?