Subject: Re: need room on /
To: James K. Lowden <jklowden@schemamania.org>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-help
Date: 02/07/2003 11:52:15
>$ df -k;  pwd; ls  |grep -Ev 'usr|mnt' |xargs sudo du -xskc |sort -rn 
>Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
>/dev/wd0a       84327    78768     1342    98%    /
>/dev/wd0e     9319453  5742359  3111121    64%    /usr
>/dev/wd0f     9904956  1605674  7804034    17%    /usr/local/play
>kernfs              1        1        0   100%    /kern
>/dev/wd1e     9319453  5745232  3108248    64%    /mnt
>/
>14660   total
>6304    sbin
>3393    bin
>...

as others have noted, you seem be missing a shunk of space.  try this
instead?

	sudo du -kx / | grep -v '/.*/' | sort -rn

that should show you more easily what the space usage on your / is.
or try "lsof +L1".  that will show you all open files with a link
count of less than one.

>I'm getting ready to repartition the disk as part of moving to 1.6, and
>I've developed the opinion that small roots are a pain in the neck.  If
>you were looking at this, how big would you make 'a'?  
>
>$ disklabel wd0
># /dev/rwd0d:
>...
>8 partitions:
>#        size   offset     fstype   [fsize bsize   cpg]
>  a:   174321       63     4.2BSD     1024  8192    16
>  b:   264096   174384       swap                     
>  c: 40188897       63     unused        0     0      
>  d: 40188960        0     unused        0     0      
>  e: 19269936   438480     4.2BSD     1024  8192    16
>  f: 20480544 19708416     4.2BSD     1024  8192    16

that's, /, /usr, and /usr/local/play, eh?  i'd probably carve a piece
off each of the larger ones (to make / bigger and to make a separate
/var) and make it look like this, while still keeping much of the same
layout you already had.

a:   1023057       63 /
b:    262080  1023120 swap
c:  40188897       63 (unused)
d:  40188960        0 (unused)
e:  18423216  1285200 /usr
f:  18431280 19708416 /usr/local/play
g:   2047248 38139696 /var

from the looks things, if you *really* wanted to, you could kill some
time moving to this layout right now.

step  1: reboot single user from a rescue floppy
step  2: dump / and /usr to /usr/local/play (looks like it'll fit)
step  3: unmount everything
step  4: adjust a, b, and e in the disklabel and newfs a and e
step  5: remount and restore from /usr/local/play
step  6: dump /usr/local/play to /usr (also looks like will fit)
step  7: unmount /usr/local/play
step  8: adjust f and create g in the label and newfs them
step  9: remount and restore /usr/local/play
step 10: mount and populate your new /var

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."