You are not logged in.
EDIT: The partition i am talking about is sda1, all the command are run with root privileges.
Hello,
I recently run into a problem with my one mount root system. Programs started to report that the disk is full and i found out that the problem was that i run out of inodes.
Here is the df -i report:
Filesystem Inodes IUsed IFree IUse% Mounted on
dev 991K 461 991K 1% /dev
run 992K 574 991K 1% /run
/dev/sda1 1.9M 1.9M 22K 99% /
tmpfs 992K 52 992K 1% /dev/shm
tmpfs 992K 12 992K 1% /sys/fs/cgroup
tmpfs 992K 24 992K 1% /tmp
tmpfs 992K 14 992K 1% /run/user/1000
I have tried to find folders containing many files, but i cannot find enough files to explain the number of inodes reported by the df -i. I have used many scripts that i found googling, and the folder that takes up most of the inodes has 30K inodes.
Summing up all the inodes (by du --inodes) gives me 500K inodes. Can the partition be corrupted?
Thanks in advance.
EDIT 2: The result of "du --inodes -ch -d 0" on the root directory is:
du: cannot access './run/user/1000/gvfs': Permission denied
du: cannot access './proc/3336/task/3336/fd/3': No such file or directory
du: cannot access './proc/3336/task/3336/fdinfo/3': No such file or directory
du: cannot access './proc/3336/fd/4': No such file or directory
du: cannot access './proc/3336/fdinfo/4': No such file or directory
549K .
549K total
Last edited by nickktr (2016-04-16 12:47:01)
Offline
What do you get for inodes total free according to stat?
# stat -f /
File: "/"
ID: fd0a00000000 Namelen: 255 Type: xfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 5240320 Free: 1387095 Available: 1387095
Inodes: Total: 20971520 Free: 20225529
du is not a good way to measure, at the very least you should do it with a bind-mount to avoid the run proc etc. errors you got, and to make hidden files under mounts visible
mkdir /mnt/root
mount --bind / /mnt/root
du ...etc... /mnt/root/
After bind mount run your du and other analysis on /mnt/root/ - don't use the human readable -h option for accurate numbers
Last edited by frostschutz (2016-04-16 11:11:36)
Online
Thank you for your reply and the information you gave me!
I solved my problem, here is what i did:
- I booted from a live usb, i mounted the problematic partition and i searched for folders taking up many inodes (obviously your option is better but it is now that i saw your answer).
- I found out /tmp was taking up all the inodes, that is when i remembered that i was experimenting with the use of tmpfs, so when i disabled it many programs used the /tmp folder but i didn't clear it.
- After some time i re-enabled tmpfs and it was mounted on the /mnt directory that had all the temporary files that i should have deleted.
- And that is what caused the problem! Mounting tmpfs on top of this folder, hid those files!
Now i'm happy at 16% used inodes!
Thanks again for the reply, it's appreciated!
Last edited by nickktr (2016-04-16 11:51:17)
Offline