Operating System - HP-UX
1834007 Members
2019 Online
110063 Solutions
New Discussion

Help with Cluster configuration

 
SOLVED
Go to solution
rariasn
Honored Contributor

Re: Help with Cluster configuration

Hi,

In node "drapp2":

# vgchange -a n vg01

In node "drapp1":

# vgchange -a y vg01

# cmcheckconf ....

rgs
S-M-S
Valued Contributor

Re: Help with Cluster configuration

yes,
Try the just above steps if you are running teh command from Node 1
arkie
Super Advisor

Re: Help with Cluster configuration

The VG game is still not getting into my head. But, I have reached this stage now. `testcluster` is up. Tried to add a package. `cmcheckconf`, then `cmapplyconf`. Now `cmviewcl -v` is saying:-

# cmviewcl

CLUSTER STATUS
testcluster up

NODE STATUS STATE
drapp1 up running
drapp2 up running

UNOWNED_PACKAGES

PACKAGE STATUS STATE AUTO_RUN NODE
pkg1 down halted disabled unowned

bdf output is not listing the /dev/vgpkg1/lvol1 which should have been mounted on /data

Pls send your valuable inputs. I want to understand this.

Thanks
arkie
Super Advisor

Re: Help with Cluster configuration

Checked the /etc/cmcluster/pkg1/pkg1.cntl.log file:-

########### Node "drapp1": Starting package at Thu Apr 29 17:34:45 IST 2010 ###########
Apr 29 17:34:46 - Node "drapp1": Activating volume group vgpkg1 with exclusive option.
Activated volume group in Exclusive Mode.
Volume group "vgpkg1" has been successfully changed.
Apr 29 17:34:46 - Node "drapp1": Checking filesystems:
lvol1
vxfs fsck: lvol1/rlvol1:cannot stat lvol1/rlvol1
ERROR: Function check_and_mount
ERROR: Failed to fsck one of the logical volumes.
Apr 29 17:34:46 - Node "drapp1": Deactivating volume group vgpkg1
Deactivated volume group in Exclusive Mode.
Volume group "vgpkg1" has been successfully changed.

########### Node "drapp1": Package start failed at Thu Apr 29 17:34:46 IST 2010 ###########
~

Can someone pls help elaborate
rariasn
Honored Contributor

Re: Help with Cluster configuration

Hi,

node 1:

# vgchange -a e vg01

# vgdisplay -v vg01

rgs

S-M-S
Valued Contributor

Re: Help with Cluster configuration

Also put the # mark on fs entries in /etc/fstab for exported file systems (cluster filesystems )
arkie
Super Advisor

Re: Help with Cluster configuration

Some typos in the package control file was the culprit. Now, it looks better

# cmviewcl

CLUSTER STATUS
testcluster up

NODE STATUS STATE
drapp1 up running

PACKAGE STATUS STATE AUTO_RUN NODE
pkg1 up running enabled drapp1

NODE STATUS STATE
drapp2 up running

Now, my /dev/vgpkg1/lvol1 is mounted on /data in Node 1 (drapp1). But it is not mounted in drapp2. Is this normal?

R.O.
Esteemed Contributor

Re: Help with Cluster configuration

Yes, if it is activated as "exclusive" it only can be active in a node at the same time.

Regards,
"When you look into an abyss, the abyss also looks into you"
arkie
Super Advisor

Re: Help with Cluster configuration

Thanks R.O.,

But failover is not happening here.

# cmviewcl

CLUSTER STATUS
testcluster up

NODE STATUS STATE
drapp1 down halted
drapp2 up running

UNOWNED_PACKAGES

PACKAGE STATUS STATE AUTO_RUN NODE
pkg1 down halted disabled unowned
rariasn
Honored Contributor

Re: Help with Cluster configuration

Hi arkie,

Well done.

# cmhaltpkg -v pkg1

# cmrunpkg -v -n drapp2 pkg1

rgs
arkie
Super Advisor

Re: Help with Cluster configuration

Will check automatic failover in tomorrow's session. Pls be there.

Thanks Rariasn,
S-M-S
Valued Contributor

Re: Help with Cluster configuration

# cmmodpkg -e pkg1

try the failover and see what is happening
S-M-S
Valued Contributor

Re: Help with Cluster configuration

the best way to test teh failover is simply rebooting the node1
R.O.
Esteemed Contributor

Re: Help with Cluster configuration

Hi,

I think if you reboot a node it will halt the node and the package, but it won't switch the package. For testing is is better to unplug the system or do a TOC.

Regards,
"When you look into an abyss, the abyss also looks into you"
S.N.S
Valued Contributor

