Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Sep 2022 12:11:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 266236] ZFS NFS : .zfs/snapshot : Stale file handle
Message-ID:  <bug-266236-99-0x8vQLu18v@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-266236-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-266236-99@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266236

--- Comment #3 from Michel Le Cocq <nomad@neuronfarm.net> ---
A little small procedure to reproduce this bug.

Install a fresh FreeBSD server under 13.1-p2

        root@server:~# freebsd-version=20
        13.1-RELEASE-p2

Inside a zfs pool create a vol and share it by NFS.

        root@server:~# zfs get name,mountpoint,sharenfs tank/zfsnfstest
        NAME             PROPERTY    VALUE             SOURCE
        tank/zfsnfstest  name        tank/zfsnfstest   -
        tank/zfsnfstest  mountpoint  /tank/zfsnfstest  local
        tank/zfsnfstest  sharenfs    on                local

Mount localy your sharenfs vol.

        root@server:~# mount -t nfs 127.0.0.1:/tank/zfsnfstest /mnt

Create a snapshot.

        root@server:~# zfs snapshot tank/zfsnfstest@1

Check you can access localy.

        root@server:~# ls -l /tank/zfsnfstest/.zfs/snapshot/1/
        total 0
        root@server:~#

Try to acces from mounted NFS vol.

        root@server:~# ls -l /mnt/.zfs/snapshot/1/
        total 0
        ls: /mnt/.zfs/snapshot/1/: Stale NFS file handle

Here we see we don't have access from NFS.

Try to remove your previous created snapshot.

        root@server:~# zfs destroy tank/zfsnfstest@1

This process didn't end...

        root@server:~ # ps aux
        USER    PID  %CPU %MEM    VSZ  RSS TT  STAT STARTED      TIME COMMA=
ND
        [...]
        root  58027   0.0  0.0  18012 7256  1  D+   12:27     0:00.01 zfs
destroy tank/zfsnfstest@1

D mean : Uninterruptible sleep (usually IO). So you can't kill it !

        root@server:~ # kill 58027
        root@server:~ # ps aux | grep 58027
        root  58027   0.0  0.0  18012 7256  1  D+   12:27     0:00.01 zfs
destroy tank/zfsnfstest@1
        root@server:~ # kill -1 58027
        root@server:~ # ps aux | grep 58027
        root  58027   0.0  0.0  18012 7256  1  D+   12:27     0:00.01 zfs
destroy tank/zfsnfstest@1
        root@server:~ # kill -9 58027
        root@server:~ # ps aux | grep 58027
        root  58027   0.0  0.0  18012 7256  1  D+   12:27     0:00.01 zfs
destroy tank/zfsnfstest@1
        root@server:~ #

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-266236-99-0x8vQLu18v>