while doing a cp, I see the following:
cp: skipping file `/a/b/c/d/e/file', as it was replaced while being copied.
The file has a date of Sep 11, 2010, the ctime is May 19th, 13:53. The atime should not matter. (which is today).
Some notes about the path: /a is an automount base /b is the actual automount /c/d/e is the rest of the path
RHEL5.6 autofs: 5.0.1-0.rc2.143.el5_6.2 kernel: 2.6.18-238.12.1.el5 nfs-utils: 1.0.9-50.el5
--tmac
not linked, but aliased to 'cp -i'
--tmac
On Thu, Aug 25, 2011 at 4:04 PM, Chaim Rieger chaim.rieger@gmail.com wrote:
Is cp linked or aliased to something ?
On Thu, Aug 25, 2011 at 03:49:53PM -0400, tmac wrote:
while doing a cp, I see the following:
cp: skipping file `/a/b/c/d/e/file', as it was replaced while being copied.
This is coreutils doing the following insane check:
# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
The first stat buffer is from scanning the files, the second from opening the file.
The file has a date of Sep 11, 2010, the ctime is May 19th, 13:53. The atime should not matter. (which is today).
The timestamps of the file do not show anything since the file could be moved/renamed into place.
I suspect that your automounter is pretty aggressive in unmounting. There is a race condition where the filesystem could be unmounted and mounted again during a copy. And Linux doesn't make guarantees about the 'st_dev' value being the same for subsequent mounts.
Greetings,