1

I have a remote block device with the test ext4 filesystem image. On the iSCSI initiator side, I have this device detected as let's say /dev/sdb. I am not mounting this filesystem but instead I use TheSleuthKit (TSK) forensic tool fls to read the content of my data.

I notice that for the second run the execution time indeed is faster. I know about the page cache and that to bypass it I should use Direct-IO. However, I was convinced this will not be the case for the iSCSI.

If the device is being modified by another node, there is no way for my client to see it if it has this entry cached. So it simply means - inconsistency issues. How can I ensure my reads will always go to the "source" ? Is there any parameter I can set to flush read cache periodically ?(echo 3 > /proc ... is not an option).

1

Yes, there is a block device read buffer cache -- bcache -- which caches blocks previously read.

If you do not want this behavior, you can open the block device with O_DIRECT flag.

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.