From 85b43f1141db90a83e263f77fc37c071b3ed7ffd Mon Sep 17 00:00:00 2001 From: Shwetha K Acharya Date: Tue, 26 Mar 2024 13:25:13 +0530 Subject: [PATCH] Expose CephFS snapshots as shadow-copies create shadow copy with the help of ceph_snapshots module: - use kernel CephFS mounted share path for cephfs - use absolute path within the Ceph filesystem for cephfs.vfs - intall samba-vfs-cephfs on both cephfs and cephfs.vfs Refer: https://www.samba.org/samba/docs/4.11/man-html/vfs_ceph_snapshots.8.html Signed-off-by: Shwetha K Acharya --- playbooks/ansible/roles/sit.cephfs/tasks/repo/centos.yml | 5 ++++- .../ansible/roles/sit.cephfs/templates/smb_share.conf.j2 | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/playbooks/ansible/roles/sit.cephfs/tasks/repo/centos.yml b/playbooks/ansible/roles/sit.cephfs/tasks/repo/centos.yml index 31d6e2b2..c0f14ca8 100644 --- a/playbooks/ansible/roles/sit.cephfs/tasks/repo/centos.yml +++ b/playbooks/ansible/roles/sit.cephfs/tasks/repo/centos.yml @@ -2,8 +2,11 @@ - name: Install ceph related samba packages when: inventory_hostname in groups['cluster'] block: + # install VFS module irrespective of the CephFS backend variant + # as ceph_snapshots.so which is part of VFS module is required + # by all the variants to expose ceph snapshots as Windows VSS + # with vfs_cephfs_snapshots - name: Install VFS module - when: config.be.variant == 'vfs' yum: name: samba-vfs-cephfs state: present diff --git a/playbooks/ansible/roles/sit.cephfs/templates/smb_share.conf.j2 b/playbooks/ansible/roles/sit.cephfs/templates/smb_share.conf.j2 index 97f1cbf3..c4f4fbb8 100644 --- a/playbooks/ansible/roles/sit.cephfs/templates/smb_share.conf.j2 +++ b/playbooks/ansible/roles/sit.cephfs/templates/smb_share.conf.j2 @@ -1,6 +1,6 @@ [{{ name }}-{{ config.be.name }}-{{ config.be.variant }}] comment = Volume '{{ name }}' from {{ config.be.name }}({{ config.be.variant }}) -vfs objects = acl_xattr +vfs objects = acl_xattr ceph_snapshots {%- if config.be.variant == 'vfs' %} ceph ceph:config_file = /etc/ceph/sit.ceph.conf ceph:user_id = sit