KB450158 – CephFS + Samba + CTDB

Last modified: July 3, 2019
You are here:
Estimated reading time: 1 min

CephFS + Samba + CTDB

Install Required Packages

DO THIS ON EACH CTDB NODE

  • yum -y install samba samba-winbind samba-winbind-clients ctdb pam_krb5  -y

Configure krb5

DO THIS ONE NODE AND COPY FILES TO EACH OTHER CTDB NODE

  • vim /etc/krb5.conf
  • [libdefaults]
    	default_realm =45LAB.COM
    	dns_lookup_realm = false
    	dns_lookup_kdc = true

Configure nsswitch

DO THIS ONE NODE AND COPY FILES TO EACH OTHER CTDB NODE

  • vim /etc/nsswitch.conf
  • ...
    passwd:     files winbind
    shadow:     files sss
    group:      files winbind
    ...

Configure DNS

DO THIS ONE NODE AND COPY FILES TO EACH OTHER CTDB NODE

  • Primary DNS address needs to resolve to Domain Controller
  • Add the FQDN to the hosts files of each CTDB node
    • ...	
      192.168.18.43    vfsgw1.45lab.com      vfsgw1
      192.168.18.44    vfsgw2.45lab.com      vfsgw2
      192.168.18.45    vfsgw3.45lab.com      vfsgw3
      ...

Configure smb.conf

DO THIS ONE NODE AND COPY FILES TO EACH OTHER CTDB NODE

  • # See smb.conf.example for a more detailed config file or
    # read the smb.conf manpage.
    # Run 'testparm' to verify the config is correct after
    # you modified it.
    
    [global]
            clustering = yes
            workgroup = 45LAB
            security = ADS
            realm = 45LAB.COM
    
            winbind use default domain = yes
            winbind enum users = yes
            winbind enum groups = yes
    
            netbios name = vfsgw
            idmap config * : backend = tdb
            idmap config * : range = 1000000-1999999
            idmap config 45LAB : backend = rid
            idmap config 45LAB : range = 2000000-9000000
    
    [cephfs]
            valid users = @"domain users"
            write list = @"domain users"
            path = /mnt/cephfs/fsgw

Configure ctdb

DO THIS ON EACH CTDB NODE

  • curl -LO https://raw.githubusercontent.com/45Drives/tools/master/ctdb-config
  • chmod +x ctdb-config
  • ./ctdb-config -d /mnt/cephfs/ctdb/ -m smb -w
    • Enter the number of nodes in cluster: 3
      Node_0 IP: 192.168.18.43
      Node_1 IP: 192.168.18.44
      Node_2 IP: 192.168.18.45
      VIP Address: 192.168.18.46
      Subnet: (bitmask) 16
      Network Interfaces:eth0
      Interface to host VIP: eth0
      Enter another VIP? (y/[n]) n

Join Domain

DO THIS ON EACH CTDB NODE

  • systemctl start ctdb
  • net ads join -U Administrator
    • Enter bk's password:
      Using short domain name -- 45LAB
      Joined 'VFSGW' to dns domain '45lab.com'
      Not doing automatic DNS update in a clustered setup.
  • systemctl restart ctdb
Was this article helpful?
Dislike 1
Views: 532
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access