l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2004 Sep 21 22:03

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
[vox-tech] solved puzzle: free du and df disagree about free diskspace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vox-tech] solved puzzle: free du and df disagree about free diskspace

romana:/var$ sudo du -hcs *
2.6M    backups
24M     cache
12K     dhcp
4.0K    games
114M    lib
116K    list
4.0K    local
4.0K    lock
793M    log
0       mail
52M     public_html
104K    run
4.0K    scratch
33M     spool
16K     state
296K    tmp
1017M   total

romana:/var$ sudo df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             1.4G  1.3G   65M  96% /
/dev/sda5             2.4G  2.3G     0 100% /var

As you can see from these transcripts, 'du' told me that I had used less than 1
GB on this machine's /var, but according to 'df' there was still no free space.
I looked for invisible files (using "find -name '.?*'") but found less than
400K of those. The next likely possibility was: unliked files still open by
running processes, which the kernel therefore had not freed.

So, I stopped all daemons, including sysklogd. Bingo! The missing 1.3G of free
space appeared. It turned out to be the fault of some large deleted logfiles
that were still open.

Moral: run logrotate and restart daemons every few weeks to keep logfiles from
growing unreasonably large. I am curious how others (such as professional
sysadmins) keep machines from running out of disk space. How, for example, do
the K12LTSP users in Hawai'i keep logs from filling up their disks? Full
filesystems seem to be one of the most common causes of downtime for Linux

Henry House
Please don't send me HTML mail! My mail system will reject it.
The unintelligible text that may follow is a digital signature.
See <http://hajhouse.org/pgp> to find out how to use it.
My OpenPGP key: <http://hajhouse.org/hajhouse.asc>.

Attachment: signature.asc
Description: Digital signature

vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.