Disabling Hard Disk caches on individual drives?

Dan Egli ddavidegli at gmail.com
Mon Apr 1 02:20:01 MDT 2013


*Hey folks,*

* *

*Something that was mentioned a week or two back and I meant to follow up
but never did was changing cache mode for Linux's disk writes. How does one
accomplish that and can it be done on an individual drive basis? I.e.
Suppose I am using a set of hard disks in USB3 or eSATA enclosures to
backup my home system. If I backup the entire raid (i.e. dd if=/dev/md0
of=/dev/md1) then how do I make sure that all the data was properly written
to the drives in md1 before I disconnect the drives and turn them off
(since they're in enclosures I can simply turn the enclosures off)? I don't
want to write that way, only to assume that everything is OK and find out
later that something didn't get written right. And yes, I know I could
simply do an individual file backup, and that's on the agenda too. But even
then, unless unmounting the md1 would force all cached data to be written
immediately anyway. But I am considering both options.  So I would
appreciate it if someone could explain to me (since I've never tried
before) how you can go about disabling write caching to an individual drive.
*

* *

*Thanks!*

*--- Dan*


More information about the PLUG mailing list