KB450417 – Creating SMB Shares in Ceph

Last modified: April 9, 2021
You are here:
Estimated reading time: 1 min

Creating SMB Shares in Ceph

Scope/Description:

  • This article will walk you through the process of adding additional SMB shares to your existing Ceph Cluster

Prerequisites:

  • Cluster Setup using Ansible
  • SSH access to the Ansible Admin Node

Steps:

  • 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

Verification:

  • 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”

Troubleshooting:

  • If the playbook fails try running “ansible -m setup all” then rerunning the playbook
  • Ensure the formatting in “samba shares:” is correct
Was this article helpful?
Dislike 0
Views: 16
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access