Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jul 2004 18:14:40 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        Andrew@cwu.EDU (Andrew Musselman)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: disk space question
Message-ID:  <200407082214.i68MEkR27964@clunix.cl.msu.edu>
In-Reply-To: <s0ed5f3a.091@hermes.cwu.edu> from "Andrew Musselman" at Jul 08, 2004 02:50:03 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Hi again--
> 
> I'm stumped on this problem, and I'm sure lots of people have
> encountered the same thing:
> 
> I would like more space in /usr.  I've installed another drive and set
> it to mount to /mnt.  I would like to make FreeBSD(5.2.1) think that
> /usr also includes this new drive.
> 
> Is there a way to do what I want to do?

Maybe, but you don't really want to do quite what you said.
What you need to do is move some of the things in /usr to the
new partition that you currently have mounted on /mnt and then
create a symlink to it.   

I would suggest that you move /usr/ports and /usr/local and
maybe /usr/src.

I would also suggest you might want to think of another name to
mount the extra disk on.  The only reason is /mnt is often used
as a sort of temporary mount point and this will, no doubt be a
more permanent mount.   I tend to usr /work, but others have 
their own favorites.

So, basically, tar up the stuff, untar it in the new place and
create the symlink, check it out.  Then rm the old stuff.

for /usr/ports  for example, using your /mnt mount point.

cd /usr/ports
tar cvf /mnt/ports.tar *
cd /mnt
mkdir usr.ports
cd usr.ports
tar xvf ../ports.tar
cd /usr
mv ports ports.old
ln -s /mnt/usr.ports ports
  Check everything out to make sure you did it right
cd /usr
rm -rf ports.old 
cd /mnt
rm ports.tar

voila it is in the new space.

Do the same for other big directories.
use du(1) do check for big ones.
cd /usr
du -sk *

////jerry

> 
> Thanks,
> Andrew
> 
> Andrew Musselman
> andrew@cwu.edu
> (509) 963-2995
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407082214.i68MEkR27964>