Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2012
Disk Space Issue on Linux Server.
One of the file system is showing used as 51GB ,But actually it has used only 11G . What could be the problem ?
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/os-root 7.8G 5.0G 2.4G 69% /
/dev/mapper/os-var 7.8G 588M 6.8G 8% /var
59G 51G 4.2G 93% /export
/dev/mapper/data-cdr 303G 2.2G 286G 1% /cdr
/dev/sda1 99M 17M 78M 18% /boot
tmpfs 12G 0 12G 0% /dev/shm
What could be the problem ?
How to resolve this issue ?
Can anybody help me with the steps.
/export is used by Application and showing 93% used.
Actually space used by /export is :
Total 11G only used.
- Join Date
- Apr 2012
df and du report on different things
that is the difference between disk usage (du) and free blocks displayer (df)
if a file makes use of 2KB of 1 MB block
du will display that the file had used only 2KB
but df would display that 1 MB had been used as its displaying only the free blocks available,
even if 1 byte is used in 1MB free block, the free block is no more a free block and its used.
- Join Date
- Jun 2012
- SF Bay area
In addition to what manyrootsofallevil noted, here's a couple other things to consider. If there were files that you (or someone else deleted) but some process still has them open, the disk blocks will still be in use. So if there was some application writing to a log file that was 10G and you deleted the file, the space will not be returned to the filesystem until the application process terminates. And I don't think "du" will include that 10G worth of space in it's summary. But "df" will definitely know the space it not in the free pool.
To find out if something like that is going on, you can use "fuser" or "lsof" to check. I'm more familiar with "fuser" so I'll describe that. It's crude by comparison to "lsof" but it's sufficient to tell what's going on most of the time. Just run "fuser -v /export" and look for any process listed with the "f" or "F" in the "ACCESS" column. Those are processes with open files on the "/export" filesystem. If any of the ones with open files might be holding open large files, then you might have to end those processes before the space will be available (assuming someone deleted the files already).
And the best way to make sure the filesystem isn't holding open but deleted files is to unmount it then remount it.