No space left on device, but no space used in directories
by tioui from LinuxQuestions.org on (#531PK)
Hello everyone.
I have a strange problem on my server. When I looked at my discs usage, I get this:
Code:# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 386M 5.6M 381M 2% /run
/dev/sda1 20G 19G 0 100% /
tmpfs 1.9G 8.0K 1.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sdb1 196G 103G 84G 56% /varSo, as you can see, the root partition is used at 100% with over 19Gib used. So I use ncdu to scan the disc to see where the files are. I got this:
Code: 102.8 GiB [##########] /var
2.7 GiB [ ] /usr
422.1 MiB [ ] /lib
101.0 MiB [ ] /root
60.9 MiB [ ] /boot
43.2 MiB [ ] /opt
8.3 MiB [ ] /bin
7.3 MiB [ ] /etc
6.0 MiB [ ] /sbin
5.5 MiB [ ] /run
104.0 KiB [ ] /home
60.0 KiB [ ] /tmp
8.0 KiB [ ] /media
8.0 KiB [ ] /mnt
4.0 KiB [ ] /dev
4.0 KiB [ ] /lib64
e 4.0 KiB [ ] /srv
e 4.0 KiB [ ] /lost+found
. 0.0 B [ ] /proc
0.0 B [ ] /sys
@ 0.0 B [ ] initrd.img
@ 0.0 B [ ] initrd.img.old
@ 0.0 B [ ] vmlinuz
@ 0.0 B [ ] vmlinuz.oldNote that the var directory is on another disc. It seems that there is only like 3GiB used on the system. I tried rebooting the server and doing a "fsck -f" on the partition. I have looked on google and the two reasons this could happen does not seems to fit here. The first is some processes could be reserving deleted files. But since I reboot the system, they should have been deleted for good (well I presume). The other reason is the file system could be missing inodes. But when I do a "df -i", I seems to have plenty of inodes left:
Code:# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 491108 323 490785 1% /dev
tmpfs 494071 464 493607 1% /run
/dev/sda1 1280000 234484 1045516 19% /
tmpfs 494071 3 494068 1% /dev/shm
tmpfs 494071 3 494068 1% /run/lock
tmpfs 494071 15 494056 1% /sys/fs/cgroup
/dev/sdb1 13107200 275017 12832183 3% /varSo, I am out of idea. The next thing I can do is reinstall, but it is quite a pain. If someone can help me so that I don't have to reinstall the server, I would be very grateful.
Thanks.
Louis M


I have a strange problem on my server. When I looked at my discs usage, I get this:
Code:# df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 386M 5.6M 381M 2% /run
/dev/sda1 20G 19G 0 100% /
tmpfs 1.9G 8.0K 1.9G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
/dev/sdb1 196G 103G 84G 56% /varSo, as you can see, the root partition is used at 100% with over 19Gib used. So I use ncdu to scan the disc to see where the files are. I got this:
Code: 102.8 GiB [##########] /var
2.7 GiB [ ] /usr
422.1 MiB [ ] /lib
101.0 MiB [ ] /root
60.9 MiB [ ] /boot
43.2 MiB [ ] /opt
8.3 MiB [ ] /bin
7.3 MiB [ ] /etc
6.0 MiB [ ] /sbin
5.5 MiB [ ] /run
104.0 KiB [ ] /home
60.0 KiB [ ] /tmp
8.0 KiB [ ] /media
8.0 KiB [ ] /mnt
4.0 KiB [ ] /dev
4.0 KiB [ ] /lib64
e 4.0 KiB [ ] /srv
e 4.0 KiB [ ] /lost+found
. 0.0 B [ ] /proc
0.0 B [ ] /sys
@ 0.0 B [ ] initrd.img
@ 0.0 B [ ] initrd.img.old
@ 0.0 B [ ] vmlinuz
@ 0.0 B [ ] vmlinuz.oldNote that the var directory is on another disc. It seems that there is only like 3GiB used on the system. I tried rebooting the server and doing a "fsck -f" on the partition. I have looked on google and the two reasons this could happen does not seems to fit here. The first is some processes could be reserving deleted files. But since I reboot the system, they should have been deleted for good (well I presume). The other reason is the file system could be missing inodes. But when I do a "df -i", I seems to have plenty of inodes left:
Code:# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 491108 323 490785 1% /dev
tmpfs 494071 464 493607 1% /run
/dev/sda1 1280000 234484 1045516 19% /
tmpfs 494071 3 494068 1% /dev/shm
tmpfs 494071 3 494068 1% /run/lock
tmpfs 494071 15 494056 1% /sys/fs/cgroup
/dev/sdb1 13107200 275017 12832183 3% /varSo, I am out of idea. The next thing I can do is reinstall, but it is quite a pain. If someone can help me so that I don't have to reinstall the server, I would be very grateful.
Thanks.
Louis M