View previous topic :: View next topic |
Author |
Message |
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
Posted: Wed Oct 10, 2012 4:52 pm Post subject: Server disk space, df not accurate [SOLVED] |
|
|
I recently removed a large file from my server. After doing that, not only did df not show more free space, it showed LESS free space than before I deleted the file.
I don't believe df is showing me anything accurate. What can I do, other than restarting my server, to fix this? I'm open to using something other than df as long as I can get accurate disk space reports.
EDIT:
I just tried df --total. How can rootfs take up 59% and the total be 58%? Does tmpfs (1% here) get subtracted from rootfs for the "total"?
EDIT 2:
df -i shows what I expect: around 25% usage. Why would df -h show me 59% usage? What is df --sync supposed to do (because it appears to do nothing for me)? _________________ decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Last edited by audiodef on Thu Oct 11, 2012 1:39 pm; edited 1 time in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Wed Oct 10, 2012 5:35 pm Post subject: |
|
|
df -i is something else entirely, not about space, but inodes.
df is usually accurate. some things to consider are root reserves (ext* takes 5% of available space by default), hard links (space won't be freed until you deleted all hardlinks to the file), files still in use (space won't be freed until all processes that still use this file end), as well as files hidden by mounting - if you have a big file in /home/bigfile, and then mount another filesystem to /home, then /home/bigfile is hidden but still consumes space.
The only way for df to show a "wrong" value is if the filesystem is inconsistent somehow. Only in this case you need to umount and fsck. In all other cases you'll simply have to figure out what is using the space. Mount it exclusively (mount /dev/yourdevice /mnt/somewhere) so you won't have anything hidden by other mounts there, then check it out with du or whatever. |
|
Back to top |
|
|
audiodef Watchman
Joined: 06 Jul 2005 Posts: 6656 Location: The soundosphere
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|