RootConsole.net

advices, tips, blog

  • Home

How to find where inodes are being used?

Posted by Admin on November 23, 2017
Posted in: Shell, Storage. Tagged: df, inodes, no space left on device.

I’m guessing that every Linux admin saw this alarming message: “No space left on device”. First thing you are doing is check disk usage of course:

# df -h
 Filesystem              Size  Used Avail Use% Mounted on
 /dev/mapper/vg-lv_root   18G   13G  3.4G  80% /

What is going on? There is a lot of free space! Then you are checking free inodes:

# df -i
 Filesystem              Inodes  IUsed  IFree IUse% Mounted on
 /dev/mapper/vg-lv_root 1135680 1135680 0   100% /

All inodes on ‘/dev/mapper/vg-lv’ are used! How to find where inodes are being used? To complete this task we need to use find command.

# find / -printf "%h\n" | sort | uniq -c | sort -nr | head

This command invoked as a root user displays top ten directories with the largest number of files and directories inside (and the largest number of used inodes).

Posts navigation

← How to save Screen layout?
How to shelve or unshelve all Openstack instances at once? →
  • or
    BTC
    1BLAWYYBP9ZGUwsJigtqW7JWLoaFFfZhMp
  • Contact

Proudly powered by WordPress Theme: Parament by Automattic.