Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Jul 2004 21:30:18 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Michael Grant <mg-fbsd3@grant.org>
Cc:        Pete French <petefrench@ticketswitch.com>
Subject:   Re: How does CAM determine the order to number drives ?
Message-ID:  <20040731203018.GA75175@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <20040731200554.GA14912@grant.org>
References:  <E1BqzUU-000N79-DE@dilbert.firstcallgroup.co.uk> <20040731200554.GA14912@grant.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--GvXjxJ+pjyke8COw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Jul 31, 2004 at 04:05:54PM -0400, Michael Grant wrote:
> On Sat, Jul 31, 2004 at 08:25:58PM +0100, Pete French wrote:

> > I have spent the afternoon ttrying to upgrade the
> > RAID controller from a 4200 to a 5300. The 5300 uses
> > the CISS driver rather than the IDA driver, and this
> > lives under CAM too. Thus my RAID drives have changed
> > from being idad devices to being da devices.
> >=20
> > Unfortunately the RAID controller gets scanned first
> > so I now have a da0 and a da1 where I didnt before, and my
> > root drive has moved to da2.

> I would sure love to see a way to fix a drive to an identifier.  This
> has to be the one thing that has wasted more of my time than anything
> else in freebsd.  For example, when I had a drive die on me a couple
> months back, when the machine rebooted, the dead drive still in the
> system, da2 became da1 and things just did not work well.

You can wire down particular devices to a given SCSI bus, target and
LUN.  Thus in your (4.x) kernel config you can say:

    device scbus0 at ahc0
    device da0 at scbus0 target 0 unit 0

Which means that your Adaptec controller will be treated as the first
SCSI bus, and that the drive at target zero on that bus will be called
'da0'

Under 4.x you need to create a custom kernel to do that: refer to
/usr/src/sys/i386/conf/LINT for the syntax.  Under 5.x you have a very
similar syntax using sysctl 'hints' -- see /usr/src/sys/conf/NOTES,
but the above example would be something like:

    hint.scbus.0.at=3D"ahc0"
    hint.da.0.at=3D"scbus0"
    hint.da.0.target=3D"0"
    hint.da.0.unit=3D"0"

which you should be able to set from the loader.

(Nb. Specifying the unit number is optional, and the value defaults to
zero if not given explicitly).

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--GvXjxJ+pjyke8COw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFBDAFaiD657aJF7eIRAlicAJ4xUyQmsToDdPfvyAgK/Xe+7xL+UgCePdoO
vPoMc3DmB5ZhS2pKrVw5wvM=
=kUEQ
-----END PGP SIGNATURE-----

--GvXjxJ+pjyke8COw--



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