Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Dec 2008 17:20:15 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Gary Hartl <ghartl@gmail.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: mounting /usr/local on separate drive
Message-ID:  <20081210222015.GC37407@gizmo.acns.msu.edu>
In-Reply-To: <000001c95b13$378418c0$a68c4a40$@com>
References:  <000001c95b13$378418c0$a68c4a40$@com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 10, 2008 at 05:04:03PM -0500, Gary Hartl wrote:

> Hi all;
> 
> Ok i'm working on this netra here.
> 
> There are a couple of annoying things about these things and one of em is
> that you can only have a single drive on either IDE controller (masters only
> no slaves allowed).
> 
> So my goal was to have two 20g drives on this machine one of them being
> dedicated to /usr/local
> 
> Since I can only have one single HDD, hooked up during install everything
> gets installed on a single drive.
> 
> I'm wondering if it is possible to move /usr/local to the second drive in
> some post installation method, 
> 
> Once i have the disk prepared with a ufs file system, is it just as simple
> as editing /etc/fstab and moving it over.  Or is it slightly more
> complicated since /usr/local has important stuff in it.

Yup.   That is it.
Remember that the mount point and the partition are two very different
things and have no relationship with each other except when that
partition is mounted on that mount point.

You can remount almost anything anywhere as long as it isn't being
used at the moment (so root is a little difficult).

By the way, /usr/local does not have 'important' stuff on it by default.
It is only what you put there.    A standard installation, before ports
and other extras are added, puts nothing in /usr/local.  You do not
need to create a separate file system for /usr/local if you don't want to.

If you want to add a lot of stuff to a filesystem you call /usr/local
after a fresh install, I would suggest you just do the install without
any /usr/local and then create it first thing after the initial install
and put it in /etc/fstab.    At that point you shouldn't have anything
to move over there.   Just fdisk, bsdlabel and newfs it and then mount it
and start using it.   

If you manage to write some stuff in /usr/local before creating the
new partition, then mounting it on the /usr/local mount point will
cover that stuff up.   To copy it, you will need to mount the
new partition on something else - say /junk - and copy stuff to it
and then clean it out (just to reduce confusion, the system won't care)
and then remount the new partition as /usr/local from /junk.

////jerry    
> 
> I'm doing this from a fresh install, so no extra packages are being added
> yet.
> 
> Thanks 
> 
> Gary 
> 
> 
> _______________________________________________
> 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?20081210222015.GC37407>