Subject: Re: multiple partitions...
To: Michael G. Schabert <mikeride@prez.buf.servtech.com>
From: David Brownlee <abs@anim.dreamworks.com>
List: port-mac68k
Date: 04/18/1998 10:54:00
On Sat, 18 Apr 1998, Michael G. Schabert wrote:

> Hi guys, I have a coupla questions concerning multiple NetBSD partitions...
> first off, if they're on the same physical drive, what's the point? What
> does it benifit you to partition the drive? I can see how it could be used
> in conjunction with quotas to provide a hard-and-soft limit on the amount
> of space that a user can use, but for "normal" users who aren't concerned
> with "outsiders" taking up room on our systems, how's it help? I'm under
> the impression that the BSD filesystem does not have the shortcomings of
> the MacOS, so you won't get any more "usable" space. Will it help speed at
> all, even though it's still just kinda logically dividing up by
> directories, which we're likely to do anyway? As far as I can see, the only
> reasons to do this are 1) what I mentioned earlier, and 2) so that if 1
> part gets hosed, you can be sure to just hafta reinstall that particular
> part.
> 
	Thats pretty much it - plus 'protecting' partitions from filling up
	and causing problems on other partitions (if /var is a separate
	partition, then it filling up does not affect /, /usr, /home etc.

	The 'classic' method of partitioning a disk would be
	
	/	Kept small and pretty unchanging, the odds are if the
		machine crashes badly it will be the least likely to be
		damaged, allowing single user boot to fix. (Making /tmp
		a symlink to /var/tmp can help).

	/usr	Large partition full of binaries. Since its so much larger
		than /, its more susceptable to any crashes.

	/var	Continually active, most likely to suffer problems if
		machine crashes. Also most likely to fill up.

	/home	Keeps user data safe from (or from causing problems to)
		the system data.

> 
> Now, after all that drivel, a question would be: Why does rc mount non-root
> partitions AFTER running fsck?? Because of this, anytime I reboot by
> "nonconventional" means, I must manually go into single-user mode to fsck
> the partition, since in rc it'll complain that it's not clean. But rc takes
> care of doing that to the root partition on its own. It would seem to me
> that if it mounted the automount partitions first, then it could do its
> parallel fscking (assuming partitions on separate physical drives).
> 
	rc does not take care of the root partition as such - it mounts
	it read-only. All partitions should be fscked before mounting.

	Its a calculated risk - you need to mount / in order to get access
	to the minimum set of binaries such as fsck and the rc files, but
	you want to fsck it first.

	The system mounts it read-only - so if it is damaged it won't be
	made any worse, plus if the kernel doesn't write anything back its
	less likely to hit any damage that would make it panic.

	The quickest way to get all the local filesystems in single user
	mode is to:

		fsck -p
		mount -va
	
	(If there are any problems with the filesystem, you can get fsck
	to 'fix' them all as best it can by running 'fsck -y')

	If you want to get any nfs filesystems mounted as well, you can
	run 'sh /etc/netstart' before the fsck and mount.

		David/absolute

            -=- If there is a hell... I'll see you there -=-