45Drives Knowledge Base
KB450417 - Creating SMB Shares on Ceph
https://knowledgebase.45drives.com/kb/kb450417-creating-smb-shares-in-ceph/

KB450417 - Creating SMB Shares on Ceph

Posted on April 8, 2021 by Matthew Hutchinson


Scope/Description

Prerequisites

Steps

root@osd1:~# cd /usr/share/ceph-ansible
root@osd1:~# vim group_vars/smbs.yml

If you are creating new shares, you will want to delete the pre-existing shares from this file.

samba_shares:
  - name: 'public'
    path: '/fsgw/public'
    type: 'kernel'
    windows_acl: true
    writeable: 'yes'
    guest_ok: 'no'
    comment: "public rw access"

root@osd1:~# ansible-playbook samba-shares.yml

Verification

Troubleshooting

KB450417 - Creating SMB Shares on Ceph - 45Drives Knowledge Base
Did you know  45Drives offers free  public and private  webinars ? Click here to learn more  & register! Build & Price

KB450417 – Creating SMB Shares on Ceph

You are here:

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
  • Edit the configuration.
If you are creating new shares, you will want to delete the pre-existing shares from this file.

samba_shares:
  - name: 'public'
    path: '/fsgw/public'
    type: 'kernel'
    windows_acl: true
    writeable: 'yes'
    guest_ok: 'no'
    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: 2746
© 2024 - 45Drives Knowledge Base
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access