Operating System - HP-UX
1836603 Members
2067 Online
110102 Solutions
New Discussion

Re: Cluster lock location

 
Gabriel Suchter
Advisor

Cluster lock location

Good day.

I am starting learn ServiceGuard and I'd like to ask You a question related to the Cluster Lock.
Where it is located and how can I find out if it is set.
I found on ITRC forum that the cluster lock is located on Bad Block Relocation area or on VG bad block area. What happens if on disk surface occurs bad block and disk uses block from Bad Block Relocation area where is written cluster lock?
And as I know on VG is no bad block area, but I'm not sure.

Thanks for your help.

Gabriel
5 REPLIES 5
Geoff Wild
Honored Contributor

Re: Cluster lock location

Cluster lock can be located on any disk that is "seen" by all nodes in a cluster.

Here's a script I have to check it:

# cat chkclusterlock
#!/bin/sh
#
# script to check for existence of cluster lock
#


PATH=/usr/bin:/usr/sbin

if [[ `id -u` != 0 ]]
then
print "\n$0: Must be super-user to run this command."
exit 1
fi

HOST=`hostname`
DEV=`cmviewconf |sed -n -e "/$HOST/{$!N;p;}" -e h | cut -d: -f2 |grep dev|awk -F/ '{print $4}'`

if [ -c /dev/rdsk/$DEV ]
then
SIZE=`diskinfo /dev/rdsk/$DEV | grep size |awk '{print $2}'`
if [ $SIZE = "io_search failed: No match found." ]
then
echo "The disk /dev/rdsk/$DEV does NOT exist on $HOST!!!"
exit 1
fi
echo "The cluster lock disk /dev/rdsk/$DEV on $HOST is $SIZE kbytes."
exit 0
else
echo "/dev/rdsk/$DEV does not exist on $HOST!!!"
exit 1
fi


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Gabriel Suchter
Advisor

Re: Cluster lock location

Hi Geoff,

thanks for your reply, but I would like to know where particularly is cluster block located on disk, on which block.

Gabriel
Geoff Wild
Honored Contributor

Re: Cluster lock location

The lock is created in a special area on a particular LVM physical volume.

The lock area on the disk is not mirrored, even though the physical volume may be a part of a volume group that contains mirrored logical volumes.

Basically, the cluster lock flag is stored in the LVM Record Header of the disk.

I think there is a way to get it out with adb.

I'll see if I can get more info...

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
melvyn burnard
Honored Contributor

Re: Cluster lock location

The cluster lock bit is located in the Bad Block Relocation area of a physical disc.
Thios disc should have Bad Block relocation disabled if you are worried about it
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
A. Clay Stephenson
Acclaimed Contributor

Re: Cluster lock location

and since you are studying SG, a better idea is to completely forget about lock disks. The much better and more flexible answer these days is a Quorum Server (which can be a cheap Linux box) -- and QS's are the only answer in SG for Linux --- so don't spend too much times studying (almost) obsolete techniques.
If it ain't broke, I can fix that.