NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Sizing hardware drive capabilities (in the absence of probed devices)



netbsd-embedded%gmx.com@localhost (Don NetBSD) writes:

>How can I determine the number of /potential/ disk devices (sd(4))
>that a system MIGHT support -- *if* the drives had been installed
>prior to boot?

That would be difficult. sd(4) is used for several different kinds
of disks, including virtual ones and SCSI is a bus. You MIGHT
install hundreds of sd devices but that's unrelated to e.g. how
many drive slots the machine has.


> E.g., if I have a 15 slot backplane but only have
>a drive installed in slot 13, then *that* appears as sd0 and there
>is no mention of the potential for the other 14 drives.

A backplane might support a ses(4) enclosure device that could
be queried.

A driver for a multiport controller usually knows how many ports
are available. But that's not exposed, and in case of a bus
topology, you still wouldn't know what is possible.



>Presumably, I can wire down each sd(4) device to correspond to a
>particular "slot" (SATA port) in the machine when I build a kernel
>with that in mind.

SATA would be wd(4), not sd(4).



>[This allows software to KNOW that sd0 is "the drive in the top
>left slot" even if there is no drive present there when the machine
>boots]

You could create a custom kernel that wires drive units to specific
locations. You'd also may need to wire the 'scsibus' instances.
For SATA that would wd devices and atabus instances.

USB might be an issue. You may need to remove the umass driver so
that no SCSI or ATA instances can attach.


>How can I configure a kernel to support a very large number of
>(wired down) drives even if the hardware to support those drives
>isn't present (I'm thinking about the case of having a couple
>of disk shelfs which may/may not be present at any given time)?

Disk shelfs are irrelevant, controllers, channels, target and
lun ids are. The scsi and ata manpages give some examples about
possible kernel configurations to wire down disks.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index