PDA

View Full Version : [ubuntu] Disable write cache



sakishrist
April 8th, 2011, 03:49 PM
Hi,

How do I disable write cache on a disk?

sakishrist
April 9th, 2011, 08:39 PM
Answering my own question:

A script has to be made in /etc/init.d that contains:
#!/bin/bash
hdparm -W0 /dev/hdx[x]And then a link to it has to be created in /etc/rc.d with name SxxOriginalName. xx is from 00 to 99, lower means it will be executed earlier.

sakishrist
April 17th, 2011, 12:24 PM
I have noticed that this method does not always work, maybe it worked just the first time but now the cache is on again.

Could you please help me?