Re: SMB Service in Squid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday, September 3, 2024 3:42:29 PM EDT Robert W. Eckert wrote:
> I have upgraded  my home cluster to 19.1.0  and wanted to try out the SMB
> orchestration features to improve my hacked SMB shared using CTDB and SMB
> services on each host.
> 

Hi there, thanks for trying out the new SMB stuff!

> My smb.yaml file looks like
> 
> service_type: smb
> service_id: home
> placement:
>   hosts:
>     - HOST1
>     - HOST2
>     - HOST3
>     - HOST4
> spec:
>   cluster_id: home
>   features:
>     - domain
>       #clustered: true
>   config_uri: rados://.smb/home/scc.toml
>   custom_dns:
>     - "<DNS SERVERS>"
>   join_sources:
>     - "rados:mon-config-key:smb/config/home/join1.json"
>  # cluster_meta_uri: rados://.smb/home/meta
> #cluster_lock_uri: rados://.smb/home/lock
>   include_ceph_users:
>     - client.smb.fs.cluster.home
> 
>  #cluster_public_addrs:
>                 #address: "192.168.2.175"
>  #destination: "192.168.2.0/24"
> 
> 
> When I first ran ceph orch apply -i smb.yaml, it didn't like the sections I
> commented out related to clusters- this may be that I formatted them wrong?

This is probably because you are using squid. Those fields are only in main and 
we do not plan on backporting them (yet, see below).

>   I would get errors like:
> 
> Error EINVAL: ServiceSpec: __init__() got an unexpected keyword argument
> 'cluster_meta_uri'
> 
> After commenting out the clustering (for now), I successfully applied this
> YAML, however the .smb pool was never created so I cannot go on to the next
> task of fiddling around with the config files and config json.
 
> Is there a way to create the .smb pool manually?

Yes, you need to create the pool manually with `ceph osd pool create` [1].
Also assign it an application (for example `smb`) [2]:
ceph osd pool application enable .smb smb


[1]   https://docs.ceph.com/en/latest/rados/operations/pools/#creating-a-pool
[2] https://docs.ceph.com/en/latest/rados/operations/pools/#associating-a-pool-with-an-application

Once you have a JSON configuration file you can upload it using the `rados` cli 
tool. Something like `rados --pool=.smb --namespace=<ns> put <objname> 
<filename>`

> Also is there any good basic examples of a config json?    I am not
> connecting to active directory (On Windows 365 accounts so no local AD).

The configuration json is defined by the sambacc project [3]. It's a JSON 
wrapper around samba's configuration plus some container setup magic.

[3] https://github.com/samba-in-kubernetes/sambacc/blob/master/docs/
configuration.md

> I> will eventually write a script to pull the user details and map them to 
the local hosts, but want to get basic services up first.
> 

That sounds pretty cool. I'd love to see what you come up with.


One word of caution about the smb service, especially as it appears in Squid. 
While it should be entirely usable on it's own it will be much more work to 
configure it manually when you use it directly. We've developed a new smb 
manager module that allows you to manage clusters and shares without having to 
know as many of the lower level details needed to use the service spec 
directly. That said, I will support the service if you find bugs, etc. It's 
just not the intended interface for most users of smb on Ceph. This is similar 
to Ceph's NFS module and NFS service (IMO).

It happens that the smb service spec got added to ceph main before squid got 
branched and so it is available on squid but almost everything else SMB 
related is only on the Ceph main branch today. The smb module and related 
features should be usable by the wider community with the Ceph Tentacle 
release. Adam King and I have discussed the possibility of feature backports 
to Squid but I wanted to get the overall suite of smb things  more mature on 
ceph main first.

_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux