Thank you to all who replied (too many to mention) >From the FAQ: Subject: 5.10) Where is my disk space? The "du" and "df" commands disagree. If a process is holding open a file, and that file is removed, the space belonging to the file is not freed until the process either exits or closes the file. This space is counted by "df" but not by "du". This often happens in /var/log or /var/adm when a long-running process (e.g. syslog) is holding open a file. In the case of syslog, send it a HUP (e.g. kill -HUP <syslog's process ID>). You can use LSOF (ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof <ftp://ftp.cerias.purdue.edu/pub/tools/unix/sysutils/lsof> ) to find which processes are holding open a particular file. Thanks to Stefan Voss <s dot voss at terradata.de> and Michael R. Zika <zika at oconto dot tamu dot edu> Under Solaris 2.6 and later, files which have been unlinked can still be accessed through the /proc interface. If a process is holding open such a file for writing, but it's inconvenient or impractical to kill the process or get it to close the file, you can free up the disk space by truncating (not removing) the file from under /proc; e.g., # cd /proc/1234/fd # ls -l c--------- 1 root 24, 12 Jan 1 11:33 0 c--------- 1 root 24, 12 Jan 1 11:33 1 c--------- 1 root 24, 12 Jan 1 11:33 2 --w------- 1 root 314159265 Jan 1 11:37 3 # : > 3 # ls -l c--------- 1 root 24, 12 Jan 1 11:33 0 c--------- 1 root 24, 12 Jan 1 11:33 1 c--------- 1 root 24, 12 Jan 1 11:33 2 --w------- 1 root 0 Jan 1 11:38 3 Thanks to Dan Astoorian <djast at cs dot toronto dot edu> Brian Poole <raj at cerias dot purdue dot edu> writes: Another possible cause of df & du disagreeing is if the files are being 'hidden' under a mount. I ran into this recently where I had a large number of files in /tmp (from adding patches in single user mode) that were on the root partition. Thus when I was looking for them in multiuser mode, I couldn't find them because of the tmpfs overlay. I exported the root partition via NFS and upon mounting it found the hidden files and deleted them. > -----Original Message----- > From: Loris Serena > Sent: 30 November 2005 12:54 > To: sunmanagers@sunmanagers.org > Subject: Discrepancies between "df" and "du" outputs > > Hello Managers, > > On a Production V240 running Solaris 9 I came across the following: > > > [itl-app2]/app1$ df > <snip> > /dev/md/dsk/d116 7.0G 6.4G 555M 93% /app1 > > [itl-app2]/app1$ du -sk . > 1432714 . > > Am I missing something here or is there a reason why df reports 6.4Gb > while du only reports 1.4Gb? > And more important, how do I get those missing 5Gb back in df? > > Thanks in advance for your help > > Loris > > > > > > BT Communications Ireland Limited is a wholly owned subsidiary of BT Group plc Registered in Ireland, Registration No. 141524 Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland This electronic message contains information (and may contain files) from BT Communications Ireland Limited which may be privileged or confidential. The information is intended to be for the sole use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information and or files is prohibited. If you have received this electronic message in error, please notify us by telephone or email (to the numbers or address above) immediately. http://www.btireland.ie _______________________________________________ sunmanagers mailing list sunmanagers@sunmanagers.org http://www.sunmanagers.org/mailman/listinfo/sunmanagersReceived on Wed Nov 30 09:43:18 2005
This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:53 EST