Subject: Re: partition bookkeeping
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 09/22/1999 18:20:32
>> I could imagine, for example...

>> sd0 at scsibus0 ....
>> -> sd0 raw partition at sd major, minor 0
>> -> label shows three partitions, #0, #1, #5
>> sd1 at scsibus0 ....
>> -> sd1 raw partition at sd major, minor 1
>> -> label shows two partitions, #4, #7
>> ....
>> wedge covering sd0:
>> partition 0 ("sd0a") at sd major, minor 2
>> partition 1 ("sd0b") at sd major, minor 3
>> partition 5 ("sd0f") at sd major, minor 4
>> wedge covering sd1:
>> partition 4 ("sd1e") at sd major, minor 5
>> partition 7 ("sd1h") at sd major, minor 6

> What happens after "scsictl scan"?  (forcing a reprobe of the bus)

Nothing, unless you've added devices. :-)

This is one of the problems I was talking about when I said the scheme
I sketched had problems.  I can think of two possible answers offhand.

Answer one:

sd2 at scsibus0 ...
-> sd2 raw partition at sd major, minor 7
wedge covering sd2:
partition 3 ("sd2d") at sd major, minor 8

This one has the problem "how does /dev/sd2 get hooked up to minor 7?".
This probably could be solved, but it's not immediately clear how.

Answer two:

sd0 at sd major, minor 0
sd1 at sd major, minor 1
sd0a at sd major, minor MAXSDS+0
sd0b at sd major, minor MAXSDS+1
sd0f at sd major, minor MAXSDS+2
sd1e at sd major, minor MAXSDS+5
sd1h at sd major, minor MAXSDS+6

That is, some of the minor number space is allocated for real sds, with
the rest allocated to wedge-provided sd partitions.  This one has the
problem "what happens when you lay a wedge over sd0f?".  It may be as
simple as sd0fa at sd major, minor MAXSDS+7; sd0fb at sd major, minior
MAXSDS+8; sd0fg at sd major, minor MAXSDS+9, etc - but this too isn't
clear.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B