Project

General

Profile

Actions

Bug #57210

closed

NFS client unable to see newly created files when listing directory contents in a FS subvolume clone

Added by Ramana Raja over 1 year ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

100%

Source:
Tags:
backport_processed
Backport:
pacific,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
libcephfs
Labels (FS):
Manila
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Tried the following in a vstart cluster on ceph-main that launches ganesha v3.5 containers

$ MON=1 MGR=1 OSD=1 MDS=0 ../src/vstart.sh -d -n -x --cephadm
$ ./bin/ceph fs volume create a
$ ./bin/ceph fs subvolume create a subvol01
$ ./bin/ceph fs subvolume getpath a subvol01

$ ./bin/ceph nfs cluster create nfs-ganesha
$ ./bin/ceph nfs export create cephfs nfs-ganesha /cephfs3 a `./bin/ceph fs subvolume getpath a subvol01`
$ sudo mount.nfs4 127.0.0.1:/cephfs3 /mnt/nfs1/
$ pushd /mnt/nfs1/
$ sudo touch file00
$ # can see newly created file when listing directory contents
$ ls
file00
$ popd

$ ./bin/ceph fs subvolume snapshot create a subvol01 snap01
$ ./bin/ceph fs subvolume snapshot clone a subvol01 snap01 clone01
$ ./bin/ceph nfs export create cephfs nfs-ganesha /cephfs4 a `./bin/ceph fs subvolume getpath a clone01`
$ sudo mount.nfs4 127.0.0.1:/cephfs4 /mnt/nfs2/
$ pushd /mnt/nfs2/
$ ls
file00
$ sudo touch file01
$ # can see cloned 'file00' but cannot see the newly created file when reading the directory contents within the clone
$ ls
file00
# listing the file directly works
$ ls file01
file01

I suspect it's similar to https://tracker.ceph.com/issues/54501 where libcephfs might not be updating the directory inode's metadata attributes that would invalidate NFS client's readdir cache. It's weird that this issue is observed only in a cloned subvolume and not in a regular subvolume.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #57879: quincy: NFS client unable to see newly created files when listing directory contents in a FS subvolume cloneResolvedRamana RajaActions
Copied to CephFS - Backport #57880: pacific: NFS client unable to see newly created files when listing directory contents in a FS subvolume cloneResolvedRamana RajaActions
Actions

Also available in: Atom PDF