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:

>But can't I walk back up the device tree and find the number of leaves
>on a particular (physical) controller?

You could find out from the config file how many disks you have wired.
Still unrelated to real hardware.


>The backplane on the machine I'm currently using has no ses device
>probed.  Yet, the kernel seems to know that there are 4 drives installed
>(*IF* they are present when the machine is booted!)

It only knows that 4 targets responded.


>> SATA would be wd(4), not sd(4).
>SATA on a SAS controller appear as sd(4) devices on scsibus's.
>Not sure I have the option to attach them to atabus, instead
>(nor why I would want to do that)

If the driver presents the disks as sd(4) devices, you get some
virtual unit that just happens to be usuable to access the
physical one.

For example, the mfi(4) driver would present the disks to you as
sd(4). However, such an sd device would emulate the basic read/write
commands. It also passes through other commands, but your SATA devices
would have problems to understand SCSI commands.


>But, I would have to rely on empirical observation to know which device
>is which?

Yes. Fortunately we still enumerate devices serially, so the numbers don't
change.

The kernel configuration of course will be specific to your machine then.
If you replace hardware you might need a new configuration.


>>> 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.

>The shelfs are relevant because they can be "removed"  in much
>the same way that a drive can be removed.

Simple passive shelfs aren't even visible. It's like the disks in that
shelf are dead if the shelf is removed. If you wire down scsibus to
specific controllers/ports and sd devices to specific scsibusses and
target/lun ids, nothing will change when a shelf is removed.

>Man pages indicate syntax for wiring down but give no guidance as
>to how (other than empirical) to figure out which is which.  E.g.,
>for PATA, you knew MASTER vs. SLAVE.  Does driver probe the controller
>in the order the motherboard manufacturer has defined "SATA connections"?
>(and, how might that relate to a backplane where there is nothing
>besides OCD to force the slots to appear in a particular order)

There is no information about that and your SAS controller might even
hide the details.

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


Home | Main Index | Thread Index | Old Index