Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Oct 1999 20:30:39 -0400
From:      Sergey Babkin <babkin@bellatlantic.net>
To:        Narvi <narvi@haldjas.folklore.ee>
Cc:        jin@george.lbl.gov, hackers@FreeBSD.ORG
Subject:   Re: SCSI disk naming problem
Message-ID:  <37F5522F.A12B8582@bellatlantic.net>
References:  <Pine.BSF.3.96.991001203554.86170A-100000@haldjas.folklore.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
Narvi wrote:
> 
> See LINT on details of how to wire down scsi devices...
> 
> Your proposal doesn't take adding a second scsi card into account.

UnixWare has a kind od solution for this: when they create
the VTOC table (an analog of the BSD disk label) on the disk
they have a field in it that contains some piece of random-generated
junk that works as a disk ID. The association of the disk number
and this ID is also written into resmanager. Resmanager is a thing
like sysctl but much more braindamaged and difficult to use,
and its contents is saved to disk when the system is stopped.
So when the system boots next time it reads in the resmanager
database and tries to associate the disks with known ID to
the same number which was assigned to them last time.
The problem of this method is getting rid of the stale
disk ID left in the resmanager, so some way should be provided
to do that (and better it be better than in UnixWare).

I guess this thing would be rather easy to implement in FreeBSD:
instead of the on-disk resmanager database we can use the
already existing mechanism of the 3rd stage loader configuration
files. And the changes to the SCSI disk driver should be not
too complex too.

Such a mechanism has also the second (and I suppose the main)
use in UnixWare: it is absolutely neccessary for the
MultiPath I/O. That is, a disk may be connected to more than
one SCSI card and if one of the access paths crashes another one
can still be used. There are two problems: first, how do we know
that this is the same disk accessible by two paths ? second, if one 
of the path crashes what are we going to do on the next reboot
not to let the disk get re-assigned to another name ? Both
of them are resolved by these disk IDs in the VTOCs.

-SB
 
> 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?
> >
> >       -Jin


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?37F5522F.A12B8582>