On Mon, Jun 06, 2005 at 01:10:01PM +0800, Jacky Kim wrote:
> >> After some days, I found some mismatch ploblem:
> >>
> >> # df -h
> >> Filesystem Size Used Avail Use% Mounted on
> >> /dev/md/0 699G 93G 607G 14% /vol
> ~~~ ~~~
> It says that 93G(14%) is used, but actually about 1M is used:
> # du --max-depth=1 -m /vol
> 0 /vol/backup
> 0 /vol/database
> 1 /vol
What you are probably seeing here is unlinked but still referenced
files. The space is not freed until the inode is completely
unlinked from the filesystem, and this occurs when the final
reference to the inode goes away.
Seeing as the inode has been unlinked from the directory, a
filesystem traversal such as find or du will not find the inode
and so it will not show up as used space in such a scan.
You can probably use fuser or lsof to see if there are any
userspace processes still holding reference to the files.
Cheers,
Dave.
--
Dave Chinner
R&D Software Engineer
SGI Australian Software Group
|