I am running out of inodes. Only 11% available:
the-foo:~ # df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/system-home 9830400 8702297 1128103 89% /home
Is there a way to solve this without creating and copying to a new partition?
Details:
the-foo:~ # tune2fs -l /dev/mapper/system-home
tune2fs 1.42.6 (21-Sep-2012)
Filesystem volume name: <none>
Last mounted on: /home
Filesystem UUID: 55899b65-15af-437d-ac56-d323c702f305
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 9830400
Block count: 39321600
Reserved block count: 1966080
Free blocks: 22958937
Free inodes: 2706313
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 1014
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8192
Inode blocks per group: 512
Flex block group size: 16
Filesystem created: Tue Jul 8 08:02:22 2014
Last mount time: Sun Apr 24 22:33:00 2016
Last write time: Thu Sep 8 09:18:01 2016
Mount count: 11
Maximum mount count: 10
Last checked: Tue Jul 8 08:02:22 2014
Check interval: 0 (<none>)
Lifetime writes: 349 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
First orphan inode: 2759586
Default directory hash: half_md4
Directory Hash Seed: e4402d28-9b15-46e2-9521-f0e25dfb58d0
Journal backup: inode blocks
Please let me know if more details are needed.
Nope, the number of inodes is fixed when the filesystem is created as the man page says
Mostly no, but in your case you have used LVM and there is a LV (Logical Volume) for home.
If you run
pvdisplay
and look for "free extents" it may be possible runlvexpand
to increase the size of the home LV, and then runresize2fs
Downside is you'll only add inodes at the same rate as the current filesyste already has.
What you need to do is find which directory has a lot of files, and decide if you need them
A 0-byte file will use an inode.
$ ls -la /home drwxr-xr-x 194 criggie criggie 28672 Sep 8 18:13 criggie drwxr-xr-x 2 statler statler 4096 Dec 13 2015 statler drwxr-xr-x 2 wakdorf waldorf 4096 Dec 21 2014 waldorf
Notice the 194 in the second column? This shows there are a lot of inodes in use in that directory.
cd
into that directory and repeat.I suspect you have a temp directory or something with many thousands of small files, which can likely be purged.