Creating SMB Shares in Ceph
- This article will walk you through the process of adding additional SMB shares to your existing Ceph Cluster
- Cluster Setup using Ansible
- SSH access to the Ansible Admin Node
- SSH to the Ansible Admin node
- Navigate to the /usr/share/ceph-ansible/ directory
root@osd1:~# cd /usr/share/ceph-ansible
- Edit the smbs.yml file
root@osd1:~# vim group_vars/smbs.yml
- Go to the “samba_shares:” listing within the smbs.yml file
- We can utilize the existing template to create additional shares
- Copy and paste the configuration from “- name” to “comment” from the template to below
samba_shares: - name: 'public' path: '/fsgw/public' type: 'kernel' windows_acl: true writeable: 'yes' guest_ok: 'yes' comment: "public rw access"
- Rename the share, and change the path to reflect the new Share Name and path to the share
- Save the file by pressing Esc then typing “:wq”
- In the /usr/share/ceph-ansible directory run samba-share.yml. This will run a playbook to create the new shares.
root@osd1:~# ansible-playbook samba-shares.yml
- After the playbook runs you should see yellow and green text, there should be no red.
- Run “ssh GW1 testparm -s” to show your shares or SSH into a Gateway node and run “testparm -s”
- If the playbook fails try running “ansible -m setup all” then rerunning the playbook
- Ensure the formatting in “samba shares:” is correct