Operating System - HP-UX
1819862 Members
2698 Online
109607 Solutions
New Discussion юеВ

Re: How to add samba within cluster file when failover a package

 
Mahesh Alexander
Frequent Advisor

How to add samba within cluster file when failover a package

Hi all,

I've been told to add the samba service inside a package. I know that inside the configuration cluster I can put LVs that I want the package to mount when running it or failover it to another node, but, where can I tell the cluster file to run samba as well or whatever service or script?

Thanks for your support, as always.
5 REPLIES 5
Mahesh Alexander
Frequent Advisor

Re: How to add samba within cluster file when failover a package

I have found this inside the cluster file, Is this where I need to modify in order to achieve my goal? Please advise. Thx!

-------------------------------------

# SERVICE NAMES AND COMMANDS.
# Specify the service name, command, and restart parameters which are
# used by this package. Uncomment SERVICE_NAME[0]="", SERVICE_CMD[0]="",
# SERVICE_RESTART[0]="" and fill in the name of the first service, command,
# and restart parameters. You must begin with SERVICE_NAME[0], SERVICE_CMD[0],
# and SERVICE_RESTART[0] and increment the list in sequence.
#
# For example:
# SERVICE_NAME[0]=pkg1a
# SERVICE_CMD[0]="/usr/bin/X11/xclock -display 192.10.25.54:0"
# SERVICE_RESTART[0]="" # Will not restart the service.
#
# SERVICE_NAME[1]=pkg1b
# SERVICE_CMD[1]="/usr/bin/X11/xload -display 192.10.25.54:0"
# SERVICE_RESTART[1]="-r 2" # Will restart the service twice.
#
# SERVICE_NAME[2]=pkg1c
# SERVICE_CMD[2]="/usr/sbin/ping"
# SERVICE_RESTART[2]="-R" # Will restart the service an infinite
# number of times.
#
# Note: No environmental variables will be passed to the command, this
# includes the PATH variable. Absolute path names are required for the
# service command definition. Default shell is /usr/bin/sh.
#
#SERVICE_NAME[0]=""
#SERVICE_CMD[0]=""
#SERVICE_RESTART[0]=""
Rita C Workman
Honored Contributor

Re: How to add samba within cluster file when failover a package

Here's a 'thought'

I'm going to assume the HPUX box is the host.
So it is 'sharing' up an HPUX f/s that is part of the package.

Not sure if you have multiple SAMBA things runnings. You could create a master smb.conf and copy it on the other node(s) in your cluster.
Then within your cluster control scripts, run to start SAMBA in your customer defined start scripts section. And run to stop SAMBA in your customer defined stop scripts sections.

Just a thought,
Rita
Mahesh Alexander
Frequent Advisor

Re: How to add samba within cluster file when failover a package

What I have done so far is configured cluster file on both nodes with the following:

#SERVICE_NAME[0]=samba
#SERVICE_CMD[0]="/sbin/init.d/samba"
#SERVICE_RESTART[0]="-r 1"

I guess this will work alright, isn't it?
Mahesh Alexander
Frequent Advisor

Re: How to add samba within cluster file when failover a package

CORRECTION: ups! without comments duh!

SERVICE_NAME[0]=samba
SERVICE_CMD[0]="/sbin/init.d/samba"
SERVICE_RESTART[0]="-r 1"
Brian Hackley
Honored Contributor

Re: How to add samba within cluster file when failover a package

Hi Mahesh,

Chapter 12 of the CIFS Admin guide http://bizsupport1.austin.hp.com/bc/docs/support/SupportManual/c02020671/c02020671.pdf points you to the /opt/samba/HA/README file and examples in the /opt/samba/HA directory.

Hope that helps,
Brian
Ask me about telecommuting!