]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/smb: Add ceph_snapshots vfs module to share definition 62169/head
authorAnoop C S <anoopcs@cryptolab.net>
Fri, 7 Mar 2025 11:28:04 +0000 (16:58 +0530)
committerAnoop C S <anoopcs@cryptolab.net>
Fri, 7 Mar 2025 11:55:38 +0000 (17:25 +0530)
In order to expose and manage snapshots as previous versions from
Windows we make use of the existing ceph_snapshots vfs module from
Samba. vfs_ceph_snapshots by default assumes the snap directory to
be named ".snap" with an option to configure a different name to
match the value for 'client_snapdir' parameter for CephFS client.
We follow the default behaviour to avoid further complications on
a live running cluster and thereby recommend to keep the default
for 'client_snapdir'. This limitation may slightly change in future
to dynamically detect the current snap directory name while shares
are created and not afterwards.

ref: https://www.samba.org/samba/docs/current/man-html/vfs_ceph_snapshots.8.html

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml
qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml
src/pybind/mgr/smb/handler.py

index f4d8ac2ab5c0ef03163ba40f689f86f0caa50b2f..d92ccad96f2584a896b59761d5714e0309a22b11 100644 (file)
@@ -43,7 +43,7 @@ tasks:
             globals = ["default", "domain"]
             instance_name = "SAMBA"
             [shares.share1.options]
-            "vfs objects" = "acl_xattr ceph"
+            "vfs objects" = "acl_xattr ceph_snapshots ceph"
             path = "/"
             "acl_xattr:security_acl_name" = "user.NTACL"
             "ceph:config_file" = "/etc/ceph/ceph.conf"
index a0c85249dd8f6b962d6e5823166a0c47bd8cd6b6..c8c91f908df370fdc3df2e138fa67b02764b26f7 100644 (file)
@@ -42,7 +42,7 @@ tasks:
           globals = ["default", "domain"]
           instance_name = "SAMBA"
           [shares.share1.options]
-          "vfs objects" = "acl_xattr ceph"
+          "vfs objects" = "acl_xattr ceph_snapshots ceph"
           path = "/"
           "acl_xattr:security_acl_name" = "user.NTACL"
           "ceph:config_file" = "/etc/ceph/ceph.conf"
index 3df4b05fc587d336ff48780d6f7759ac32aafd58..e0dc9518902523fefc261e242d3c5c153de7c496 100644 (file)
@@ -1187,7 +1187,7 @@ def _generate_share(
         # smb.conf options
         'options': {
             'path': path,
-            "vfs objects": f"acl_xattr {ceph_vfs}",
+            "vfs objects": f"acl_xattr ceph_snapshots {ceph_vfs}",
             'acl_xattr:security_acl_name': 'user.NTACL',
             f'{ceph_vfs}:config_file': '/etc/ceph/ceph.conf',
             f'{ceph_vfs}:filesystem': cephfs.volume,