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

Re: [Linux-cluster] Can't leave cluster



Hi Mike,

isplist logicore net wrote:
1. I recommend "service ccsd stop" rather than killall ccsd.
This is actually my latest. While it does not *seem* to work at times, it does take the node out of the cluster cleanly. I say seem because it tells me that the node is still in the cluster yet it's not.

# more stop_gfs
service httpd stop
umount /var/www
vgchange -aln
service clvmd stop
fence_tool leave
service fenced stop
cman_tool leave
service rgmanager stop
sleep 5
service cman stop
Shouldn't there be a "service ccsd stop" at the end?
Never had, don't know why. Always figured it was because of the way I have to start my nodes. I wanted to add my shutdown script into the shutdown run levels so that it's automatic but am not sure how to add that in.
Well, normally the scripts are all in /etc/init.d/ and are the same for startup and shutdown. In the runlevel directories, /etc/rc.d/rc3.d (runlevel 3), /etc/rc.d/rc5.d (runlevel 5) and /etc/rc.d/rc6.d (shutdown) there are symlinks to the scripts. If they start with Sxx they run at startup, and if they start with Kxx they're run at shutdown at that runlevel.

These symlinks for the runlevels are created by the chkconfig tool.
So if I do the command "chkconfig ccsd on" it creates the symlinks for me
at the appropriate runlevels.

Ordinarily, at the top of the scripts have comments at the top that the
"chkconfig" tool uses to figure out how to name these symlinks.
So if you look at the top of /etc/init.d/ccsd, you'll see something like this:

# chkconfig: 345 20 80

The 345 means it starts up at runlevels 3, 4 and 5. The "20" means it symlinks S20ccsd in /etc/rc.d/rc3.d/ from /etc/init.d/ccsd. The 80 means K80 at runlevel 6.
The scripts are run in numerical order, so number "S20" will be run before
any of the S21 scripts, etc.  And K80 will be run after K79.

Do you mean I should just copy my shutdown script into that directory?
Not exactly. What I meant is that your script should not be necessary because
the shutdown init scripts should run automatically and take of everything
for you.  If you really want to use your script, you can add the appropriate
comments to your script, copy it to /etc/init.d, and do chkconfig <script name> on"
to create the symlinks.
If there's a problem shutting down with the normal scripts, perhaps
we need to file a bug and get the scripts changed.
Well, here is my startup script for each node, maybe the answer lies in how I start them?

depmod -a
modprobe dm-mod
modprobe gfs
modprobe lock_dlm

service rgmanager start
ccsd
cman_tool join -w
fence_tool join -w
clvmd
vgchange -aly
mount -t gfs /dev/VolGroup04/web /var/www/

cp -f /var/www/system/httpd.conf /etc/httpd/conf/.
cp -f /var/www/system/php.ini /etc/.
/etc/init.d/httpd start

Mike
Okay, so maybe you just need to do:
chkconfig cman on;chkconfig ccsd on; chkconfig gfs on; chkconfig clvmd on;
chkconfig rgmanager on; chkconfig fenced on; chkconfig httpd on;and so forth,
so they're started up at boot time, and taken down in the correct order
at shutdown time.

Regards,

Bob Peterson
Red Hat Cluster Suite


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