Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2013 15:09:54 -0400
From:      Outback Dingo <outbackdingo@gmail.com>
To:        Alan Somers <asomers@freebsd.org>
Cc:        Alexey Egorov <electreg@list.ru>, freebsd-hackers@freebsd.org, Ian Lepore <ian@freebsd.org>
Subject:   Re: determine drive's SAS port
Message-ID:  <CAKYr3zyAq5oweS2Vb70X9OF_XYGvxOW_EEoSNxHD90_JCiSVmQ@mail.gmail.com>
In-Reply-To: <CAOtMX2gKFkbyeSoYUsdm7AnRXte-MORS7FhO=Y%2BK9SvVK4SU1g@mail.gmail.com>
References:  <1382192148.119437035@f257.i.mail.ru> <1382286899.92499.110.camel@revolution.hippie.lan> <CAOtMX2gKFkbyeSoYUsdm7AnRXte-MORS7FhO=Y%2BK9SvVK4SU1g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Oct 21, 2013 at 12:42 PM, Alan Somers <asomers@freebsd.org> wrote:

> On Sun, Oct 20, 2013 at 10:34 AM, Ian Lepore <ian@freebsd.org> wrote:
> > On Sat, 2013-10-19 at 18:15 +0400, Alexey Egorov wrote:
> >> Hello all,
> >>
> >> I have a server with LSI HBA card, and when I remove drive I can see
> following messages in log:
> >>
> >> (da0:mps0:0:5:0): lost device - 0 outstanding, 2 refs
> >> (da0:mps0:0:5:0): removing device entry
> >>
> >> Is there a way to determine physical port (number "5" in
> "(da0:mps0:0:5:0)") when drive is inserted? (I need this to be able to
> create device symlinks based on physical port).
> >>
> >> Thanks in advance.
> >
> > I don't have hardware like that to play with, but when I plug in an
> > eSata drive I get devd events like this:
> >
> > root@dpnand:/root # cat /var/run/devd.pipe
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=pass2
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=ada0
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=ad0
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=ada0p11
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=ad0p11
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=diskid/DISK-10MS109LT74Z
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=ufsid/51fabc51ea1a923b
> > !system=DEVFS subsystem=CDEV type=CREATE
> cdev=gptid/c057d696-fae3-11e2-b79c-5404a6f2f88a
> > !system=DEVFS subsystem=CDEV type=CREATE cdev=diskid/DISK-10MS109LT74Zp11
> > ^C
> >
> > The pass2 dev appears in a camcontrol devlist, like this:
> >
> > root@dpnand:/root # camcontrol devlist
> > <KINGSTON SNVP325S2256GB AGYA0202>  at scbus0 target 0 lun 0 (pass2,ada0)
> > <Generic STORAGE DEVICE 9910>      at scbus2 target 0 lun 0 (pass0,da0)
> > <Generic STORAGE DEVICE 9910>      at scbus2 target 0 lun 1 (pass1,da1)
> >
> > Would the camcontrol bus/target/lun output give you the number you're
> > looking for?  It's a pity there isn't a devd event with more info in it
> > (similar to what you get when usb devices come and go), but perhaps with
> > some scripting you can make the connection between events and devices.
> >
> > -- Ian
> >
> >
> >
> >
> > _______________________________________________
> > freebsd-hackers@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> > To unsubscribe, send any mail to "
> freebsd-hackers-unsubscribe@freebsd.org"
>
> If your disk is connected to a SAS expander, then you can use either
> SES or SMP commands to figure out the port to which a drive is
> connected.  But it sounds like your disks are connected directly to
> the HBA?  If that's the case, the problem is much harder.  I don't
> think that there is a standard way to get it, and the FreeBSD kernel
> doesn't currently help much.  mps(4) accepts some custom ioctls to
> look up configuration information.  To learn how to use them, ask your
> LSI FAE for the "Fusion-MPT 2.0 Message Passing Interface (MPI)
> Specification Guide".  The best solution would be to update the kernel
> to report physical path information for da disks.  I think that
> information is currently reported only for disks connected to a SES
> enclosure.
>

I need to replace a disk connected to a SAS expander also now, there are 44
drives.
How do i use this ses to determine the drive, can i make its light blink ??


>
> -Alan
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>



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