Russ Petruzzelli
2007-Aug-30 17:18 UTC
[zfs-discuss] problem: file copy''s aren''t getting the current file
I''m not sure if this is a zfs, zones, or solaris/nfs problem... So I''ll start on this alias... Problem: I am seeing file copies from one machine to another grab an older file. (Worded differently: The "cp" command is not getting the most recent file.) For instance, On a T2000, Solaris 10u3, with zfs setup, and a zone I try to copy in a file from my swan home directory to a directory in the zone ... The file copied, is not the file currently in my home directory. It is an older version of it. I''ve suspected this for some time (months) but today was the first time I could actually see it happen. The niagara box seems to pull the file from some cache, but where? Thanks in advance for any pointers or configuration advice. This is wreaking havoc on my testing. Russ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20070830/d7b95333/attachment.html>
Nicolas Williams
2007-Aug-30 17:30 UTC
[zfs-discuss] problem: file copy''s aren''t getting the current file
On Thu, Aug 30, 2007 at 10:18:05AM -0700, Russ Petruzzelli wrote:> I''m not sure if this is a zfs, zones, or solaris/nfs problem... So I''ll > start on this alias... > > Problem: > I am seeing file copies from one machine to another grab an older file. > (Worded differently: The "cp" command is not getting the most recent file.) > > For instance, > On a T2000, Solaris 10u3, with zfs setup, and a zone I try to copy in a > file from my swan home directory to a directory in the zone ...^^^^^^^^^^^^^^^^^^^ Presumably that means NFS mounted, and that the actual FS is not a ZFS.> The file copied, is not the file currently in my home directory. It is > an older version of it. > > I''ve suspected this for some time (months) but today was the first time > I could actually see it happen. > The niagara box seems to pull the file from some cache, but where?NFS.> Thanks in advance for any pointers or configuration advice. This is > wreaking havoc on my testing.It''s probably nothing to do with ZFS.
Richard Elling
2007-Aug-30 17:35 UTC
[zfs-discuss] problem: file copy''s aren''t getting the current file
NFS clients can cache. This cache can be loosely synchronized for performance reasons. See the settings for actimeo and related variables in mount_nfs(1m) -- richard Russ Petruzzelli wrote:> I''m not sure if this is a zfs, zones, or solaris/nfs problem... So > I''ll start on this alias... > > Problem: > I am seeing file copies from one machine to another grab an older file. > (Worded differently: The "cp" command is not getting the most recent file.) > > For instance, > On a T2000, Solaris 10u3, with zfs setup, and a zone I try to copy in a > file from my swan home directory to a directory in the zone ... > The file copied, is not the file currently in my home directory. It is > an older version of it. > > I''ve suspected this for some time (months) but today was the first time > I could actually see it happen. > The niagara box seems to pull the file from some cache, but where? > > Thanks in advance for any pointers or configuration advice. This is > wreaking havoc on my testing. > > Russ > > > ------------------------------------------------------------------------ > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Spencer Shepler
2007-Aug-30 17:41 UTC
[zfs-discuss] problem: file copy''s aren''t getting the current file
On Aug 30, 2007, at 12:35 PM, Richard Elling wrote:> NFS clients can cache. This cache can be loosely synchronized for > performance reasons. See the settings for actimeo and related > variables > in mount_nfs(1m)The NFS client will getattr/OPEN at the point where the application opens the file (close to open consistency) and actimeo will not change that behavior. The "nocto" mount option will disable that. If the client is copying an older version of the file, then the client is either not checking the file''s modification time correctly or the NFS server is not telling the truth. Spencer> -- richard > > Russ Petruzzelli wrote: >> I''m not sure if this is a zfs, zones, or solaris/nfs problem... So >> I''ll start on this alias... >> >> Problem: >> I am seeing file copies from one machine to another grab an older >> file. >> (Worded differently: The "cp" command is not getting the most >> recent file.) >> >> For instance, >> On a T2000, Solaris 10u3, with zfs setup, and a zone I try to copy >> in a >> file from my swan home directory to a directory in the zone ... >> The file copied, is not the file currently in my home directory. >> It is >> an older version of it. >> >> I''ve suspected this for some time (months) but today was the first >> time >> I could actually see it happen. >> The niagara box seems to pull the file from some cache, but where? >> >> Thanks in advance for any pointers or configuration advice. This is >> wreaking havoc on my testing. >> >> Russ >> >> >> --------------------------------------------------------------------- >> --- >> >> _______________________________________________ >> zfs-discuss mailing list >> zfs-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Paul Kraus
2007-Aug-30 18:08 UTC
[zfs-discuss] problem: file copy''s aren''t getting the current file
On 8/30/07, Russ Petruzzelli <Russ.Petruzzelli at sun.com> wrote:> For instance, > On a T2000, Solaris 10u3, with zfs setup, and a zone I try to copy in a > file from my swan home directory to a directory in the zone ... > The file copied, is not the file currently in my home directory. It is an > older version of it.Assuming (as others have said) this is via and NFS mount, I have seen this but only with very recently modified files. Waiting 5 seconds seems to be enough to insure that the current file is read and not the older (cached) version. This was with Solaris 10 on both ends and UFS shared via NFS. Definitely not a ZFS issue :-) -- Paul Kraus