如何在 Linux 上禁用所有外部驱动器的写入缓存?

如何在 Linux 上禁用所有外部驱动器的写入缓存?

我想在外部驱动器上禁用它以确保数据确实被复制/写入驱动器,写入缓存使我很难判断数据是否已被复制/写入。

我试图发出:

hdparm -W 0 /dev/sdb

但它说:

/dev/sdb:
 setting drive write-caching to 0 (off)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 write-caching =  1 (on)

所以,无论如何,它无法禁用缓存。

相关内容