Use this procedure to configure Sun Cluster HA for Samba as a failover data service. This procedure assumes that you installed the data service packages during your initial Sun Cluster installation.
If you did not install the Sun Cluster HA for Samba packages as part of your initial Sun Cluster installation, go to How to Install the Sun Cluster HA for Samba Packages.
Otherwise, use this procedure to configure the Sun Cluster HA for Samba data service as a failover service.
Become superuser on one of the nodes in the cluster that will host Samba.
Register the SUNW.gds resource type.
# scrgadm -a -t SUNW.gds |
Register the SUNW.HAStoragePlus resource type.
# scrgadm -a -t SUNW.HAStoragePlus |
Create a failover resource group .
# scrgadm -a -g Samba-failover-resource-group |
Create a resource for the Samba Disk Storage.
# scrgadm -a -j Samba-has-resource \ -g Samba-failover-resource-group \ -t SUNW.HAStoragePlus \ -x FilesystemMountPoints=Samba- instance-mount-points |
Create a resource for the Samba Logical Hostname.
# scrgadm -a -L -j Samba-lh-resource \ -g Samba-failover-resource-group \ -l Samba-logical-hostname |
Enable the failover resource group that now includes the Samba Disk Storage and Logical Hostname resources.
# scswitch -Z -g Samba-failover-resource-group |
Create and register Winbind as a failover data service (if required)
# cd /opt/SUNWscsmb/winbind/util |
Edit the winbind_config file and follow the comments within that file, ie
# These parameters can be customized in (key=value) form # # RS - name of the resource for the application # RG - name of the resource group containing RS # WB_BIN - name of the Winbind bin directory # WB_INST - name of the Winbind configuration directory # NTUSER - name of the NT fault monitor user # LH - name of the LogicalHostname SC resource # HAS_RS - name of the Winbind HAStoragePlus SC resource |
The following is an example for a Winbind instance with Samba installed from http://www.samba.org.
RS=wb-res RG=smb-failover-rg WB_BIN=/global/samba/bin WB_INST=/global/samba/winbind NTUSER=samba LH=smb-lh-res HAS_RS=wb-has-res |
After editing winbind_config you must now register the resource.
# ./winbind_register |
Enable the Winbind resource (if previous step was done)
# scstat # scswitch -e -j Winbind-resource |
Create and register Samba as a failover data service
# cd /opt/SUNWscsmb/samba/util |
Edit the samba_config file and follow the comments within that file, i.e.
# These parameters can be customized in (key=value) form # # RS - name of the resource for the application # RG - name of the resource group containing RS # SMB_BIN - name of the Samba bin directory # SMB_SBIN - name of the Samba sbin directory # (If no sbin then specify the bin directory) # SMB_INST - name of the Samba configuration directory # SMB_LOG - name of the Samba log directory # for log.smbd and log.nmbd # (If not specified will default # to $SMB_INST/logs) # FMUSER - name of the Samba fault monitor user # FMPASS - name of the Samba fault monitor user password # LH - name of the LogicalHostname SC resource # HAS_RS - name of the Samba HAStoragePlus SC resource, plus the # name of the Winbind resource if Winbind is configured # as a failover service |
The following is an example for Samba instance SAMBA1 with Samba installed from http://www.samba.org
RS=smb-res RG=smb-failover-rg SMB_BIN=/global/samba/bin SMB_SBIN=/global/samba/sbin or /global/samba/bin SMB_INST=/global/samba/SAMBA1 SMB_LOG=/global/samba/SAMBA1/logs FMUSER=samba FMPASS=samba LH=smb-lh-res HAS_RS=smb-has-res or HAS_RS=smb-has-res,wb-res if failover winbind is being used |
The following is an example for Samba instance SMB1 with Samba installed from Solaris 9
RS=smb-res RG=smb-failover-rg SMB_BIN=/usr/sfw/bin SMB_SBIN=/usr/sfw/sbin SMB_INST=/local/samba/SMB1 SMB_LOG=/local/samba/SMB1/logs FMUSER=samba FMPASS=samba LH=smb-lh-res HAS_RS=smb-has-res |
After editing samba_config you must now register the resource.
# ./samba_register |
Enable each Samba resource.
Repeat this step for each Samba instance, if multiple instances were created.
# scstat # scswitch -e -j Samba-resource |