SUMMARY: /var full on server

From: Mark Thomas (
Date: Mon May 16 1994 - 11:47:56 CDT

>I'm having problems with a Sparc 2 acting as a server in an engineering dept.
>I'm getting the standard message on the console:
> /var: write failed, file system full
>Here's the appropriate line of the 'df' command:
>/dev/sd2g 282463 254231 0 100% /var
>Here's the du command:
>sona8:/var# du -s *
>1429 adm
>1 crash
>424 etc
>2097 log
>288 lost+found
>6 net
>7 preserve
>10380 spool
>3073 tmp
>715 yp
>sona8:/var# ls -a
>./ crash/ lost+found/ spool/
>../ etc/ net/ tmp/
>adm/ log/ preserve/ yp/
>How does that add up to 254 MB? What's du not reporting?
>How do I find out what's hogging it?


The solution was (quoting from Bryan Curnutt):
"If a process has a file open (for read or write), and someone
uses "rm" to remove the file, the file will be gone from the
directory structure but the disk space won't be freed up until
the process dies or closes the file."

Sure enough, it turned out that a logged-in user was running
xvnews (beware!) and it went crazy, making a 200+ MB file in
/var/tmp. I had deleted the file (which is why du didn't report
it) but xvnews still had an open file descriptor, so the space
wasn't freed up until I killed the process.

You can get a report of all open files using "lsof":
> lsof - list open files
> lsof [ -dhlLnNostTU ] [ -c c ] [ -i i ] [ -k k ] [ -p l ] [
> -u l ] names
> Lsof version 2.16 lists information about files opened by
> processes for the following operating systems:
> AIX 3.2 for the IBM RISC/System 6000
> Dynix 3.0.12 and 3.1.2 for the Sequent Symmetry S81
> EP/IX 1.4.3 for the CDC 4680
> ETAV (SYSV3.1 with Lachman TCP/IP 3.0) for the ETA-10P*
> HP-UX 7.x and 8.x for Hewlett Packard work stations
> IRIX 4.0.5 for the Silicon Graphics Indigo
> NeXTStep 2.1 and 3.0 for the NeXT Work Station
> SunOS 4.1.1, 4.1.2 and 4.1.3
> Lsof was written by Victor A. Abell of the Purdue University
> Computing Center (PUCC), based on the fstat and ofiles pro-
> grams.....
> You should be able to ftp it from:
Thanks to Dave Fetrow for the above tip on lsof.

Other comments made were that du doesn't include . files, but I
didn't have a chance to test that. Many people suggested that I
reboot (wasn't an option for me), or that perhaps an NFS mount
was taking place "over" existing files (wasn't the case).

Thanks to all who responded: (Swee-Chuan Khoo)
Ric Anderson <ric@Artisoft.COM>
Dave Fetrow <>
"A. Bryan Curnutt" <bryan@Stoner.COM>
Claus Assmann <> (Venkat Chalasani) (Brian White)
hoogs@SynOptics.COM (Tim Hoogasian) (vina parikh) (Mark Allyn) (David Warm)
Jerry de Raad <> (George Pallas)
Pat Cain <> (David Weitzel) (Dotty Pon) (Glenn Satchell - Uniq Professional Services) (J. Adams) (Henry Katz) (Tilman Sommer)
epl@Kodak.COM (Gene Loriot (epl@Caps.Kodak.COM.)) (Donald McLachlan) (Patrick Buryk) (Andy Kumeda) (Aaron Cammarata) (Dances on keyboards (Louis Brune)) (Russ Poffenberger)
etnibsd!vsh@uunet.UU.NET (Steve Harris) (Edward F Killian) (Paulo Licio de Geus) (Alek O. Komarnitsky)

Mark Thomas internet:Thomas@Sonatech.COM
Network Analyst AppleLink:Sonatech
Sonatech, Inc. AOL: Hackmaster

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:01 CDT