How does CAM determine the order to number drives ?

Michael Grant mg-fbsd3 at grant.org
Sun Aug 1 08:36:19 PDT 2004


Now I'm a little confused.  If you have 2 of the same scsi controller
(say 2 adaptec 2940s), how can you possibly distinguish them apart?

One problem I had once was one of the 2940s died and my second 2940
became my first.

I don't really see how one can fix this sort of thing in the kernel
unless you can specifically identify which controller is which.

I just want to toss this out as an idea: Would it be possible to put
some identifier somewhere on the drive itself when you partition the
drive such that the drive itself could always come up in the same
place regardless even if it moved to a different controller?

Michael Grant

On Sun, Aug 01, 2004 at 08:49:58AM -0600, Scott Long wrote:
> On Sun, 1 Aug 2004, Pete French wrote:
> > > 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
> >
> > Thanks for this - it looked as though it was just what I needed. I built
> > a kernel with scbus0 placed at ahc? (ahc0 would not compile - but I only
> > have one Adaptec controller in the machine). I would have thought this
> > was sufficient as it would then scan scbus0 first and thus find the
> > Addapted conntected drive first. But it did not appear to do this - I
> > still had the ciss drives appearing first.
> 
> You need to explicitely define 'ahc0' as so:
> 
> device	ahc
> device	ahc0	/* declared for wiring */
> device	scbus
> device	scbus0 at ahc0
> 
> Wiring down the controller number doesn't usually affect drive ordering.
> All drives on all controllers are scanned at once in parallel, and the
> first to respond on any controller, regardless of the controller number,
> get to be da0.
> 
> Scott


More information about the freebsd-stable mailing list