Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Oct 1999 12:56:57 -0600 (MDT)
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        jin@george.lbl.gov
Cc:        narvi@haldjas.folklore.ee, hackers@FreeBSD.ORG
Subject:   Re: SCSI disk naming problem
Message-ID:  <199910011856.MAA41083@panzer.kdm.org>
In-Reply-To: <199910011754.KAA19866@george.lbl.gov> from "jin@george.lbl.gov" at "Oct 1, 1999 10:54:00 am"

next in thread | previous in thread | raw e-mail | index | archive | help
jin@george.lbl.gov wrote...
> > On Fri, 1 Oct 1999 jin@george.lbl.gov wrote:
> > 
> > > Current FreeBSD SCSi disk naming mechanism is problem for using more than
> > > one disks in the chain during the disk failure.
> > > 
> > > The problem is that the name is not fixed with is SCSI ID. e.g.,
> > > if one disk is presented in the chain, regardless its SCSI ID, it is
> > > always named "da0";
> > > 
> > > if two disks are installed, the one with lower ID is named da0 and the
> > > other will be named as da1. When the lower ID one is crashed, then the
> > > other disk will be named as da0 (from da1) after reboot, and it is not
> > > mountable due to the name changing.
> > > 
> > > If a system has a UW SCSI controller with 15 disks in the chain,
> > > when the first disk (ID = 0) crashed, all rest 14 disks will be
> > > useless until either fstab modified or another disk is added with
> > > SCSI ID = 0.
> > > 
> > > Why not we use a fixed name corresponding the SCSI ID. That is,
> > > disk with ID 0 will be always named as da0, and disk with ID 1
> > > will be always named da1, etc.?
> > > 
> > > Is there problem with fixed disk naming mechanism?

[ ... ]

> > See LINT on details of how to wire down scsi devices...
> > 
> > Your proposal doesn't take adding a second scsi card into account.
> 
> Well, I did not mean that has to be da0, da1, etc., but similar thing
> like dac0t0d0, dac0t1d0, ... dac3t4d0, etc. which is much clear what
> disk is.
> A few people does not like this one because the name is long, and it
> is like some commerical configuration. They said that this is Free
> software.

You can pretty easily write a script to create device nodes named whatever
you want.  As long as the major and minor numbers are correct, you can call
what would be /dev/da0a /dev/dac0t0d0a or whatever you like.

I think it is possible, however, to come up with a somewhat reasonable
naming scheme within the current framework.

> Manually wiring down disks is OK for a small set of hosts. 100+ hosts
> with two or three controllers with 100 TB disks will be terribly pain
> during the setup and maintenance.

I would suggest that you come up with a standard naming scheme, and then
use it across all of your machines.  You could do something like:

controller	ahc0
controller	ahc1
controller	ahc2
controller	scbus0 at ahc0
controller	scbus1 at ahc1
controller	scbus2 at ahc2
device		da0 at scbus0 target 0 unit 0
device		da1 at scbus0 target 1 unit 0
device		da2 at scbus0 target 2 unit 0
...
device		da14 at scbus0 target 14 unit 0
device		da20 at scbus1 target 0 unit 0
device		da21 at scbus1 target 1 unit 0
...
device		da34 at scbus1 target 14 unit 0
device		da40 at scbus2 target 0 unit 0
device		da41 at scbus2 target 1 unit 0
...
device		da54 at scbus2 target 14 unit 0

If you've got reasonably consistent controller hardware across the
machines, you could use one wiring setup like the one above for all the
machines.  If you have different controller drivers on the different
machines, you could probably just elminate the controller<->bus wiring and
go from there.  You can design a maximal wire-down configuration for your
largest machine, and it should just work on smaller machines.

For instance, if your large machine has 7 SCSI busses and 15 disks per
chain, you could set them up as da0 through da134 or so.  The wiring
configuration, though, would work even for a machine with one disk.

Ken
-- 
Kenneth Merry
ken@kdm.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910011856.MAA41083>