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.
In Debian Lenny the system monitor says 59 GB available on /dev/sdb but says only 36 GB free. Where are they other 23 GB and how to free them up for use?
Look at "lsof +L1" to list deleted files. A common method is to open a file (in C) and delete it, but keep the FD number. The directory entry is gone but the program can still use the file because the kernel won't remove the inode until the file is closed. Now if the program crashes, there won't be a stale file. Rebooting will remove these temporary files, or restarting the programs or services that are accessing them.
Other differences could be due to a file being sparse. You didn't mention which was the second tool that said 36GB free.
The filesystem may also have a certain percentage reserved for the root user. As root, this space may be counted as free space while as a regular user it wouldn't be. If this isn't for the root directory or a system directory, you may be able to run a program to adjust this. For ext2/3/4 use the tune2fs program. The intent is to A) reduce fragmentation B) Allow services to run if regular user files fill the filesystem.
Thank you for the answer. I will try your suggestions. It's the system monitor added to the Gnome panel that gives both the available and free amounts, no 2nd tool. This is a secondary disk drive that is used for backup. It is ext3 and only one partition. Does not include any system files (/root, /usr, et al are on the primary drive).
Edit: lsof +L1 shows files only on the primary drive, nothing shown on this drive.
Last edited by canyonbreeze; 02-03-2010 at 11:54 AM.
Found the answer. EXT3 and EXT4 reserve 5% of disk space for root user which is necessary on a boot device (indicated in second post above, thank you). 5% was the exact discrepancy I was seeing. As this is not a boot device I set it to 0% and that freed up the space. Now the free and available are the same.
tunefs -m 0 /dev/sdb
Last edited by canyonbreeze; 02-04-2010 at 09:09 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.