[SOLVED] No space left on device, but no space used in directories
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Note 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:
So, 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.
Since /var is on another disk, every log in /var/log should be in another disk too.
That is correct, and it's the root (/) partition that is full.
My guess would be /tmp and/or temporary files without a filename that haven't been marked "for remove" yes. Did you do a fsck on the / partition to find any "lost+found" files?
That is correct, and it's the root (/) partition that is full.
My guess would be /tmp and/or temporary files without a filename that haven't been marked "for remove" yes. Did you do a fsck on the / partition to find any "lost+found" files?
I have indeed use a "fsck -f" and it does not find anything. The lost_found directory is empty.
File that does not have a filename? That is interesting. I did not know that those existed. Is it possible to list every file that don't have a filename.
Is it possible to list every file that don't have a filename.
As they do not have a filename, no. They're a pure I-node with data attached, so can only be listed by scanning all I-nodes and eliminating those that are found somewhere in one of the directories. Normally they should have been "marked for delete" too.
The fsck run should have found them and assigned some sort of name, to put them into the lost+found directory (ext? file systems only, I don't know which type of fs your / partition is).
You could do a bind mount to look at the underlying disk, but easier from a liveCD. I'm guessing when you created the new /var you didn't delete all the files on the old /var on the root that can no longer be seen because of the mount.
You could do a bind mount to look at the underlying disk, but easier from a liveCD. I'm guessing when you created the new /var you didn't delete all the files on the old /var on the root that can no longer be seen because of the mount.
As others have already remarked:
could you, in single user level, unmount all other filesystems and then look if any of the mount directories are NON-empty?
The files in those directories are non-visible when the other fs is mounted over them, but still take up space.
As others have already remarked:
could you, in single user level, unmount all other filesystems and then look if any of the mount directories are NON-empty?
The files in those directories are non-visible when the other fs is mounted over them, but still take up space.
No, that is not a good idea. Much better to do a bind mount, see post #9.
It could have worked on the OP's system, as both /usr and /home are in the / fs.
So only /var must be UNmounted and that's not really needed in single user level.
OK: you must be able to login as root in that single user system.
I forgot if he was using one of the ubuntu's or another silly distro that doesn't let you do so.
I'm guessing when you created the new /var you didn't delete all the files on the old /var on the root that can no longer be seen because of the mount.
Wow. Ok. Now I feel bad. You are right. There was old stuff in /var that was using 16Gib of space. I did not check in liveCD because this is a live server with services used by users.
Quote:
Originally Posted by pan64
Much better to do a bind mount.
This is a good trick. I will keep it in mind. Thank you.
And thanks to everyone to have help me. You guys are awesome.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.