Oct 032012
 

OK, let’s compare the two snapshots, one taken today, the other taken on Monday.

[dan@ngaio:/usr] $ sudo du -c -d 1 .
Password:
4       ./.snap
62760   ./bin
37520   ./include
93068   ./lib
184     ./libdata
35384   ./libexec
75109696        ./local
37708   ./sbin
102480  ./share
1103840 ./src
250268  ./compat
376     ./games
4       ./obj
71082728        ./home
3584112 ./ports
4       ./tmp
18287800        ./websites
4       ./bacula-restores
1335104 ./FreshPorts
21599028        ./samba_mounts
58065982        ./jails
250788058       .
250788058       total
[dan@ngaio:/usr] $
[dan@ngaio:/usr] $ sudo do du -c -d 1 .
Password:
4       ./.snap
62760   ./bin
37520   ./include
93068   ./lib
184     ./libdata
35384   ./libexec
75122352        ./local
37708   ./sbin
102480  ./share
1103840 ./src
250268  ./compat
376     ./games
4       ./obj
69616808        ./home
3584112 ./ports
4       ./tmp
18296420        ./websites
4       ./bacula-restores
1335104 ./FreshPorts
21598740        ./samba_mounts
59385950        ./jails
250663094       .
250663094       total
[dan@ngaio:/usr] $

The main differences are:

  1. local: went from 75109696 to 75122352 (an increase of not much at all)
  2. home: from 71082728 to 69616808 (a decrease of 1465920, but not much)
  3. websites: from 18287800 to 18296420 (a change of 8620, nothing there)
  4. samba_mounts: from 21599028 to (288, nothing!)
  5. jails: from 58065982 to 59385950 (1319968… now we’re talking!)

Now I think I know what was happening. There is only one jail on this system and it runs a Bacula installation which I use for testing. I left it running. So it was running daily backups. Let’s go see how much disk space is being used by that.

[dan@ngaio:/usr/jails/ducky.unixathome.org/tmp] $ ls -lh
total 23019758
-rw-r-----  1 bacula  wheel   219B Jul 27 17:51 Test001
-rw-r-----  1 bacula  wheel   221B Jul 27 18:04 Test3000
-rw-r-----  1 bacula  wheel   221B Jul 27 18:05 Test3001
-rw-r-----  1 bacula  wheel    22G Oct  1 23:14 Test3003
drwxr-x--x  3 root    wheel   512B Aug 14  2010 bacula-restores
srwxrwxrwx  1 mysql   wheel     0B Mar  3  2011 mysql.sock
-rw-------  1 root    wheel     6B Sep 16  2010 portlicenses.rTIDwH1a
drwxr-xr-x  4 root    wheel   512B Mar  3  2012 screens
drwx------  2 dan     wheel   512B Nov 20  2009 ssh-xP95yfWAyW
[dan@ngaio:/usr/jails/ducky.unixathome.org/tmp] $

Ouch, I see a 22G file there. We don’t need that.

Dealing with that file appropriately with respect to Bacula is outside the scope of this post. But you purge the volume, then let it get recycled and it frees up the space when that volume is next used in a backup job. NOTE: Volume in this context refers to the file Test3003.

If I hadn’t realized right away that my rogue Bacula testing was responsible, I would have repeated my du on /usr/jails/ a couple of days apart to see what was eating up the disk space.

Now my free disk space looks much better:

$ df -h /usr
Filesystem       Size    Used   Avail Capacity  Mounted on
/dev/twed0s1g    138G     96G     31G    76%    /usr