Why are the timestamps on files created on an NFS mounted partition different?

5,002

The mounted volume is not actually on your system. When you create a file on it, it is actually the remote OS that is doing the creating. Therefore, what you're seeing is probably the remote system's time which is not the same as your own.

If you have ssh access to the machine that exports the NFS volume, you can check by loggin in and running date there.

Share:
5,002

Related videos on Youtube

chris
Author by

chris

Updated on September 18, 2022

Comments

  • chris
    chris over 1 year

    I have a server with an NFS mounted volume.

    When I create a file on a local volume, the time stamp matches the date command.

    When I create a file on the NFS mounted volume, the time stamp is off. The time on the NFS server is correct, but the timezone is EDT - one hour different.

    # date
    Tue Oct 1 15:13:08 ADT 2013
    
    # cd /path/to/local/volume
    # touch local
    # ls -la local
    -rw-r--r-- 1 root root 0 Oct 1 15:13 local
    
    # cd /path/to/nfs/mount
    # touch nfs
    # ls -la nfs
    -rw-r--r-- 1 root root 0 Oct 1 12:49 nfs
    
  • chris
    chris over 10 years
    I guess my note about the NFS server having the correct time isn't clear. I logged into the server, and the time is the same, except that it is running a different time zone. The file "nfs" file in the question should then have a timestamp of 14:13, or at least something :13, but it appears to be off by more than an hour.
  • terdon
    terdon over 10 years
    @chris ah, OK. Could you please edit your question to add the output of date on both machines? That should clarify things. Also mention the OS of both machines as well as the filesystem of the nfs volume. If you have ssh access to the machine in question also try creating a file on the exported volume when actually logged in to the machine. Does that make a difference?