On Thu, Oct 30, 2008 at 06:12:07PM -0500, Rich Winkel wrote:
> On Wed, Oct 29, 2008 at 07:49:00PM +0000, Matthew Seaman wrote:
> > Given that you don't have a BBU, what is the status of write caching
> > on the individual hard drives?  You'll have to use 3dm2 or the CLI 
> > equivalent to investigate this, as the RAID controller tends to hide 
> > that level of information from the OS.  However, this setting is the
> > same thing as controlled by the hw.ata.wc sysctl -- and like that 
> > it has a major effect on disk IO performance.  Turning write caching 
> > off is the safe, conservative thing to do for maximum data security.  
> 
> Doesn't hw.ata.wc affect only card-level caching?

hw.ata.wc causes the ata(4) subsystem to disable write caching on all
disks attached to the subsystem.  It does not disable card features.

There's also the below PR, which extends atacontrol to permit disabling
and enabling write caching on a per-disk basis.

http://www.freebsd.org/cgi/query-pr.cgi?pr=127717

> It seems likely that the softupdates queuing order might be scrambled
> by card-level caching if it juggles pending writes around to minimize
> seek times.  If so, it would be disasterous for data integrity in
> the event of a power outage.  Disk-level caching might be safe
> though ...  Someone needs to ask 3ware whether the card reorders
> updates and if so, if there's a setting to keep them in order.

What gives you the impression that during a power outage your data is
going to be intact?

The RAID card itself may have a BBU, so during loss of power any cached
data *on the card* will be attempt to be flushed to disk... except the
PC (including hard disks -- unless they're powered from some other
source) is already down/offline by this point.  And let's not forget
that the OS/kernel is also gone, which means any writes which were
sitting in cached memory in the kernel are lost as well.

Even disabling write caching on the disks themselves won't help,
although it might help with actual I/O performance (using 2 levels of
caching: RAID controller, and OS/kernel).  In this scenario, write
caching on the disks is usually done by the controller itself (through
a BIOS option), and not by FreeBSD.

For some reason people think that a H/W RAID card with a BBU guarantees
data integrity (keyword: guarantees).  I'm still trying to understand
why people think that.

-- 
| Jeremy Chadwick                                jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to