9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ata drive capabilities
Date: Tue, 25 Dec 2007 18:59:44 -0500	[thread overview]
Message-ID: <9bd860fd77b8e6e4bf4d87d7ba44e5ed@quanstro.net> (raw)
In-Reply-To: <20071225214010.GD16180@hermes.my.domain>

> Hi 9fans,
> 
> can someone on this list tell me how to interpret the config part of 
> cpu% cat /dev/sdC0/ctl
> inquiry WDC WD1600JB-00REA0                     
> config 427A capabilities 2F00 dma 00550020 dmactl 00550020 rwm 16 rwmctl 0 lba48always off
> 
> I am trying to figure out whether the disk signals the implementation
> of the SMART feature set.
> 
> Kind regards,

in the return of identify (packet) device, if bits 14:16 of word 83 is 1, then
smart support is indicated by word 82 bit 1. otherwise smart isn't supported.

word 49 is the capabilities word and the important bits of the configuration
are:

10,11	iordy configuration
bit 8	dma support
9	lba support

the intel/amd sata driver support smart commands via
	echo smartenable>/dev/sdXX/ctl		# turn drive's smart on.
	echo smart>/dev/sdXX/ctl			# smart report status.
this isn't implemented in the sdata driver, but i think a similar
strategy could be employed.  note: smart commands are not dma
commands.  also, smart support doesn't imply much about what
commands are supported or much about the return values.
report returns if the drive is likely to fail seems the most useful.

bios isn't always helpful in this regard.  some bios don't report
smart status.  some bios do a smart check on power on and won't
boot with a drive that smart considers suspect.  (we have a drive
in the lab that smart declares will fail any minute now.  it's been
this way for 2 years.)  this can be a big problem if you have a
machine with raid that won't boot due to a drive failure.
(why have a raid if one failure means an unbootable machine?)

- erik


  parent reply	other threads:[~2007-12-25 23:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-25 21:40 Christian Kellermann
2007-12-25 21:48 ` Pietro Gagliardi
2007-12-25 23:59 ` erik quanstrom [this message]
2007-12-26  6:31   ` ron minnich
2007-12-26 13:10     ` erik quanstrom
2007-12-26 19:52       ` Christian Kellermann
2007-12-26 20:13         ` andrey mirtchovski
2007-12-27 18:12           ` Christian Kellermann
2007-12-26 23:58         ` Robert William Fuller
2007-12-27  2:34         ` erik quanstrom
2007-12-26  7:44 Joshua Wood
2007-12-26 13:18 ` roger peppe
2007-12-26 18:15   ` erik quanstrom
2007-12-26 16:22 Joshua Wood
2007-12-26 18:14 ` erik quanstrom
2007-12-27  6:22 Joshua Wood
2007-12-27  7:28 ` erik quanstrom
2007-12-27  9:01 Joshua Wood
2007-12-27 15:15 ` Brantley Coile

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9bd860fd77b8e6e4bf4d87d7ba44e5ed@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).