Search This Blog

Thursday, November 20, 2014

How to find the console IP from the running OS in HP Unix

For 11.23

boxnet:/opt/hpsmh/data/htdocs/comppage # ./getMPInfo.cgis
content-type: text/html

top.RIB.name = "Embedded iLO";
top.RIB.link = "https://200.205.83.80";

For 11.31
boxnet:/root#/opt/propplus/bin/cprop -summary -c "Management Processor"

[Component]: Management Processor
[Table]: Management Processor
-------------------------------------------------------
****************************************************
                   [Hash ID]: Management Processor:c9cfd694x3163c066
                    [Status]: OK
                 [IPAddress]: 200.17.16.60
                       [URL]: http://200.17.16.60
                     [State]: Enabled
****************************************************

If CIM Client is installed in the given host, then the below command will work of all flavour of unix.
# /opt/sfm/bin/CIMUtil -e root/cimv2 HP_ManagementProcessor

#/opt/sfm/bin/CIMUtil -e root/cimv2 HP_ManagementProcessor
Instance 0 :

UniqueIdentifier :  0.20.194.156.15.46
ControllerType :  0
OtherControllerType : 
IPAddress :  200.17.16.60
URL :  https://200.17.16.60
Dedicated :  14
CreationClassName :  HP_ManagementProcessor
Name :  Management Processor
EnabledState :  2
OperationalStatus :  2
FirmwareRevision :  F.002.026.000
LEDColour :  0
LEDBlinkRate :  0
NICCondition :  6

Thank you for Reading,

For Reading other article, visit to “https://sites.google.com/site/unixwikis/

Tuesday, September 16, 2014

Proxy & Phantom Resources in Veritas Cluster

In this document, we are going to see how to configure Veritas proxy and phantom.

Let’s suppose if we are using more than one service group on cluster and it’s all using same NIC then we can use proxy and phantom on that.

Proxy Resources
Generally for OnOff resources you use dependencies and for resources with "None" operations you use Proxy - let me explain further.

An IP has "OnOff" operations - you online it and offline it and a NIC has "None" operations - you don't online or offline it, but it is required to be there for your application to work, so VCS just monitors it.  A proxy just copies state of resource it is proxying - it does NOT offline or online the resource it is proxying so it is suitable for NIC, but not IP.

Also if 2 applications share the same IP, then it is better to put the resources all into one service group and use resource dependencies to make both applications depend on the IP as both applications will move as one unit from one server to another as they cannot co-exist on different servers if there share the same IP.

You can use a Proxy resource to allow multiple service groups to monitor the same network interfaces. This reduces the network traffic that results from having multiple NIC resources in different service groups monitor the same interface.
The Proxy resource mirrors the status of another resource in a different service group. The required attribute, TargetResName, is the name of the resource whose status is reflected by the Proxy resource.
TargetSysName is an optional attribute specifies the name of the system on which the target resource status is monitored. If no system is specified, the local system is used as the target system.

Example for Proxy Resource:
Proxy PreProd_proxy (

Critical = 0
TargetResName = PreProd_MultiNICB
)

Phantom Resource

The phantom resource is used to report the actual status of a service group that consists of only persistent resources. A service group shows an online status only when all of its nonpersistent resources are online. Therefore, if a service group has only persistent resources (network interface), VCS considers the group offline, even if the persistent resources are running properly. By adding a phantom resource, the status of the service group is shown as online.

Basic rules of a service group is that you must be able to offline it and online it, and this is not possible if you don't have any OnOff resources in the group, in which case you could add a dummy "FileOnOff" resource, but the Phantom resource was designed for this.

Also note, never try to manually offline or online the Phantom resource - always offline or online the group


List of NIC Resource in the 4-node cluster
hares -list Type=NIC
appnic boxnet1
appnic boxnet2
csgnic boxnet1
csgnic boxnet2
csgnic boxnet3
csgnic boxnet4
netnic boxnet1
netnic boxnet2
netnic boxnet3
netnic boxnet4
nfsnic boxnet1
nfsnic boxnet2
oranic boxnet1
oranic boxnet2

Configuring a common parallel network service group named netsg
# haconf -makerw
# hagrp -add netsg
# hagrp -modify netsg SystemList boxnet1 0 boxnet2 1 boxnet3 2 boxnet4 3
# hagrp -modify netsg AutoStartlist boxnet1 boxnet2 boxnet3 boxnet4
# hagrp -modify netsg Parallel 1

