df shows you how much data you can write to an fs, while du shows the
disk usage of files it can find.  If it can't find a file (because
it's been deleted), it won't account for it.  But if it's been deleted
and still held open by some process, it would still consume disk
space.

So it looks like a process has a file open on the root filesystem that
has been deleted.  You're looking for a root-owned process that is
(probably) long-running.  My guess the file is in /dev/ (that's my
crystal ball talking though).

Easiest way out is generally to reboot - this stops all processes
(d0h), dus freeing up all the resources they had tied up, including
files that had been deleted from the filesystem.  But going through
your process list to see if you can spot something that may have done
this can be a good learning experience.  In general, base OpenBSD
daemons don't behave this way.

Cheers,

Paul 'WEiRD' de Weerd

On Tue, Aug 03, 2021 at 12:48:42AM -0700, Greg Thomas wrote:
| grits# df -h
| Filesystem     Size    Used   Avail Capacity  Mounted on
| /dev/sd0a      986M    936M    162K   100%    /
| /dev/sd0k     57.7G   23.7G   31.1G    43%    /home
| /dev/sd0d      3.9G   10.0K    3.7G     0%    /tmp
| /dev/sd0f      5.8G    1.1G    4.4G    21%    /usr
| /dev/sd0g      986M    234M    702M    25%    /usr/X11R6
| /dev/sd0h     16.8G   35.5M   15.9G     0%    /usr/local
| /dev/sd0j      5.8G    2.0K    5.5G     0%    /usr/obj
| /dev/sd0i      1.9G    2.0K    1.8G     0%    /usr/src
| /dev/sd0e     13.8G   18.8M   13.1G     0%    /var
| /dev/sd1c      440G    305G    113G    73%    /backup
| 
| grits# du -xsh /
| 186M    /
| 
| I just removed /bsd.sp to free up a little bit of space but I don't
| understand the discrepancy between df and du.  How do I troubleshoot
| further?
| 
| Thanks,
| Greg

-- 
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/                 

Reply via email to