Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jan 2002 06:27:20 -0600
From:      "Mike Meyer" <mwm-dated-1011270441.08b747@mired.org>
To:        Giuseppe Pagnoni <gpagnon@emory.edu>
Cc:        questions@freebsd.org
Subject:   Re: how to disable write cache?
Message-ID:  <15424.11176.884166.718970@guru.mired.org>
In-Reply-To: <97955644@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Giuseppe Pagnoni <gpagnon@emory.edu> types:
> Hi
> 
> I have erratic problems with a Seagate SCSI driver and browsing through 
> the lists I came to understand that this might be related to the write 
> caching turned on or a bad firmware. I was unable to find a new firmware 
> from the seagate site and I couldn't find a way to turn off write 
> caching via the SCSI controller setup either(no related options there). 
>  I found this alternative suggestion on the list:
> 
>  >  Run this:
>  >
>  >     EDITOR="/usr/bin/perl -i -pe 's/1/0/g if /^WCE/'" \
>  >    camcontrol modepage da0 -P 3 -m 8
>  >
>  >  do this for all your drives which have bad firmware.
>  
> but... clearly EDITOR is not a command, so i guess i am missing 
> something here.

Actually, EDITOR is a command - complete with arguments. But the
camcontrol command is missing a "-e" argument to cause it to invoke
the editor.

> Could somebody explain me (in simpler terms)  how can i disable write 
> caching for my two SCSI disks (da0 and da1) permanently  in FreeBSD 4.4R?

Just run the "camcontrol modepage da0 -P 3 -m 8 -e" as root. It should
dump you into an editor with a bunch of lines that look like "name:
value". Find the one that has the name "WCE:". If it's 0, write
caching is already off. If it's 1, change it to 0, save the file and
exit.

The command given above sets the EDITOR environment variable to a perl
script that would automate the search and change process.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

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?15424.11176.884166.718970>