LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Missing Diskspace (https://www.linuxquestions.org/questions/linux-general-1/missing-diskspace-786713/)

canyonbreeze 02-03-2010 11:12 AM

Missing Diskspace
 
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?

jschiwal 02-03-2010 11:33 AM

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.

canyonbreeze 02-03-2010 11:51 AM

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.

chrism01 02-03-2010 07:09 PM

Try

df -k

and

du -k | sort -nk1

see also the various options for du http://linux.die.net/man/1/du

canyonbreeze 02-04-2010 09:08 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


All times are GMT -5. The time now is 03:41 AM.