Subject: Re: sendmail problems
To: None <netbsd-users@NetBSD.org>
From: Michael Parson <mparson@bl.org>
List: netbsd-users
Date: 02/03/2007 10:38:07
On Sat, Feb 03, 2007 at 05:20:45PM +0100, Jan Danielsson wrote:
> Christian Biere wrote:
> [---]
>>>> I'm not aware of any reasons to put /usr on a different partition than /.
>>>> There may be historical ones like tiny disks or whatever.
>>> $ which evil_program
>>> /usr/pkg/bin/evil_program
>>
>> Funny, *every* time I mention this to anyone, they come up with this.  This is
>> definitely not what I meant. I meant everything under /usr provided by NetBSD's
>> base.
>
>    Oh, ok. Then I guess the only reason I can conjure is laziness. :-)
>
> [---]
>> Please, tell me just one reason why /bin and /usr/bin shouldn't live on the
>> same partition.
>
>    I can't. (But that doesn't mean that there aren't any).

It's not laziness, momentum maybe, but not laziness.

There are many reasons, I'll cover just a couple.

1.  Backups.  Some of us still like to use dump/restore to backup our
systems.  Dump only operates on partitions/slices, so we break things up
to make those types of backups easier. / /var /usr /home /tmp, etc.

2.  Stability and security.  If you set your system up right, you could
mount / read-only and still be able to get work done.  If I keep /tmp,
/var, and /usr off /, then even if / isn't ro, if the box crashes, odds
are I don't have a lot of open files on / and the fsck will run cleanly
and I will have a usable system to boot and fix whatever else might be
wrong without having to find a recovery CD, etc.

This box, ultra.bl.org, is in a colo on the other side of town and
doesn't have a floppy or CD ROM in it.  If I have to drive in to fix it,
I usually can w/o having to unrack it and plug in a CD or floppy for
alternate booting methods.

I like to keep / relatively small, on this box, it's 62M, and only 50%
full:

$ df -h
Filesystem    Size      Used     Avail Capacity  Mounted on
/dev/wd0a      62M      30M       30M    50%    /
/dev/wd0f     1.9G     601M      1.3G    31%    /var
/dev/wd0g     3.9G     1.8G      1.8G    50%    /usr
/dev/wd0e     248M     1.0M      234M     0%    /tmp
/dev/wd0h     5.4G     1.3G      3.9G    24%    /usr/local
/dev/wd1b      36G      12G       22G    35%    /home
kernfs        1.0K     1.0K        0B   100%    /kern
procfs        4.0K     4.0K        0B   100%    /usr/local/emul/linux/proc
procfs        4.0K     4.0K        0B   100%    /proc

(I have pkgsrc install things in /usr/local instead of /usr/pkg, no,
this is not a problem for me)

For you, change your sed script to an ed or vi script and you can call
the versions from /rescue directly and not worry about /usr being
mounted.  Or make your case for putting a static sed in /rescue and see
if those that make that decision are willing to make that change. =)

-- 
Michael Parson
mparson@bl.org