From owner-freebsd-scsi@freebsd.org Thu Dec 10 12:58:19 2015 Return-Path: Delivered-To: freebsd-scsi@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9AD9A9D5C76 for ; Thu, 10 Dec 2015 12:58:19 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6135D198A for ; Thu, 10 Dec 2015 12:58:19 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by vkbs1 with SMTP id s1so80270359vkb.1 for ; Thu, 10 Dec 2015 04:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bkSwYYi3AUuIzQFlh/Igjl2ABZ8QNnEdHnBYqClEtn8=; b=jYixfqZmCBKZPh0NdOVAT7cf5fnK4t1x6oTUbDouHl/CfQk33Kv4dnDBVU2oy/kCZT SUGwSQYHHzsO17j6LRBbwyLFIoxAUTI1+Qd1+rpxELMXOxyxzZgqivFJ+s9PqaCq3Kbg xez+wvjPx7/cOLD70Tm9hHKFCF+Pn2v5RLF50= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=bkSwYYi3AUuIzQFlh/Igjl2ABZ8QNnEdHnBYqClEtn8=; b=Izg9UZ/wedyWUFjT7VxPACyxw2MNrZANKfa8w1lgSkT2+JawEineS8RgChZpqPMMzW CCPVb/VH2o4JBUZgvH13++y4fhDCVmttc1AYuwHO7uNLrEUZTU52lezK8Vs4EEkP1dWL qh5GGjzAk/XMWr/n/vDDxpdsLzoxKH4JqcoKrpKbAJhdPUbF+oxIljFi01MOgiplYZVv ZCLT8v0bmiOCMBSTs7ATUKeIyQyuxYj9x8q1eEhWh/iQQlNl5muv4CrMibAGACN4vzyC FLrv1T090UWrGDJosul5hZJyPh0RchOFILNTqjZUtfJseVANWdnV5OWxj+40nN8tSdSF qXHQ== X-Gm-Message-State: ALoCoQnEl4VkM40+i6NZixp+NCXLe4ScbrH3wlb/xpcnY1beEdw6m7kZJQqvBlxQr4o0QKsv4vjf7yOmf+I4Th/CgM3VOKkXTQ== MIME-Version: 1.0 X-Received: by 10.129.81.147 with SMTP id f141mr4375443ywb.176.1449752298177; Thu, 10 Dec 2015 04:58:18 -0800 (PST) Received: by 10.37.13.147 with HTTP; Thu, 10 Dec 2015 04:58:18 -0800 (PST) In-Reply-To: <80BB5907-CC31-4F06-9C70-E6F7834FF28E@panasas.com> References: <80BB5907-CC31-4F06-9C70-E6F7834FF28E@panasas.com> Date: Thu, 10 Dec 2015 05:58:18 -0700 Message-ID: Subject: Re: Accessing static drive info w/o ATA identify and lockup with camcontrol identify From: Kevin Bowling To: Ravi Pokala Cc: "freebsd-scsi@freebsd.org" , Sean Bruno Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 12:58:19 -0000 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: 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 wrote: > >Date: Fri, 4 Dec 2015 02:13:31 -0700 > >From: Kevin Bowling > >To: freebsd-scsi@freebsd.org > >Subject: Accessing static drive info w/o ATA identify and lockup with > > camcontrol identify > >Message-ID: > > 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" >