https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082006-10-04T20:32:00ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=67852006-10-04T20:32:00Zcorecode
<ul></ul><p>Matthew Dillon wrote:</p>
<blockquote>
<p>SMART uses ata-specific ioctls which the AHCI driver does not implement.</p>
</blockquote>
<p>But the drives support SMART querying and I think also SCSI drives <br />support (something like) it.</p>
<p>cheers<br /> simon</p> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=68772006-10-04T20:32:00Zdillon
<ul></ul><p>SMART uses ata-specific ioctls which the AHCI driver does not implement.</p>
<pre><code>-Matt</code></pre> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=73122006-10-04T20:32:00Zalexh
<ul></ul><p>Ok, I think one should use device type 'sat' for smartmontools (ata over scsi, <br />or scsi attached ata). For this to be feasible, ATA_PASS_* have to be <br />implemented in our ahci driver.<br />Relevant snippet in ahci_cam.c:<br /> case ATA_PASS_12:<br /> case ATA_PASS_16:<br /> /*
* XXX implement pass-through<br /> */<br /> ccbh->status = CAM_FUNC_NOTAVAIL;<br /> break;</p>
<p>I'll give it a shot, but any hint is welcome.</p>
<p>Cheers,<br />Alex Hornung</p> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=73132006-10-04T20:32:00Zdillon
<ul></ul><p>:Alex Hornung <<a class="email" href="mailto:ahornung@gmail.com">ahornung@gmail.com</a>> added the comment:<br />:<br />:Ok, I think one should use device type 'sat' for smartmontools (ata over sc=<br />:si,=20<br />:or scsi attached ata). For this to be feasible, ATA_PASS_* have to be=20<br />:implemented in our ahci driver.<br />:Relevant snippet in ahci_cam.c:<br />: case ATA_PASS_12:<br />: case ATA_PASS_16:<br />: /*<br />: * XXX implement pass-through<br />: */<br />: ccbh->status =3D CAM_FUNC_NOTAVAIL;<br />: break;<br />:<br />:I'll give it a shot, but any hint is welcome.<br />:<br />:Cheers,<br />:Alex Hornung</p>
<pre><code>The best place to get examples is probably ahci_cam.c... the probe code<br /> runs a number of discrete ATA commands. It is fairly straightforward. I'm<br /> not sure how ATAPI is distinguished from ATA w/ regards to the pass-thru<br /> ioctls though.</code></pre>
<pre><code>-Matt<br /> Matthew Dillon <br /> &lt;<a class="email" href="mailto:dillon@backplane.com">dillon@backplane.com</a>&gt;</code></pre> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=73282006-10-04T20:32:00Zalexh
<ul></ul><p>Fixed with commit bedbe7f88177daf6a0e404f198ef852b8e9b426b and using 'sat' as <br />device type for smartctl.</p> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=100342006-10-04T20:32:00Ztuxillo
<ul></ul><p>Health check failing:</p>
<p>cocaine# smartctl -d sat -H /dev/da0<br />smartctl 5.40 2010-10-16 r3189 [DragonFly 2.11-DEVELOPMENT x86_64] (local build)<br />Copyright (C) 2002-10 by Bruce Allen, <a class="external" href="http://smartmontools.sourceforge.net">http://smartmontools.sourceforge.net</a></p>
<p>=== START OF READ SMART DATA SECTION ===<br />Error SMART Status command failed<br />Please get assistance from <a class="external" href="http://smartmontools.sourceforge.net/">http://smartmontools.sourceforge.net/</a><br />Register values returned from SMART Status command are:<br /> ERR=...., SC=...., LL=...., LM=...., LH=...., DEV=...., STS=....<br />SMART overall-health self-assessment test result: PASSED<br />Warning: This result is based on an Attribute check.</p> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=106872006-10-04T20:32:00Zalexh
<ul><li><strong>Assignee</strong> changed from <i>dillon</i> to <i>alexh</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li></ul><p>Works here on the internal disk.</p>
<p>15:33:11 dfhybrid:~ <br />4 # dmesg | grep da0<br />disk scheduler: set policy of da0 to noop<br />da0 at ahci0 bus 0 target 0 lun 0<br />da0: <SATA ST9500420AS 0003> Fixed Direct Access SCSI-4 device <br />da0: Serial Number 5VJB5EP9<br />da0: 300.000MB/s transfers<br />da0: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)</p>
<p>2 # smartctl -a -d sat /dev/da0<br />smartctl 5.40 2010-10-16 r3189 [DragonFly 3.1-DEVELOPMENT x86_64] (local build)<br />Copyright (C) 2002-10 by Bruce Allen, <a class="external" href="http://smartmontools.sourceforge.net">http://smartmontools.sourceforge.net</a></p>
<p>=== START OF INFORMATION SECTION ===<br />Model Family: Seagate Momentus 7200.4 series<br />Device Model: ST9500420AS<br />Serial Number: 5VJB5EP9<br />Firmware Version: 0003LVM1<br />User Capacity: 500,107,862,016 bytes<br />Device is: In smartctl database [for details use: -P show]<br />ATA Version is: 8<br />ATA Standard is: ATA-8-ACS revision 4<br />Local Time is: Wed Feb 29 15:33:10 2012 GMT<br />SMART support is: Available - device has SMART capability.<br />SMART support is: Enabled</p> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=106882006-10-04T20:32:00Zalexh
<ul></ul><p>Also works on the external ESATA disk:</p>
15:36:28 dfhybrid:~ <br />4 # dmesg | grep da1<br />disk scheduler: set policy of da1 to noop<br />da1 at ahci0 bus 3 target 0 lun 0<br />da1: <SATA WDC WD3200BEVT-2 11.0> Fixed Direct Access SCSI-4 device <br />da1: Serial Number WD-WXE308K75174<br />da1: 300.000MB/s transfers<br />da1: 305245MB (625142448 512 byte sectors: 255H 63S/T 38913C)<br />da1s2: cannot find label (no disk label)<br />da1s2: cannot find label (no disk label)<br />da1s2: cannot find label (no disk label)<br />da1s2: cannot find label (no disk label)<br />da1s2: cannot find label (no disk label)<br />da1s2: cannot find label (no disk label)<br />15:36:30 dfhybrid:~
<ol>
<li>smartctl -a -d sat /dev/da1<br />smartctl 5.40 2010-10-16 r3189 [DragonFly 3.1-DEVELOPMENT x86_64] (local build)<br />Copyright (C) 2002-10 by Bruce Allen, <a class="external" href="http://smartmontools.sourceforge.net">http://smartmontools.sourceforge.net</a></li>
</ol>
<p>=== START OF INFORMATION SECTION ===<br />Model Family: Western Digital Scorpio Blue Serial ATA family<br />Device Model: WDC WD3200BEVT-22ZCT0<br />Serial Number: WD-WXE308K75174<br />Firmware Version: 11.01A11<br />User Capacity: 320,072,933,376 bytes<br />Device is: In smartctl database [for details use: -P show]<br />ATA Version is: 8<br />ATA Standard is: Exact ATA specification draft version not indicated<br />Local Time is: Wed Feb 29 15:36:32 2012 GMT<br />SMART support is: Available - device has SMART capability.<br />SMART support is: Enabled</p> DragonFlyBSD - Bug #1412: sysutils/smartmontools doesn't work with ahci(4)https://bugs.dragonflybsd.org/issues/1412?journal_id=109882006-10-04T20:32:00Zalexh
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul>