Date: Thu, 10 Dec 2015 05:58:18 -0700 From: Kevin Bowling <kevin.bowling@kev009.com> To: Ravi Pokala <rpokala@mac.com> Cc: "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>, Sean Bruno <sbruno@freebsd.org> Subject: Re: Accessing static drive info w/o ATA identify and lockup with camcontrol identify Message-ID: <CAK7dMtBmMdOMs4vdPy0otprfWTVREJCyrVaeVtXj2gw-3BFQGA@mail.gmail.com> In-Reply-To: <80BB5907-CC31-4F06-9C70-E6F7834FF28E@panasas.com> References: <80BB5907-CC31-4F06-9C70-E6F7834FF28E@panasas.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Ravi! Rotation rate is probably the most important thing and thankfully easy as you suggested: https://reviews.freebsd.org/D4483. Would be nice to land that in 10.3 so I can swap the SaltStack module over to it. Next in priority would be getting firmware version.. In 'camcontrol identify' it looks like: 'firmware revision DXM9203Q' In 'camcontrol inquiry' it's part of the device string like: 'pass0: <SAMSUNG MZ7WD480HCGM-00003 DXM9203Q> ACS-2 ATA SATA 3.x device' Do you have any suggestions for wiring that into geom disk? And lastly, yes bus speeds would be nice (especially to spot hard/soft misconfiguration). It shows up like 'protocol ATA/ATAPI-9 SATA 3.x' in camcontrol identify and can be seen in the inquiry string above too. Do you have design suggestions on that? Regards, On Fri, Dec 4, 2015 at 9:23 AM, Ravi Pokala <rpokala@mac.com> wrote: > >Date: Fri, 4 Dec 2015 02:13:31 -0700 > >From: Kevin Bowling <kevin.bowling@kev009.com> > >To: freebsd-scsi@freebsd.org > >Subject: Accessing static drive info w/o ATA identify and lockup with > > camcontrol identify > >Message-ID: > > <CAK7dMtDw7-eFL0HDik3X6O= > QA0jKsbuH9wSOTjDiiQdmJhmKJg@mail.gmail.com> > >Content-Type: text/plain; charset=UTF-8 > > > >... > > > >#2 This all came about because I want to poll device information like disk > >model, serial number, speeds, etc. Common use cases would be > configuration > >management systems and inventory databases. Issuing an ATA identify seems > >a bit much and could trigger unwanted HW errata like above. I'm wondering > >if it would be better to cache the data on interface change in sysctls or > >something. The data is static, read only, but we need to account for disk > >swaps. > > At least some of it is already available via `geom disk list': > > [daneel:~] rpokala% geom disk list ada5 > Geom name: ada5 > Providers: > 1. Name: ada5 > Mediasize: 2000398934016 (1.8T) > Sectorsize: 512 > Stripesize: 4096 > Stripeoffset: 0 > Mode: r1w1e1 > descr: WDC WD20EFRX-68EUZN0 > lunid: 50014ee20b9f7c0f > ident: WD-WCC4M1VN0P7L > fwsectors: 63 > fwheads: 16 > > > > GEOM keeps this data in a "struct disk", which is populated during drive > attach. You can see that the drive model ("descr") and serial number > ("ident") are already listed by GEOM. "struct disk" also already has a > rotation-rate field; if that's what you mean by "speeds", it should be > trivial for me to add that to the GEOM output as well. > > If by "speeds", you're talking about the connection's bus speed (i.e. > 3/6/12Gbps), then that's probably more complicated. > > -Ravi (rpokala@) > > >Regards, > >Kevin > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAK7dMtBmMdOMs4vdPy0otprfWTVREJCyrVaeVtXj2gw-3BFQGA>