About Us

RSInfoMinds, a web based IT Training and Consultancy firm. It is established with high dreams in training people in IT Infrastructure Field. We provide Online and Class Room training in various fields of IT Infrastructure Management.

Join Us: http://www.facebook.com/RSInfoMinds
Mail Us: rsinfominds@gmail.com
Twitter: @RSInfoMinds

We are specialized in the below courses:

Redhat Linux Admin Redhat Linux Cluster
Redhat Virutualization IBM AIX Admin
IBM AIX Virtualization IBM AIX Cluster
HP Unix Admin HP Unix Cluster
HP Unix Virtualization Shell Scripting
Veritas Volume Manager Veritas Cluster
Oracle Core DBA VMWare


We provide training in such a way, So that you get in depth knowledge on the Courses you look for.

And we ensure you are very confident from each and every Techincal aspect that the IT Industry needs and expects from you.

We also conduct Workshops on the latest technology and the real time faculties sharing their work experiences to make you the best.

Sunday, 16 March 2014

Adding a Resource to an existing Cluster

Now I am going to add a script as a resource to an existing cluster.

Sample Script:

[root@node1 oracle]# cat script.shout
Sat Mar 15 10:01:17 EDT 2014 on node1.cluster.com
[root@node1 oracle]# cat script.sh
#!/bin/ksh


while true
do
        echo "`date` on `hostname`"  >> ${0}out
        sleep 4
done
[root@node1 oracle]#

Creating a Process Resource:


[root@node1 oracle]# hares -add oracle_process Process oracle_sg
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
[root@node1 ~]# hares -modify oracle_process Critical 1
[root@node1 ~]# hares -modify oracle_process UserName  root
[root@node1 ~]# hares -modify oracle_process PathName  /oracle/script.sh
[root@node1 ~]# hares -modify oracle_process Enabled 1
[root@node1 ~]# hares -link oracle_process oracle_ip

VCS Configruation: Part VI

Doing a Cluster Test:

[root@node1 /]# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  node1                RUNNING              0
A  node2                RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled    State

B  oracle_sg       node1                Y          N               ONLINE
B  oracle_sg       node2                Y          N               OFFLINE
[root@node1 /]# df -Th /oracle
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/vx/dsk/oracle/oracle_vol
              vxfs    500M  3.3M  466M   1% /oracle

[root@node1 /]# hagrp -switch oracle_sg -to node2


[root@node1 /]# hastatus -sum

-- SYSTEM STATE
-- System               State                Frozen

A  node1                RUNNING              0
A  node2                RUNNING              0

-- GROUP STATE
-- Group           System               Probed     AutoDisabled    State

B  oracle_sg       node1                Y          N               OFFLINE
B  oracle_sg       node2                Y          N               ONLINE
[root@node1 /]#

Thats it.



VCS Configruation: Part V

Once everything is done. On the Java Console You would see the message:



Now the last step is create a  link between the resource.

Disk Group is the parent of the volume.

Volume is the parent of the mount.

[root@node1 /]# hares -link oracle_vol oracle_dg
[root@node1 /]# hares -link oracle_mnt oracle_vol



VCS Configruation: Part IV


Creating a Resources:

Disk Group:

[root@node1 /]# hares -add oracle_dg DiskGroup oracle_sg

[root@node1 /]# hares -modify oracle_dg DiskGroup oracle
[root@node1 /]# hares -modify oracle_dg Enabled 1
[root@node1 /]# hares -online oracle_dg -sys node1
[root@node1 /]# hares -state
#Resource    Attribute             System     Value
oracle_dg    State                 node1      ONLINE
oracle_dg    State                 node2      OFFLINE
[root@node1 /]#


Volume Resource:

[root@node1 /]# hares -modify oracle_vol DiskGroup oracle
[root@node1 /]# hares -modify oracle_vol Volume oracle_vol
[root@node1 /]# hares -modify oracle_vol Enabled 1
[root@node1 /]# hares -online oracle_vol -sys node1
[root@node1 /]# hares -state oracle_vol
#Resource    Attribute             System     Value
oracle_vol   State                 node1      ONLINE
oracle_vol   State                 node2      OFFLINE
[root@node1 /]#

Mount Point:

[root@node1 /]# hares -add oracle_mnt Mount oracle_sg
[root@node1 /]# hares -modify oracle_mnt Enabled 1
[root@node1 /]# hares -modify oracle_mnt FsckOpt %-y
[root@node1 /]# hares -modify oracle_mnt BlockDevice /dev/vx/dsk/oracle/oracle_vol
[root@node1 /]# hares -modify oracle_mnt FSType vxfs
[root@node1 /]# hares -modify oracle_mnt MountPoint /oracle
[root@node1 /]# hares -modify oracle_mnt Critical 1
[root@node1 /]# hares -online oracle_mnt -sys node1
[root@node1 /]# hares -state oracle_mnt
#Resource    Attribute             System     Value
oracle_mnt   State                 node1      ONLINE
oracle_mnt   State                 node2      OFFLINE
[root@node1 /]#


