Skip site navigation (1)Skip section navigation (2)
Date:      09 Jul 2004 10:19:22 +0200
From:      peter@bgnett.no (Peter N. M. Hansteen)
To:        freebsd-questions@freebsd.org
Subject:   Re: disk space question
Message-ID:  <87bripoanp.fsf@tosh.datadok.no>
In-Reply-To: <s0ed5f3a.091@hermes.cwu.edu>
References:  <s0ed5f3a.091@hermes.cwu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Musselman <Andrew@cwu.EDU> writes:

> 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?

Yes. You could copy say, the contents of /usr/local to /mnt, then
replace /usr/local with a symlink to /mnt. Not pretty, should be done
from single user mode only and you'd need somewhere else to mount things
temporarily, but it *will*, sort of, do what you want.

A more permanent solution would be something along the lines of
(assuming there's a usable file system at /mnt)

# cd /usr/local
# tar cf - . | (cd /mnt; tar xvf - 2>/var/tmp/mycopyerrors)
check /var/tmp/mycopyerrors for any errors

( if you're not in single user already, go there NOW )

# mv /usr/local /usr/local.old
# mkdir /usr/local

#vi /etc/fstab 
edit so your new disk gets mounted as /usr/local, save

# reboot

check that your system works ok, when you're certain everything's ok,

# rm -rf /usr/local.old /var/tmp/mycopyerrors

untested, from memory, adjust as needed, and if it kills your puppy, I
will *not* revive it.

- P
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://www.blug.linux.no/rfc1149/	http://www.datadok.no/
"First, we kill all the spammers" The Usenet Bard, "Twice-forwarded tales"



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