Ultimate Web Tips
your Wordpress, jQuery, PHP, MySQL, Linux and CSS guide to a successful website
Read more:

March 2nd, 2012

Disk quota exceeded error in Linux

Linux, by Joakim Ling.

Index-node (inode) is a data structureAll of your services have disk storage space allocated to you. When you fill your disk storage space, you will receive a notification message “Disk quota exceeded” when you try to perform operations, such as storing cache files or sending email. Even if you have free space left on your disk, doesn’t say that you have space to add new files.

Disk quota exceeded

This is the message we’ll get when trying to create a file, even if it’s empty

# touch empty_file
touch: cannot touch `empty_file': Disk quota exceeded

Check free space

Use the command df – report file system disk space usage

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/simfs             10G  8.3G  1.8G  83% /
none                  1.0G  8.0K  1.0G   1% /dev

Looks like we have a lot of free space, so why can’t we use it?

Inodes

Index-node (inode) is a data structure on a traditional Unix-style file system such as UFS. An inode stores all the information about a regular file, directory, or other file system object, except its data and name.

To check if you’ve any inodes left on your disk

# df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/simfs            300000  299998       2  100% /
none                  262144     139  262005    1% /dev

As you see we only have 2 left, to sort this out you can either add more disk storage or delete files.

How many inodes a folder use

To search for which folder takes up all your inodes use the following script

# find . -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n

Linux training

If you need to improve your skills try my linux training guide, read more

Back Top

Club World Casinos
  • Boosm

    thanks for the script, found out that a cron job filling my nodes

  • Artur

    Thanks!