Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Aug 2004 13:50:57 -0400 (EDT)
From:      Jerry McAllister <jerrymc@clunix.cl.msu.edu>
To:        boxend@redtick.homeunix.com (Mark)
Cc:        freebsd-questions@freebsd.org
Subject:   Re: linking
Message-ID:  <200408101750.i7AHowN00494@clunix.cl.msu.edu>
In-Reply-To: <200408101500.i7AF0FnR029952@redtick.homeunix.com> from "Mark" at Aug 10, 2004 10:00:15 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> My /usr has grown short of room, so noobie question, will " ln -s /muz/newusr /usr" allow the system to use the new space or must I do something else?? This is a 5.2rc1 box in need of updating. =) 

Well, yes, sort of.  It won't just add the space to the current space.
You would have to move the current /usr filesystem over to that
filesystem and then make a link to it.  Then the new space would
replace the previous space as where /usr lives.

Possibly a better way to deal with it is to pull out a couple of the
larger directory trees in /usr and move them to the new space and
link them.   Some good candidates might be /usr/local, /usr/src and/or
 /usr/ports.  If you have put users home directories in there, in 
someplace such as /usr/home, then that might also be a good one to move.

You can check space usage for directory trees with  du(1)
  cd /usr
  du -sk *

Say you want to move /usr/local to live in /muz, where you have scads of
space.   Do the following.
  (I have my own naming convention that helps me keep track of things
   you can name things as you like - but try to be mnemonic).

  cd /usr/local
  tar cvf /muz/local.tar
  cd /muz
  mkdir usr.local
  cd usr.local
  tar xvf ../local.tar
  cd /usr
  mv local local.old
  ln -s /muz/usr.local local
Now go check and make sure you got things right - do   cd /usr/local
and look around and make sure stuff is there.   a pwd should show
you to be in /muz/usr.local when you to cd /usr/local. 
Then clean up.
  cd /usr/local
  pwd             (just to check and be sure it is /muz/usr.local)
  rm local.tar
  cd /usr
  rm -rf local.old
voila, you just freed up the /usr/local space from /usr and put it in /muz

Do the same for /usr/ports and whatever else makes sense.

////jerry




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