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.
When a partition with ext4 filesystem, was filled, and I clean some unnecessary files manually, " df -h " command doesn't show free space and it needs to reboot! why? how fix?
When a partition with ext4 filesystem, was filled, and I clean some unnecessary files manually, " df -h " command doesn't show free space and it needs to reboot! why? how fix?
Thanks :-)
I never faced this issue. Please let us know the OS and its version.
When a partition with ext4 filesystem, was filled, and I clean some unnecessary files manually, " df -h " command doesn't show free space
You might have deleted a file (or files) that was still in use by a running program. If that is the case then the file seems gone (not present in ls output) but the space it takes isn't freed up yet.
The space is freed once you stop or restart the program or, as you have noticed, reboot (which is in essence a restart).
Restart service or program doesn't solve this problem. Some files which was deleted, is log of services!
The main problem is removing a file that is being used (kept open) by a program, which you shouldn't do.
You can do one of two things when you want to remove open file(s):
- stop the program, remove file and then start the program again,
- don't remove the file, but make it empty (> name.of.file instead of rm name.of.file).
I also noticed that restarting a service after removing an open file doesn't always free up the space. A reboot is the only thing you can do to solve that.
I think "stop service, make it empty and start service" is a good solution.
I use making empty for deleting log files always
Thanks.
I check it and notify the result.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.