Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I have a 500GB external HD mounted @ /media/backuphdd. I deleted everything on it with "sudo rm -rf /media/backuphdd/*".
df still shows 223GB being used:
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 451G 223G 205G 53% /media/backuphdd
du shows 68kb being used:
68K /media/backuphdd/
I have remounted, and rebooted. Why can't I reclaim this space?
Also, there is one tiny file on the hdd that I couldn't delete because of a "stale NFS file handle". I don't really care about that file, and am not looking for a solution to that problem, but I wanted to include that info for completeness.
That is what I will eventually do if I can't find a solution. But what if I was not trying to delete everything, just a couple large files. I wouldn't turn to reformatting as a solution because I have a bunch of other files on the drive that I want.
I could have reformatted by now, but it really bugs me that something as simple as rm -rf * is not removing all the files. There absolutely has to be a solution to this other than reformatting. rm is so fundamental.
The disk space is not free unless all programs with open files on the disk close them. If you're using NFS maybe that's the problem? If not, lsof can identify which program. I would try unmount and mount again.
It was corrupted. I ran fsck to fix everything and when it was done I had a lost+found folder full of 250GB of stuff. Deleted it and df was reporting the correct usage of 0%. Thanks for the help.
Are you just hitting the power button to shut it off, or smashing reset to boot to Windows, or are you going through a Linux power down cycle? I ask, because the last time I saw that much corruption was due to not shutting down properly.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.