journalctl -p err gives [sdX] Assuming drive cache: write through for each of my hard drives, where X is from a to f. These are normal hard drives, Ubuntu runs under VMWare. How I can preconfigure the write mode of drive cache so that Linux would not make any assumptions on that matter and would not display them as errors? I don't merely want to hide this error message or preventing Linux from sending it to screen. I would like to solve the cause of these errors, even though some people tell that these errors are normal.


The error message is emitted by the Linux kernel. As of v5.0, it has no feature such as you ask for. Therefore, the method to implement this would involve writing the necessary C code for the Linux kernel :-).

Relevant to that: if Linux recognizes the drive or controller model as having a specific "quirk", where it is not safe to make this assumption, then it still prints a message. But in that case, it is not shown as an error. See the source code quoted & linked below.

The safe assumption in terms of data integrity is surely "write back", not "write through". I.e. it seems safer for Linux to send cache flushes when they are not needed, as opposed to the other way around :-). I am not certain what disadvantage there would be, if Linux was changed to make the safer assumption. However based on a quick web search, I think it might decrease performance for certain RAID controllers, which both have a battery-backed cache, and fail to provide this caching information.

Commit b81478d82e38: [SCSI] set to WCE if usb cache quirk is present.

if (sdp->wce_default_on) {
    sd_printk(KERN_NOTICE, sdkp, "Assuming drive cache: write back\n");
    sdkp->WCE = 1;
} else {
    sd_printk(KERN_ERR, sdkp, "Assuming drive cache: write through\n");
    sdkp->WCE = 0;

Assuming your SCSI disks are being emulated by VMware, the ideal fix would be to use virtualization software which is better at emulating disks, and provides all the correct caching information without requiring assumptions :-).

A recent quote from one kernel developer, in the context of this error message: "it is quite unusual for a device to not implement the caching mode page".

  • Thank you very much for your answer! This error only happens on VMWare, not on Azure or KVM or HyperV or physical hardware. So it is VMWare to blame. – Maxim Masiutin Apr 6 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.