Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Mar 2000 13:47:26 -0700
From:      "Kenneth D. Merry" <ken@kdm.org>
To:        Lauri Laupmaa <mauri@inspiral.net>
Cc:        scsi@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: plist/glist query & proposal
Message-ID:  <20000301134726.A33028@panzer.kdm.org>
In-Reply-To: <38BD4CD9.22420.5550BD1@localhost>; from mauri@inspiral.net on Wed, Mar 01, 2000 at 05:01:13PM %2B0200
References:  <38BD4CD9.22420.5550BD1@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Mar 01, 2000 at 17:01:13 +0200, Lauri Laupmaa wrote:
> Hi
> 
> How does one query glist (grown defect list) from scsi device ?

Like this:

# camcontrol defects da0 -f phys -G
Got 8 defects:
4818:4:54
1338:0:138
1250:1:46
2661:5:117
1696:5:5
1760:5:58
688:9:133
1130:9:166

> Wouldn't it be nice if weekly/monthly scripts saved/compared glist 
> with previous versions, so admins can be alerted when devices 
> start dying.

It would be nice, although I'm not sure everyone would want it.  Also,
one problem you may run into is that none of the defect list formats is
mandatory.

So there's no one format you can use that is guaranteed to work with all
drives.  If the drive doesn't support the requested format, it is supposed
to return a specific error (which camcontrol looks for) along with the
defect list in a format that it does support.

Unfortunately, many drives don't do this, or return a different error, or
return an error but no data.  So camcontrol can't always tell the
difference between "here's a defect list in some other format" and "I
can't do that".

One other probelm -- the read defect data command isn't mandatory in SCSI-2
at least.  (haven't checked the SCSI-3 specs)  So you can't even guarantee
that the drive will support the command.

Anyway, it should be easy enough to write a script that will compare glists
for the drives on your machines and watch for failures.  The defect list
output is intended to be reasonably easy to script -- the number of defects
goes to stderr, and the actual list of defects goes to stdout.

Ken
-- 
Kenneth Merry
ken@kdm.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




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