Ceph SMB Manager Module: Streamlining SMB Service Management in Ceph
CEPH SMB

Ceph SMB Manager Module: Streamlining SMB Service Management in Ceph

Seamless SMB Integration in Ceph 8.0 with the SMB Manager Module

The Server Message Block (SMB) protocol is a widely adopted network communication standard that enables the sharing of files, printers, and various other resources within a networked environment. It plays a crucial role in enterprise storage solutions, ensuring smooth and secure access to shared resources across different systems. Recognizing the need for seamless SMB integration within distributed storage ecosystems, Ceph 8.0 introduces the innovative SMB Manager module—a powerful addition designed to simplify and optimize Samba service management within CephFS.

The Ceph SMB Manager module provides administrators with a streamlined and intuitive framework for deploying, managing, and controlling Samba services, facilitating efficient SMB access to CephFS. This module significantly enhances the flexibility and ease of managing SMB clusters and shares, offering two distinct approaches to configuration and administration:

  • Imperative Method – Allows administrators to directly issue Ceph commands for real-time control and management of SMB services.
  • Declarative Method – Enables users to define resource configurations in YAML or JSON, allowing for automated orchestration of SMB services with enhanced consistency and repeatability.

Administrators can easily activate the SMB Manager module within Ceph, granting them the ability to manage SMB service operations through both command-line interactions and infrastructure-as-code automation. This approach significantly reduces manual overhead while ensuring that SMB services within CephFS are scalable, resilient, and aligned with modern IT automation principles.

With the introduction of the SMB Manager module, Ceph administrators can now effortlessly extend file-sharing capabilities within their storage environments. This integration not only strengthens SMB accessibility but also provides greater control, improved scalability, and simplified management of Samba clusters, making CephFS an even more versatile and powerful file system solution for enterprises.

Managing SMB Cluster and Shares

Admins can interact with the Ceph Manager SMB module using following methods:

  • Imperative Method: Ceph commands to interact with the Ceph Manager SMB module.
  • Declarative Method: Resources specification in YAML or JSON format.

Simple Ceph Squid with SMB Configuration Workflow

Imperative Method

Create CephFS Volume/Subvolume

# ceph fs volume create cephfs
# ceph fs subvolumegroup create cephfs smb
# ceph fs subvolume create cephfs sv1 --group-name=smb --mode=0777
# ceph fs subvolume create cephfs sv2 --group-name=smb --mode=0777        

Enable SMB Management Module

# ceph mgr module enable smb        

Creating SMB Cluster/Share

# ceph smb cluster create smb1 user --define-user-pass=user1%passwd
# ceph smb share create smb1 share1 cephfs / --subvolume=smb/sv1        

Map a network drive from MS Windows clients

Declarative Method

Create CephFS volume/subvolume

# ceph fs volume create cephfs
# ceph fs subvolumegroup create cephfs smb
# ceph fs subvolume create cephfs sv1 --group-name=smb --mode=0777
# ceph fs subvolume create cephfs sv2 --group-name=smb --mode=0777        

Enable SMB Management Module

# ceph mgr module enable smb        

Creating SMB Cluster/Share

# ceph smb apply -i - <<'EOF'
# --- Begin Embedded YAML
- resource_type: ceph.smb.cluster
  cluster_id: smb1
  auth_mode: user
  user_group_settings:
    - {source_type: resource, ref: ug1}
  placement:
    count: 1
- resource_type: ceph.smb.usersgroups
  users_groups_id: ug1
  values:
    users:
      - {name: user1, password: passwd}
      - {name: user2, password: passwd}
    groups: []
- resource_type: ceph.smb.share
  cluster_id: smb1
  share_id: share1
  cephfs:
    volume: cephfs
    subvolumegroup: smb
    subvolume: sv1
    path: /
- resource_type: ceph.smb.share
  cluster_id: smb1
  share_id: share2
  cephfs:
    volume: cephfs
    subvolumegroup: smb
    subvolume: sv2
    path: /
# --- End Embedded YAML
EOF        

Map a network drive from MS Windows clients

Basic SMB Manager Module CLI Commands ?

Creating an SMB Cluster

# ceph smb cluster create <cluster_id> {user} [--domain-realm=<domain_realm>] \
            [--domain-join-user-pass=<domain_join_user_pass>] \
	    [--define-user-pass=<define_user_pass>] [--custom-dns=<custom_dns>]        

Example:

Auth_Mode:User

# ceph smb cluster create smb1 user --define_user_pass user1%passwd --placement label:smb --clustering default        

Auth_Mode: AD

# ceph smb cluster create smb1 active-directory --domain_realm samba.qe --domain_join_user_pass Administrator%Redhat@123 --custom_dns 10.70.44.153 --placement label:smb --clustering default        

Creating an SMB Cluster with the Declarative method

# ceph smb apply -i [--format <value>]        

Example:

# ceph smb apply -i resources.yaml        

Creating SMB Share

# ceph smb share create <cluster_id> <share_id> <cephfs_volume> <path> [<share_name>] [<subvolume>] [--readonly] [--format]        

Example:

# ceph smb share create smb1 share1 cephfs / --subvolume=smb/sv1        

Listng SMB Shares

#  ceph smb share ls <cluster_id> [--format <value>]        

Example:

# ceph smb share ls smb1        

Viewing SMB Cluster Details

#  ceph smb show [<resource_names>]        

Example:

# ceph smb show ceph.smb.cluster.smb1        

Deleting SMB Share

# ceph smb share rm <cluster_id> <share_id>        

Example:

# ceph smb share rm smb1 share1        

Deleting SMB Cluster ?

# ceph smb cluster rm <cluster_id>        

Example:

# ceph smb share rm smb1        

Conclusion

The Ceph SMB Manager module in Ceph SQUID brings an innovative and efficient way to manage SMB services for CephFS file systems. Whether through imperative or declarative methods, users can easily create, manage, and control SMB clusters and shares. This integration simplifies the setup of Samba services, enhances scalability, and offers greater flexibility for administrators. With the ability to manage SMB access to CephFS seamlessly, users can now have a streamlined process for providing secure and scalable file services.


要查看或添加评论,请登录

Siddhesh Kachkure的更多文章

  • CEPH Why? & How?

    CEPH Why? & How?

    Ceph is an Open Source Distributed storage solution and it puts together to simplify the highly scalable object…

    1 条评论
  • Storage Controller...!

    Storage Controller...!

    Storage Controller A storage controller, often referred to as a disk controller or storage processor, is a crucial…