Don't understand NFS syncing in TCPIP 5.7 ECO 5
Posted: Thu Jan 06, 2022 6:21 am
In my home setup, I have a process on a Debian linux host that writes about 4 times an hour to a log file in a directory that it also serves to the network via NFS. If I want to check for recent events, I run a report program on my OpenVMS host that reads this log file and summarizes the activity. The NFS share is mounted readonly on the OpenVMS side. This has worked reliably for years under HP VMS 8.4 and the TCPIP 5.7-13 NFS client, but now has strange behavior under VSI 8.4-L2 and TCPIP 5.7 EC0.
When my program reads the file, it gets a stale version of where the end of file is, missing up to many hours of updates. Directory/full of the file shows modified time and size matching what the program reads. If I then TYPE or COPY this file, suddenly everthing syncs. TYPE shows the whole file, the reports program can read the whole file, and DIRECTORY/FULL shows the correct size and modify date. I wrote a test program that instead of using the CRTL makes direct RMS calls to read the file, but it behaves like my report program and doesn't cause a sync.
What are TYPE and COPY doing different? How can I make my programs force the DNFS ACP to refresh the file data?
Added in 2 hours 50 minutes 57 seconds:
I wrote a second test program which instead of a simple SYS$OPEN call first calls SYS$PARSE+SYS$SEARCH and then calls SYS$OPEN with the open-by-NAM-block option. This program somehow forces the NFS client to update it's view of the NFS share and read all the data written by the other host.
This would be a rather intrusive fix to my report program.
When my program reads the file, it gets a stale version of where the end of file is, missing up to many hours of updates. Directory/full of the file shows modified time and size matching what the program reads. If I then TYPE or COPY this file, suddenly everthing syncs. TYPE shows the whole file, the reports program can read the whole file, and DIRECTORY/FULL shows the correct size and modify date. I wrote a test program that instead of using the CRTL makes direct RMS calls to read the file, but it behaves like my report program and doesn't cause a sync.
What are TYPE and COPY doing different? How can I make my programs force the DNFS ACP to refresh the file data?
Added in 2 hours 50 minutes 57 seconds:
I wrote a second test program which instead of a simple SYS$OPEN call first calls SYS$PARSE+SYS$SEARCH and then calls SYS$OPEN with the open-by-NAM-block option. This program somehow forces the NFS client to update it's view of the NFS share and read all the data written by the other host.
This would be a rather intrusive fix to my report program.