opensubscriber
   Find in this group all groups
 
Unknown more information…

j : jfs-discussion@lists.sourceforge.net 18 February 2005 • 11:27PM -0500

Re: [Jfs-discussion] df vs. du, again
by Dave Kleikamp

REPLY TO AUTHOR
 
REPLY TO GROUP



On Fri, 2005-02-18 at 01:05 +0100, Christian wrote:
> hi list,

Hi Christian,
Did you just recently subscribe to the mailing list?  I think you got
caught in the middle of our migration to sourceforge.  The mailing list
just moved to http://lists.sourceforge.net/lists/listinfo/jfs-discussion

> i'm using jfs for my /var partition and although i realize that the "used
> space" shown by df does not always match the output of du [1]. but the
> difference on my partition here is quite large:
>
> root@sheep:~# find /var -maxdepth 1 -mindepth 1 -type d -exec du -sh \
> '{}' \;
>
> 4.7M    /var/backups
> 32M     /var/cache
> 284M    /var/lib
> 137M    /var/local
> 20K     /var/lock
> 577M    /var/log
> 308K    /var/mail
> 72K     /var/opt
> 400K    /var/run
> 26M     /var/spool
> 6.5M    /var/tmp
> 8.0M    /var/www
>
> (which sums up to about 1075MB)
>
> root@sheep:~# df -h /var/
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/sdb2             2.0G  2.0G   17M 100% /var

I agree.  That doesn't add up.  One possibility is that some application
has a file (or some files) open that has been deleted.  The file can't
be freed until the last file descriptor is closed.  I don't know what
could be holding nearly 1 GB of files open.

> root@sheep:~# mount | grep var
> /dev/sdb2 on /var type jfs (rw,noexec,nosuid,nodev,noatime)
> /var/tmp on /tmp type none (rw,noexec,nosuid,nodev,bind,noatime)
>
> as you can see, 2GB space seems to be exhausted, but only half of it seems
> to be used. i'll probably enlarge /var, disk space is pretty cheap thes
> days, but i wonder why the difference is *that* large.
>
> i don't have much experience with jfs yet. i tried it several times (years
> ago, and it always destroyed my data ;)), but now it's pretty stable, no
> hassles so far.
>
> this all is on linux/i386, running debian/unstable, 2.6.11-rc2-bk10.
> i can provide more information if anything is unclear (e.g. output of
> jfs_logdump 1.1.7?)

If you could unmount /var or remount it read-only, running 'fsck -n'
against the partition would tell you if the block maps are messed up.
Unfortunately, it's usually impossible to do this to /var without going
to single-user mode, or booting off some other media.

Rebooting may free something if it is a process with large open files
that are no longer linked to a directory.  Rebooting with "shutdown -F"
will force fsck to fix any problems, although that may be painful if you
have any large partitions.

> thanks,
> Christian.
>
> [1] i assume this is a faq and universal to several filesystems:
> http://batleth.sapienti-sat.org/projects/FAQs/ext3-faq.html
> "Q: 'df' command says partition is full, while 'du' reports free space"
> - --
> BOFH excuse #296:
>
> The hardware bus needs a new token.
--
David Kleikamp
IBM Linux Technology Center



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Jfs-discussion mailing list
Jfs-discussion@list...
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.