Display the service group attributes for the netsg service group
hagrp -display netsg | more
#Group Attribute System Value
netsg AdministratorGroups global
netsg Administrators global
netsg Authority global 0
netsg AutoFailOver global 1
netsg AutoRestart global 1
netsg AutoStart global 1
netsg AutoStartIfPartial global 1
netsg AutoStartList global boxnet1 boxnet2 boxnet3 boxnet4
netsg AutoStartPolicy global Order
netsg ClusterFailOverPolicy global Manual
...
netsg Parallel global 1
...
netsg SystemList global boxnet1 0 boxnet2 1
boxnet3 2 boxnet4 3
...

Save the configuration File:
haconf –dump

Add a resource of type NIC named netnic to the netsg service group
hares -add netnic NIC netsg
hares -modify netnic Device eth0
hares -modify netnic Critical 0

Display the resource attributes values for the netnic resource
hares -display netnic | more
#Resource Attribute System Value
netnic Group global netsg
netnic Type global NIC
netnic AutoStart global 1
netnic Critical global 0
netnic Enabled global 0

...
netnic Device global eth0

Enable the netnic resource and verify that it is enabled
hares -modify netnic Enabled 1
hares -value netnic Enabled
1

hares -state netnic
#Resource Attribute System Value
netnic State boxnet1 ONLINE
netnic State boxnet2 ONLINE
netnic State boxnet3 ONLINE
netnic State boxnet4 ONLINE

Display the state of the netsg service group
hagrp -state netsg
#Group Attribute System Value
netsg State boxnet1 |OFFLINE|
netsg State boxnet2 |OFFLINE|
netsg State boxnet3 |OFFLINE|
netsg State boxnet4 |OFFLINE|

Save the configuration File:
haconf -dump

Add a resource of type Phantom named netphantom to the netsg service group.
hares -add netphantom Phantom netsg
hares -modify netphantom Critical 0

Display the resource attribute values for the netphantom resource
hares -display netphantom | more
#Resource Attribute System Value
netphantom Group global netsg
netphantom Type global Phantom
netphantom AutoStart global 1
netphantom Critical global 0
netphantom Enabled global 0

hares -modify netphantom Enabled 1
hares -value netphantom Enabled
1

hares -state netphantom
#Resource Attribute System Value
netphantom State boxnet1 ONLINE
netphantom State boxnet2 ONLINE
netphantom State boxnet3 ONLINE
netphantom State boxnet4 ONLINE

Display the state of the netsg
hagrp -state netsg
#Group Attribute System Value
netsg State boxnet1 |ONLINE|
netsg State boxnet2 |ONLINE|
netsg State boxnet3 |ONLINE|
netsg State boxnet4 |ONLINE|

Save the configuration File:
haconf -dump

Example of Configuring Proxy Resources:

Let’s use netnic resources, Replacing NIC resources with Proxy resources in other Service Group.

Identify the names of the resources of type NIC that are configured.

hares -list Type=NIC
appnic boxnet1
appnic boxnet2

csgnic boxnet1
csgnic boxnet2
csgnic boxnet3
csgnic boxnet4
netnic boxnet1
netnic boxnet2
netnic boxnet3
netnic boxnet4
nfsnic boxnet1
nfsnic boxnet2
oranic boxnet1
oranic boxnet2

Ignoring the resource of type NIC named netnic, list the resource dependencies associated with the listed resources of type NIC

hares -dep appnic csgnic nfsnic oranic
#Group Parent Child
ClusterService notifier csgnic
ClusterService webip csgnic
appsg appip appnic
nfssg nfsip nfsnic
orasg oraip oranic

Replace the resource of type NIC named appnic with a resource of type Proxy named appproxy using the following information.
Set the Critical attribute to 0 (zero).
Set the TargetResName attribute to netnic.
Set Enabled to 1 (one).
Link to the appip resource.

hares -delete appnic
hares -add appproxy Proxy appsg
hares -modify appproxy Critical 0
hares -modify appproxy TargetResName netnic

hares -display appproxy | more
#Resource Attribute System Value
appproxy Group global appsg
appproxy Type global Proxy
appproxy AutoStart global 1
appproxy Critical global 0
appproxy Enabled global 0
...
appproxy TargetResName global netnic
...

hares -modify appproxy Enabled 1
hares -value appproxy Enabled
1

hares -state appproxy
#Resource Attribute System Value
appproxy State boxnet1 ONLINE
appproxy State boxnet2 ONLINE

hares -link appip appproxy
hares -dep | grep appproxy
appsg appip appproxy


Replace the resource of type NIC named csgnic with a resource of type Proxy named csgproxy using the following information.
Set the Critical attribute to 0 (zero).
Set the TargetResName attribute to netnic.
Set Enabled to 1 (one).
Link to the notifier and webip resources.

