Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 May 2000 23:36:43 -0600
From:      Chris Fedde <chris@fedde.littleton.co.us>
To:        Annelise Anderson <andrsn@andrsn.stanford.edu>
Cc:        Greg Lehey <grog@lemis.com>, Peter McGarvey <Peter.McGarvey@telinco.net>, FREEBSD-Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: BSD Theology: swap, /var, /tmp and /usr/tmp 
Message-ID:  <200005030536.e435ahr18663@fedde.littleton.co.us>
In-Reply-To: <Pine.BSF.4.10.10005022040001.24067-100000@andrsn.stanford.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2 May 2000 21:03:28 -0700 (PDT)  Annelise Anderson wrote:
 +------------------
 | On Wed, 3 May 2000, Greg Lehey wrote:
 | 
 | > So, what's the right thing to do?  I've always been a proponent of "/,
 | > swap and /usr", but lately I've been rethinking.  
 | 
 | Lately I've been making /usr/local a separate slice, so that if I
 | wanted to reinstall instead of going through, say, 3.4-4.0 stuff,
 | I'd keep installed third-party software and /usr/local/home.  And
 | have a place to stash configuration files, a copy of /etc, and so forth.
 +------------------

Just thought that it was time to chime in again. Maybe another
point of view on hierarchy and disk control might be usefull.

I've been evolving a multi layer system over the last several years.
The current version is a two layer scheme that goes something like
this.

The first layer represents the traditional core unix hierarchy. I
set this up much as has been described on this thread. I create
mount points for /, /var, /usr, /tmp that are much as the installer
wants to default them, One major exception is that I limit /usr to
about a gig or so.  The remainder of the disk remains un-allocated.

The second layer is for "non install time" stuff.  I have mount
points for all the other partitions at /disk/0, /disk/1, and so
on to create a "disk farm".  When we all used 2 gig disks these
were typically a partition g configured as the whole drive but now
with 18Gig disks becoming common place I might make two or more
partitions on a single slice.

I then use symbolic links to map specific directories into these
mount points.  For example if we expect that the system will want
to retain lots of logging data I simply create a directory
/disk/5/var.log and make a symbolic link at /var/log that points
into this directory.

Home directories are all in /home which is a symbolic link to
something like /disk/2/home.  Or if I need finer control /home
might be a directory containing multiple symbolic links into other
places.

    /home/cfedde -> /disk/4/home.cfedde
    /home/joel -> /disk/3/home.joel

The main beauty of this scheme is that it now becomes easy to re-locate big
hierarchies as the use of the system changes. Simply create a directory in
one of the farm disks and move the hierarchy there.  Then set up the link
and blow away the old directory:

    kill `head -1 /var/run/sendmail.pid`
    mkdir /disk/1/var.spool.mqueue
    cd /var/spool/mqueue
    pax -rwvpe * /disk/1/var.spool.mqueue
    cd ..
    mv /var/spool/mqueue /var/spool/mqueue-
    ln -s /disk/1/var.spool.mqueue /var/spool/mqueue
    /usr/sbin/sendmail -bd -q30m
    rm -fr /var/spool/mqueue-

chris

--
    Chris Fedde
    303 773 9134


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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