Red Hat Bugzilla – Bug 183208
file timestamps not copied to NFS directory destinations
Last modified: 2007-11-30 17:11:25 EST
Description of problem:
If I do a "cp -a" or "mv" of a file to a remote directory accessed by NFS, the
timestamps of the source is lost. In a NFS directory if I do a
cp -a file1 file2
file2 will have the current time rather than the time of the original file.
Timestamps can only be copied with:
touch -r file1 file2
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Add a fstab entry with the mount options from "Additional info:" below.
2. mount the volume
3. cp -a <local>/waiver.txt <remote-nfs>/
Time is set to the current time.
Time set to the same time as source file.
Both server and client are running the same kernel version.
I used ethereal to dump the NFS traffic for "cp -a ~/waiver.txt .". It is
atttached below. The client sents the mtime coorectly in Frame 12 and the
server acknowledges it in Frame 13.
Created attachment 125316 [details]
Ethereal text dump of NFS traffic for "cp -a ~/waiver.txt ."
Also in kernel-2.6.15-1.1996_FC5.
I don't believe this is a new problem, I found a script I wrote (Dec 29th) that
extracted the date/time from jpeg exif data because I lost the dates when I
moved the images to my NFS archive.
exif.py $x|head -n 20|grep "DateTime:"| \
sed -e "s/.*ASCII.\(200.\):\(..\):\(..\) \(..\):\(..\):\(..\).*/\1\2\3\4\5/"| \
xargs touch $x -t
http://bugzilla.kernel.org/show_bug.cgi?id=6127 has a kernel patch.
I applied this to cvs for tonights build. should show up in builds
kernel-2.6.15-1.2006_FC5 and above.
if it doesn't make it through the buildsys in time for tomorrows rawhide push,
you can grab it early at http://people.redhat.com/davej/kernels/Fedora/devel/