Re: Help with Cluster configuration

Just shutdown node1.
Then cmviewcl on node2 to check the failover!

HTH
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison
arkie
Super Advisor

Re: Help with Cluster configuration

Hi all,

Configuring a second package - pkg2

when running `cmrunpkg pkg2` i am getting the following message:-

vgchange: Activation mode requested for the volume group "/dev/vgpkg2" conflicts with configured mode.

Also, when manually trying to `vgchange -a e vgpkg2`, it is the same message:-

This part is still not clear to me. While creating the VG vgpkg2, I never used any -s or -a e option (as per documents). Same thing worked for my first package - pkg1. But pkg2 is just not coming up.

Pls help point out the mistake.

Thanks

arkie
Super Advisor

Re: Help with Cluster configuration

I have this basic question here:-

What is this configured mode that is conflicting? When is this mode configured exactly? Can we check the configured mode of a VG ? E.g.,

In NodeA
--------
pvcreate /dev/rdsk/c5t0d3
mkdir /dev/vgpkg2
mknod /dev/vgpkg2/group c 64 0x030000
vgcreate /dev/vgpkg2 /dev/dsk/c5t0d3
lvcreate -L 5120 -n lvol1 /dev/vgpkg2
newfs -F vxfs -o largefiles /dev/vgpkg2/rlvol1
mkdir /data2
mount /dev/vgpkg2/lvol1 /data2
umount /data2
vgcfgbackup /dev/vgpkg2
vgchange -a n /dev/vgpkg2
vgexport -p -v -s -m /tmp/vgpkg2.map /dev/vgpkg2
rcp -p /tmp/vgpkg2.map drapp2:/tmp/
strings /etc/lvmtab

In NodeB
--------
mkdir /dev/vgpkg2
mknod /dev/vgpkg2/group c 64 0x030000
vgimport -p -s -m /tmp/vgpkg2.map /dev/vgpkg2
vgchange -a y /dev/vgpkg2
strings /etc/lvmtab

Now how can we check the configured mode of the vgpkg2 VG
Raj D.
Honored Contributor

Re: Help with Cluster configuration

Arkie,

Do the following and check,

# ps -ef | grep -i cmcld #make sure cluster is up.

# vgdisplay vgpkg2
#---unmount all the LVs of it.

# vgchange -c n vgpkg2
# vgchange -a n vgpkg2

# vgchange -c y vgpkg2
# vgchagne -a e vgpkg2

Once the vg activated, deactivate it , and start running the pkg , keeping an eye on the pkg2.cntl.log file to check if vg activation .

Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
arkie
Super Advisor

Re: Help with Cluster configuration

Hi Raj D.

Thanks a lot. Now my both packages are running.

I have a few more queries. What is the recommended size for a LOCK VG/PV ? It is not necessary to activate the mode for 'vglock' to exclusive - pls correct me if i am wrong.

I am still not sure how `pkg1` is running, becoz I never changed its mode to exclusive manually. This i have done only for vgpkg2 and learnt from your inputs.
Stephen Doud
Honored Contributor

Re: Help with Cluster configuration

There is no recommended size for a lock VG.
Did you know that you don't need to create a volume group just for cluster lock? Any of the shared volume groups used for application data can also be used for the lock VG function. The actual cluster lock structure is not in the user area. This will enable you to save disk space.

It is not necessary to activate the lock VG during cluster operations. Serviceguard does not use LVM commands to check/use the lock structure. If you have current Serviceguard software, you could also specify a lock LUN.

When you include a VOLUME_GROUP specification on the cluster configuration ASCII file, such as
VOLUME_GROUP /dev/vg01
...and then perform cmapplyconf on that file, Serviceguard will verify that the VG is not activated, but also shared across nodes in the cluster (checking /etc/lvmtab of each node) and then it will add the "exclusive activation mode" bit to the LVM metadata on the VG disks. Thereafter , the VG can only be activated using 'vgchange -a e ...", which is how the package normally addresses VGs itemized in the package file (control script (legacy package) or package configuration file (modular package))

arkie
Super Advisor

Re: Help with Cluster configuration

Hi Stephen,

Thanks for such precise and helpful information.

Seem to be the beginning to a great learning experience.
S.N.S
Valued Contributor

Re: Help with Cluster configuration

I hope, Arkie, now you are quite clear.

One point:
Exclusive activation of a cluster vg gives write access to only one node of the cluster.

Imagine two nodes changing the same database: there would surely be a corruption!


HTH
SNS
"Genius is 1% inspiration, 99% Perspiration" - Edison