I have a device that writes logs to a logfile on an nfs mountpoint. It writes to the same logfile "forever" resulting in a file that gets insanely large.
I have a script (running on another nfs client) that does a log rotate, so that I have smaller daily logfiles. When I'm done with the log rotate, I would like to force the device's file pointer to the start of the file so that the device would start writing at the start of the logfile again.
This would require the nfs client doing the log rotate doing, "something" (not sure what) to the log file that would force the other nfs client (the writing device) to set its file pointer to the start of the file.
My understanding is that this can't be done because each nfs client independently maintains it's own file pointers.
Am I wrong? Can this be done?