Description of problem: Epic: https://issues.redhat.com/browse/RHSTOR-4851 `nfs: add support for shallow volumes - Dev Preview` The above epic aims to add support for shallow volumes -> snaphots mounted as readonly volumes for cephfs subvolumes exported over NFS. Design for CephFS shallow volume: https://github.com/ceph/ceph-csi/blob/devel/docs/design/proposals/cephfs-snapshot-shallow-ro-vol.md#snapshots-as-shallow-read-only-volumes We need to be able to mount nfs exports of cephfs subvolumes with the path `/volumes/<VOLUME NAME>/<SUBVOLUME NAME>/.snap/...` to access snapshot contents. However, `/.snap` does not show up in a mounted subvolume nfs export. (it can be accessed when root '/' is exported and mounted). https://docs.ceph.com/en/quincy/mgr/nfs/#create-cephfs-export The main goal is to facilitate backup softwares by replacing expensive full clones with shallow volumes(snapshot as readonly volume). How reproducible: Everytime Steps to Reproduce: 1. Export a snapshot with path `/volumes/<VOLUME NAME>/<SUBVOLUME NAME>/.snap/...` [root@m1 /]# ceph nfs export create cephfs my-nfs /snap myfs /volumes/csi/csi-vol-5a989f69-a58a-4a7f-b803-a91c596559d8/.snap/csi-snap-ca8efd01-a71f-4c6d-978f-4a8cc28 --readonly bbedc/fa15a4bc-2177-4c14-b449-253152c1c20e { "bind": "/snap", "fs": "myfs", "path": "/volumes/csi/csi-vol-5a989f69-a58a-4a7f-b803-a91c596559d8/.snap/csi-snap-ca8efd01-a71f-4c6d-978f-4a8cc28bbedc/fa15a4bc-2177-4c14-b449-253152c1c20e", "cluster": "my-nfs", "mode": "RO" } 2. try to mount the export [root@m1 /]# mkdir /snap [root@m1 /]# mount -t nfs4 -o snap=tcp rook-ceph-nfs-my-nfs-a:/snap /snap mount.nfs4: mounting rook-ceph-nfs-my-nfs-a:/snap failed, reason given by server: No such file or directory Actual results: The mount fails. Expected results: The mount should success and data within the snapshot should be accessible. Additional info: - https://issues.redhat.com/browse/RHSTOR-4851 - https://github.com/ceph/ceph-csi/blob/devel/docs/design/proposals/cephfs-snapshot-shallow-ro-vol.md#snapshots-as-shallow-read-only-volumes - https://github.com/ceph/ceph-csi/issues/3997
Please specify the severity of this bug. Severity is defined here: https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.
There are currently two approaches that could be done to get the wanted result: a. Ceph-CSI uses the same flow for NFS as it does for CephFS (mount the volume, bind-mount the .snap/... into the publish path). It needs to introduce NodeStageVolume//NodeUnStageVolume for NFS, as that is not used at the moment yet. b. NFS-Ganesha internally uses the volume root with libcephfs, but only exports access to a .snap/... directory. Franks, is option (b) maybe achievable with NFS-Ganesha already? Like setting Export.Path in combination with FSAL.Ceph.
Option B maybe could work with the new cmount_path option. Set Path in the EXPORT {} to the full location. Set cmount_path in EXPORT { FSAL {} } to everything but .snap or even just to "/".
I think the upstream PR for Ceph is at https://github.com/ceph/ceph/pull/53925
(In reply to Akash Raj from comment #29) > Hi Adam. > > Please provide the doc text. This is being requested to be added in the 7.1 > release notes. > > Thanks. added doc text
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Critical: Red Hat Ceph Storage 7.1 security, enhancements, and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:3925