Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Jul 1999 11:19:55 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Ray Johnston <rayj@starbase.net>
Cc:        questions@FreeBSD.ORG
Subject:   Re: Missing scsi command
Message-ID:  <19990701111955.E79211@freebie.lemis.com>
In-Reply-To: <377A4B42.8DE0DA9B@starbase.net>; from Ray Johnston on Wed, Jun 30, 1999 at 12:52:18PM -0400
References:  <377A4B42.8DE0DA9B@starbase.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, 30 June 1999 at 12:52:18 -0400, Ray Johnston wrote:
> I have read in the FAQ's and "The Complete FreeBSD" book about using
> a "scsi" command to check to see if automatic relocation is enabled.
> None of us can find a scsi command or the sources to build it on
> FreeBSD 3.1 or 3.2.  Can you tell us where to find this?

I'm afraid this didn't even get fixed for the third edition of CFBSD.
Here's the corrected version, which will soon find its way into the errata:

  Modern  disks  make provisions for recovering from such errors by allocating an
  alternate sector for the data.  IDE drives do this automatically, but with SCSI
  drives  you  have the option of enabling or disabling reallocation.  Usually it
  is turned on when you buy them, but occasionally it is not.  When installing  a
  new  disk,  you  should  check that the parameters ARRE (Auto Read Reallocation
  Enable) and AWRE (Auto Write Reallocation Enable) are turned on.  For  example,
  to check and set the values for disk da1, you would enter:
  
  # camcontrol modepage da1 -m 1 -e -P 3
  
  This  command  will start up your favourite editor (either the one specified in
  the EDITOR environment variable, or vi by default) with the following data:
  
  AWRE (Auto Write Reallocation Enbld):  0
  ARRE (Auto Read Reallocation Enbld):  1
  TB (Transfer Block):  0
  RC (Read Continuous):  0
  EER (Enable Early Recovery):  0
  PER (Post Error):  0
  DTE (Disable Transfer on Error):  0
  DCR (Disable Correction):  0
  Read Retry Count:  16
  Correction Span:  41
  Head Offset Count:  0
  Data Strobe Offset Count:  0
  Write Retry Count:  16
  Recovery Time Limit:  0
  
  The values for AWRE and ARRE should both be 1.  If  they  aren't,  as  in  this
  case, where AWRE is 0, change the data with the editor, save it, and exit.  The
  camcontrol program will write the data back to the disk and enable the  option.

The biggest difference is the command you use.  Here's the old command
followed by the new command:

  # scsi -f /dev/rda1c -m 1 -e -P 3
  # camcontrol modepage da1 -m 1 -e -P 3
  
In this version, I've also changed the output, which was read from a
different disk.  I don't believe there's any real difference between
the text output by scsi(8) and camcontrol(8).

Greg
--
When replying to this message, please copy the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key


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




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