hares -delete csgnic
hares -add csgproxy Proxy ClusterService
hares -modify csgproxy Critical 0
hares -modify csgproxy TargeResName netnic
hares -display csgproxy | more
#Resource Attribute System Value
csgproxy Group global ClusterService
csgproxy Type global Proxy
csgproxy AutoStart global 1
csgproxy Critical global 0
csgproxy Enabled global 0
...
csgproxy TargetResName global netnic
...

hares -modify csgproxy Enabled 1

hares -value csgproxy Enabled
1
hares -state csgproxy
#Resource Attribute System Value
csgproxy State boxnet1 ONLINE
csgproxy State boxnet2 ONLINE
csgproxy State boxnet3 ONLINE
csgproxy State boxnet4 ONLINE

hares -link webip csgproxy
hares -link notifier csgproxy

hares -dep | grep csgproxy
ClusterService notifier csgproxy
ClusterService webip csgproxy

Replace the resource of type NIC named nfsnic with a resource of type Proxy named nfsproxy using the following information.
Set the Critical attribute to 0 (zero).
Set the TargetResName attribute to netnic.
Set Enabled to 1 (one).
Link to the nfsip resource.

hares -delete nfsnic
hares -add nfsproxy Proxy nfssg
hares -modify nfsproxy Critical 0
hares -modify nfsproxy TargetResName netnic
hares -display nfsproxy | more
#Resource Attribute System Value
nfsproxy Group global nfssg
nfsproxy Type global Proxy
nfsproxy AutoStart global 1
nfsproxy Critical global 0
nfsproxy Enabled global 0
...
nfsproxy TargetResName global netnic
...

hares -modify nfsproxy Enabled 1
hares -value nfsproxy Enabled
1

hares -state nfsproxy
#Resource Attribute System Value
nfsproxy State boxnet1 ONLINE
nfsproxy State boxnet2 ONLINE

hares -link nfsip nfsproxy

hares -dep | grep nfsproxy
nfssg nfsip nfsproxy

Replace the resource of type NIC named oranic with a resource of type Proxy named oraproxy using the following information.
Set the Critical attribute to 0 (zero).
Set the TargetResName attribute to netnic.
Set Enabled to 1 (one).
Link to the oraip resource.

hares -delete oranic
hares -add oraproxy Proxy orasg
hares -modify oraproxy Critical 0
hares -modify oraproxy TargetResName netnic
hares -display oraproxy | more
#Resource Attribute System Value
oraproxy Group global orasg
oraproxy Type global Proxy
oraproxy AutoStart global 1
oraproxy Critical global 0
oraproxy Enabled global 0
...
oraproxy TargetResName global netnic
...

hares -modify oraproxy Enabled 1
hares -value oraproxy Enabled
1
hares -state oraproxy
#Resource Attribute System Value
oraproxy State boxnet1 ONLINE
oraproxy State boxnet2 ONLINE

hares -link oraip oraproxy

hares -dep | grep oraproxy
orasg oraip oraproxy


Save and close the VCS configuration.
haconf -dump -makero

Thank you for Reading,
For Reading other article, visit to “https://sites.google.com/site/unixwikis/https://sites.google.com/site/unixwikis/


Monday, September 15, 2014

To remove and replace a disk in the coordinator disk group



To remove and replace a disk in the coordinator disk group

  1. Log in as superuser on one of the cluster nodes.
  2. If VCS is running, shut it down:
# hastop –all

  1. Stop I/O fencing on all nodes:
# /sbin/init.d/vxfen stop

This removes any registration keys on the disks.

  1. Import the coordinator disk group. The file /etc/vxfendg includes the name of the disk group (typically, vxfencoorddg) that contains the coordinator disks, so use the command:
# vxdg -tfC import ‘cat /etc/vxfendg‘

where:
-t specifies that the disk group is imported only until the node restarts.
-f specifies that the import is to be done forcibly, which is necessary if one or more disks is not accessible.
-C specifies that any import blocks are removed.

  1. To remove disks from the disk group, use the VxVM disk administrator utility, vxdiskadm.
You may also destroy the existing coordinator disk group. For example:
# vxdg destroy vxfencoorddg

  1. Add the new disk to the node, initialize it as a VxVM disk, and add it to the vxfencoorddg disk group.
  2. Test the recreated disk group for SCSI-3 persistent reservations compliance.
  3. After replacing disks in a coordinator disk group, deport the disk group:
# vxdg deport ‘cat /etc/vxfendg‘

  1. On each node, start the I/O fencing driver:
# /sbin/init.d/vxfen start

  1. If necessary, restart VCS on each node:
# hastart

Thank you for Reading,
For Reading other article, visit to “https://sites.google.com/site/unixwikis/https://sites.google.com/site/unixwikis/