Date: Wed, 3 Oct 2007 01:04:05 +1000 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Zbigniew Szalbot <zszalbot@gmail.com> Cc: freebsd-questions@freebsd.org, Duane Hill <d.hill@yournetplus.com> Subject: Re: determining the space used in / partition Message-ID: <Pine.BSF.3.96.1071002235035.25264A-100000@gaia.nimnet.asn.au> In-Reply-To: <20071002060315.9EEC516A4DF@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2 Oct 2007 08:03:00 +0200 Zbigniew Szalbot <zszalbot@gmail.com> wrote: > 2007/10/2, Duane Hill <d.hill@yournetplus.com>: > > On Tue, 2 Oct 2007 at 07:36 +0200, zszalbot@gmail.com confabulated: [..] > > > For the record. During the backup, the file system is dumped to a dir > > > on a USB drive called backup. Now, since the drive was unavailable, > > > the dump utility created /backup dir and populated it with > > > lists-var-l0-2007-09-30.dump.bz2 (dumping var) but of course it died > > > as there was not enough space on the / to do it. I mean this is what I > > > make of this. > > > > > > So after deleting /backup I get: > > > df > > > Filesystem 1K-blocks Used Avail Capacity Mounted on > > > /dev/ad0s1a 198126 74084 108192 41% / > > > devfs 1 1 0 100% /dev > > > /dev/ad0s1e 44511308 4217760 36732644 10% /usr > > > /dev/ad0s1d 30462636 3210650 24814976 11% /var > > > devfs 1 1 0 100% /var/named/dev > > > /dev/da0s1c 75685352 34308200 35322324 49% /mnt/usbck > > > > I'm still learning about all the little details about the workings of > > dump myself. It would seem to me, you are dumping to /backup which is the > > mount point for the USB device. Would that hold true? > > I dump to /mnt/usbck/backup. Since backup dir was not present, the > script created it under / Naughty script. It should check against doing something like that, eg [ ! -d $backupdir ] && echo "no $backupdir - not mounted?" && exit 1 You do have a very small root filesystem for the size of your disk, so similar disasters may need some preventing. Something will want to use more than 100M in /tmp sometime, so you may want to symlink /tmp to say /usr/tmp if you haven't already. Re hunting for 'missing' diskspace on / (or any other mounted fs), the -x switch prevents du from crossing mountpoints, so something like .. # du -x -d1 / | sort -rn 146341 / 72306 /boot 49252 /root 7262 /rescue 4062 /sbin 3278 /lib 2356 /stand 2266 /etc 2114 /etc.old 2112 /etc.old.0 984 /bin 282 /libexec 8 /flash 2 /var 2 /usr 2 /usbdsk [..] .. takes next to no time on a small /. Cheers, Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.1071002235035.25264A-100000>