Subject: Re: A new partition handling scheme: wedges
To: Ty Sarna <tsarna@endicor.com>
From: David Brownlee <abs@anim.dreamworks.com>
List: tech-kern
Date: 02/05/1998 02:42:35
On Thu, 5 Feb 1998, Ty Sarna wrote:

> I don't think so. Having multiple partitions with the name should be
> considered a configuration error. As to how to handle this, AmigaOS (or
> at least the autoconfig ROM on controllers I used on the occaision
> when I did this accidentally -- GVP, I think) uniqify any later-found
> partitons with an existing name by adding ".N". Eg, the first partition
> named "home" is "home", the second becomes "home.0".
> 
> One could argue that it should uniqify both ("home.0" and "home.1"),
> purposely breaking fstab to prevent accidentally mounting something in
> the wrong place (or worse, for eg database partitions or whatnot). I
> think I lean towards this view.
> 
> Actually, I guess what you described above would accomplish this
> (under "named" if unique, else "<DISKNAME>/rdb"), and give a hint as to
> which is which. wedgeconfig should harangue the user about this
> condition, though. It should not be considered normal.
> 
	I think it should be under both when all is OK, otherwise it could
	be difficult to get a 'device by device' view of all the
	parittions.

> > 	Since we would already have that functionality with rdb maps under
> > 	NetBSD/amiga it certainly sounds good to have it on all ports...
> 
> Well, under mycroft's scheme you could already do this (use RDB's on
> NetBSD/i386, or what have you) if you like.  I think that for general
> use though we should come up with something less slanted to one port, and
> with some improved capabilities. 
> 
	Sounds sensible (my only knowledge of RDBs has come from this list
	so I can hardly comment :)

> > > 4. For those partion map types where names aren't defined, but where we
> > > can add them in a backward compatible manner, we should do so.
> > > 
> > 	Which cases would these be - for something like MBR you would have
> 
> I don't know, that's why I was vague :-) I think we should investigate
> the possibility of adding that capability to other partition formats. 
> For some, I'm sure it can't be done in a reasonable manner.  Others,
> like NetBSD/sparc (and sun3?) already use a ROM-readable disklabel in
> one place, and a more complete one in another place. Yes, they can get
> out of sync, but that's possible now on those ports, right? I guess
> wedgeconfig should know about these redundant partition maps and verify
> that they match up (and if they don't... uh... well, I don't know :->)
> 
	Report with the same of vebosity as the duplicate partition name
	case above :)

> Actually, if the new neutral named partition map type I proposed is
> sufficently RDB-like, supporting a compat disklabel and new label on the
> same disk (not nested, but pointing to the same partitions) is not too
> hard, and could be automated by whatever new partition editing tool we
> invent. One of the nice things about RDB is that it doesn't have to
> start in block 0. You can start it anywhere in the first 16 (if I
> remember) blocks, in order to accomidate bootblocks or whatever that
> want to be at 0. The new neutral map type probably should increase the
> limit number from 16, though.
> 
	That would definitely help.
	Alternatively always try to define one partition in the 'native'
	table to point to the 'named partition map' tro protect it from
	being made part of another partition and overwritten by a non
	NetBSD program.

> Alternately you could stick a label containing a name as the first block
> inside the partition under any scheme, with the risk that won't work if
> something else wants to be there. I dunno.
> 
> > 	/dev/dsk/NetBSD-home runs into problems when someone names a disk
> > 	'sd0' or similar... (dumb though it may be)
> 
> Hmmm...  good point.  They could also do less stupid things that would
> be just as bad.  Maybe MBR.COM (random example) uses a filesystem called
> /mbr (we have one called /endicor, after all).  So they name the
> partition "mbr", and then things break :-(.  I guess I'm for
> "/dev/dsk/named/...". 

	You could call the names 'partition identifiers', and then use
	'/dev/dsk/id/...', just for those who like shorter pathnames...
	:)

		David/absolute

	   _/  Do not go gentle into that good night  \_
	  /  Rage, rage against the dying of the light  \