linking
Jerry McAllister
jerrymc at clunix.cl.msu.edu
Tue Aug 10 10:51:06 PDT 2004
>
> 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
More information about the freebsd-questions
mailing list