What's the difference between 'no caching page mode present' and 'assuming drive cache. write through.'

Post-POST, post-BIOS screen, post-GRUB; when I boot Debian with a SD card or USB stick plugged in, one of the first things to pop up on the screen (so quickly that usually I don’t even notice) looks a little something like:

[sdX] no caching page mode present

text, text, X starts about halfway through that long list of stuff, the text gets noticeably smaller, and just before the window manager starts, I see the very familiar device message (isn’t that what dmesg stands for, anyhow?)

[sdX] assuming drive cache. write through

So, technically speaking, what’s the difference between those two states? What’s being cached? What’s the page? What’s ‘writing through’? And what precludes the assumption of drive cache so that the writing through can happen, directly following boot?

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

“sd” stands for SCSI disk. When a disk device is first detected, the kernel (among other things) requests the device’s caching mode page, which will indicate if the device has an onboard memory buffer that sits in front of the media (disk, flash memory, whatever). In your case the device doesn’t have a caching mode page, so the kernel assumes there is no caching of reads or buffering of writes, and that therefore writes to the device will be “write through,” i.e. will go directly to the media.

The kernel cares about write buffering because filesystem consistency checking and recovery depends in part on the order in which data is written to storage. If there were a device onboard cache, a filesystem module might want to send the SCSI command to disable the caching of writes so that fsck continues to work properly.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply