Skip to content

Commit cf0e930

Browse files
committed
mgr/smb: Add ceph_snapshots vfs module to share definition
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 <[email protected]>
1 parent b1e4a2b commit cf0e930

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

qa/suites/orch/cephadm/smb/tasks/deploy_smb_basic.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ tasks:
4343
globals = ["default", "domain"]
4444
instance_name = "SAMBA"
4545
[shares.share1.options]
46-
"vfs objects" = "acl_xattr ceph"
46+
"vfs objects" = "acl_xattr ceph_snapshots ceph"
4747
path = "/"
4848
"acl_xattr:security_acl_name" = "user.NTACL"
4949
"ceph:config_file" = "/etc/ceph/ceph.conf"

qa/suites/orch/cephadm/smb/tasks/deploy_smb_domain.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ tasks:
4242
globals = ["default", "domain"]
4343
instance_name = "SAMBA"
4444
[shares.share1.options]
45-
"vfs objects" = "acl_xattr ceph"
45+
"vfs objects" = "acl_xattr ceph_snapshots ceph"
4646
path = "/"
4747
"acl_xattr:security_acl_name" = "user.NTACL"
4848
"ceph:config_file" = "/etc/ceph/ceph.conf"

src/pybind/mgr/smb/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ def _generate_share(
11871187
# smb.conf options
11881188
'options': {
11891189
'path': path,
1190-
"vfs objects": f"acl_xattr {ceph_vfs}",
1190+
"vfs objects": f"acl_xattr ceph_snapshots {ceph_vfs}",
11911191
'acl_xattr:security_acl_name': 'user.NTACL',
11921192
f'{ceph_vfs}:config_file': '/etc/ceph/ceph.conf',
11931193
f'{ceph_vfs}:filesystem': cephfs.volume,

0 commit comments

Comments
 (0)