Hello all,

in the setup I try to build I want to have snapshots of a file
system replicated from host "replsource" to host "repltarget" and
from there NFS-mounted on host "nfsclient" to access snapshots
directly:

    replsource# zfs create pool1/nfsw
    replsource# mkdir /pool1/nfsw/lala
    replsource# zfs snapshot pool1/[EMAIL PROTECTED]
    replsource# zfs send pool1/[EMAIL PROTECTED] | \
        ssh repltarget zfs receive -d pool1

      (a "pool1" exists on repltarget as well.)

    repltarget# zfs set sharenfs=ro=nfsclient pool1/nfsw

    nfsclient# mount repltarget:/pool1/nfsw/.zfs/snapshot /mnt/nfsw/

    nfsclient# cd /mnt/nfsw/snap1
    nfsclient# access ./lala
    access("./lala", R_OK | X_OK) == 0

So far, so good. But now I see the following:

      (wait a bit, for instance 3 minutes, then replicate another
       snapshot)

    replsource# zfs snapshot pool1/[EMAIL PROTECTED]
    replsource# zfs send -i pool1/[EMAIL PROTECTED] pool1/[EMAIL PROTECTED] | \
        ssh repltarget zfs receive pool1/nfsw

      (the PWD of the shell on nfsclient is still /mnt/nfsw/snap1)

    nfsclient# access ./lala
    access("./lala", R_OK | X_OK) == -1

      (if you think that is surprising, watch this:)

    nfsclient# ls /mnt/nfsw
    snap1  snap2
    nfsclient# access ./lala
    access("./lala", R_OK | X_OK) == 0

The "access" program does exactly the access(2) call illustrated in
its output.

The weird thing is that a directory can be accessed, then not
accessed after the exported file system on repltarget has been
updated by a zfs recv, then again be accessed after an ls of the
mounted directory.

In a snoop I see that, when the access(2) fails, the nfsclient gets
a "Stale NFS file handle" response, which gets translated to an
ENOENT.

My problem is that the application accessing the contents inside of
the NFS-mounted snapshot cannot find the content any more after the
filesystem on repltarget has been updated. Is this a known problem?
More important, is there a known workaround?

All machines are running SunOS 5.10 Generic_127128-11 i86pc. If some
more information could be helpful, I'll gladly provide it.

Regards, Juergen.
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to