VCS Configruation: Part III

Creating the cluster resource.

Since we are going to create a HA LVM:

Disk Group: oracle

Volume: oracle_vol

Mount Point: /oracle

1) We are going to create a Service Group: oracle_sg

[root@node1 /]# hagrp -add oracle_sg
VCS NOTICE V-16-1-10136 Group added; populating SystemList and setting the Parallel attribute recommended before adding resources
[root@node1 /]# hagrp -modify oracle_sg SystemList node1 0 node2 1
[root@node1 /]# hagrp -list
oracle_sg               node1
oracle_sg               node2
[root@node1 /]#

[root@node1 /]# hagrp -list
oracle_sg               node1
oracle_sg               node2
[root@node1 /]#


[root@node1 /]# hagrp -state
#Group       Attribute             System     Value
oracle_sg    State                 node1      |OFFLINE|
oracle_sg    State                 node2      |OFFLINE|
[root@node1 /]#



VCS Configruation: Part II

Export and Import the disk group on the alternate node:

[root@node1 /]# umount /oracle
[root@node1 /]# vxdg list
NAME         STATE           ID
oracle       enabled,cds          1394886552.14.node1.cluster.com
[root@node1 /]# vxdg deport oracle
[root@node1 /]# vxdg list
NAME         STATE           ID
[root@node1 /]#


[root@node2 ~]# vxdg -t import oracle
[root@node2 ~]# vxdg list
NAME         STATE           ID
oracle       enabled,cds          1394886552.14.node1.cluster.com
[root@node2 ~]# vxprint -g oracle
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg oracle       oracle       -        -        -        -        -       -

dm disk_8       disk_8       -        2027264  -        -        -       -

v  oracle_vol   fsgen        ENABLED  1024000  -        ACTIVE   -       -
pl oracle_vol-01 oracle_vol  ENABLED  1024000  -        ACTIVE   -       -
sd disk_8-01    oracle_vol-01 ENABLED 1024000  0        -        -       -
[root@node2 ~]#


Mounting on alternate node:


[root@node2 ~]# mount -t vxfs /dev/vx/dsk/oracle/oracle_vol /oracle
[root@node2 ~]# df -Th /oracle
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/vx/dsk/oracle/oracle_vol
              vxfs    500M  3.3M  466M   1% /oracle
[root@node2 ~]#


VCS Configruation: Part I

The below post will show how to create a Cluster HA filesystem resource:

[root@node1 /]# vxdisk -e list
DEVICE       TYPE           DISK        GROUP        STATUS               OS_NATIVE_NAME   ATTR
disk_8       auto:cdsdisk   -            -           online               sdc              -
sda          auto:none      -            -           online invalid       sda              -
sdb          auto:LVM       -            -           LVM                  sdb              -
[root@node1 /]#

[root@node2 ~]# vxdisk -e list
DEVICE       TYPE           DISK        GROUP        STATUS               OS_NATIVE_NAME   ATTR
disk_8       auto:cdsdisk   -            -           online               sdb              -
sda          auto:none      -            -           online invalid       sda              -
[root@node2 ~]#


Creating a disk group:

[root@node1 /]# vxdg init oracle disk_8
[root@node1 /]# vxdg list
NAME         STATE           ID
oracle       enabled,cds          1394886552.14.node1.cluster.com
[root@node1 /]#

Creating a volume:

[root@node1 /]# vxassist -g oracle make oracle_vol 500M
[root@node1 /]# vxprint -g oracle
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg oracle       oracle       -        -        -        -        -       -

dm disk_8       disk_8       -        2027264  -        -        -       -

v  oracle_vol   fsgen        ENABLED  1024000  -        ACTIVE   -       -
pl oracle_vol-01 oracle_vol  ENABLED  1024000  -        ACTIVE   -       -
sd disk_8-01    oracle_vol-01 ENABLED 1024000  0        -        -       -
[root@node1 /]#

Formating and Mount the filesystem:

[root@node1 /]# mount -t vxfs /dev/vx/dsk/oracle/oracle_vol /oracle
[root@node1 /]# df -Th /oracle
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/vx/dsk/oracle/oracle_vol
              vxfs    500M  3.3M  466M   1% /oracle
[root@node1 /]#