I have shared storage which is mounted (read-only) on SERVER1, and mounted (read-write) on SERVER2.
SERVER2 is writing data to a file. SERVER1 is reading data from that file.
The file poling is <100ms, which is fast, but lets just say it's necessary.
SERVER1 is accessing the filesystem cache, and not showing new data in the file. I can drop_caches which then returns the latest data in that file, but this process drops all file caches on SERVER1, which is not what I want to do, and it takes too long to process.
I have tried using the cat command, as well as dd if=/path/to/file -iflag=direct, but that doesn't work either. It returns an error. The flag seems not to be supported for files. Any idea on how to read a file directly from a disk, or how to disable filesystem cache for a file/directory/mount point?
I would also consider disabling file cache system-wide, but thats not my first preference, this is just for the one file. Google doesn't return a way to do this either, as most forum posts argue against such action.
Thanks!