Vcs and Oracle Ha
Vcs and Oracle Ha
Veritas is a trademark of Symantec corp and/or of Veritas. RHEL is a trademark of Red Hat. Oracle is a
trademark of Oracle. There are other various trademarks no attempt is made to infringe. Apology as
necessary is made in advance.
This guide may prepare you to work with the daily routine tasks of veritas cluster server on RHEL.
This guide may be useful for the following tasks:
1)Understand the meaning of clustering and High Availibility.
2)Understand the components of Veritas Cluster server.
3)Installing Veritas Cluster Server
4)Installing Oracle Database as a highly available service (this means it will run on one node if another
node fails).
5)Basic maintenance of a Veritas Cluster.
6)Troubleshooting
7)Interview questions.
This guide is best followed by actually doing all the steps presented herein. I am using an i7 PC with
windows operating system(you may use RHEL), 8GB of Ram(this is the very least recommended) and
about 350GB of disk space. A network interface is required. An internet connection is required. Free
accounts at Symantec(for downloading the trial version of Veritas Cluster Server SFHA Storage
Foundation High Availibility) and at Oracle(trial edition of Oracle Database Enterprise version) are
essential.
In Virtualbox(free virtualization technology that works on both windows and on Linux) I am giving
2048MB to both VM's and 1024MB to the virtualised storage(oprnfiler). I am designating one cpu for
all three. So, for an 8GB physical host this leaves 8-2-2-1=3GB for the underlying operating system.
And, leaves, 4-1(openfiler)-1(node1)-1(node2)=1 core(cpu) for the base physical system hosting
everything of the 4core cpu i7 processor.
Down to it.
What is a cluster:
A computer cluster consists of a set of loosely or tightly connected computers(here called nodes) that
work together so that, in many respects, they can be viewed as a single system. Computer clusters have
each node set to perform the same task, controlled and scheduled by software.
The components of a cluster are usually connected to each other through fast local area networks
("LAN"), with each node (computer used as a server) running its own instance of an operating system.
All of the nodes use IDENTICAL hardware and IDENTICAL operating system.
They are usually deployed to improve performance and availability over that of a single computer,
while typically being much more cost-effective than single computers of comparable speed or
availability.
A cluster typically has two or more nodes(computers) connected to each other by TWO networks. A
high speed private network which usually consists of two links (two network cards dedicated for the
private interconnect) and a second network which is the public network via which clients(you and me
and application users) can access the cluster(for them it is a single computer. The other facet to a cluster
is the requirement of shared storage. Shared storage are disk(s) which are connected to all the nodes of
the cluster.
The premise is not that complicated. The premise of clustering being that if one node of the cluster goes
down/crashes the other node picks up. To this end both nodes of the cluster need to be aware if another
one crashes, this is accomplished usually by the presence of the private network of high speed
interconnect. When one node crashes the application hosted on the cluster fails over to the other node
of the cluster. This is HIGH AVAILIBILITY.
You might have noticed how ebay/google/amazon etc do not crash, this is again because behind the
ebay.com/google/com/amazon.com is a cluster of two or more computers which provides redundancy
to the entire setup.
A cluster hence consists of hardware and the cluster software(which actually provides the clustering
between the nodes of the cluster).
Types of clustering software:
There are several commercially available clustering softwares, the important ones are:
a)Veritas Cluster Server
b)Sun Clustering
c)RHEL/CentOS native clustering
In this guide we will focus on Veritas Cluster Server.
The components of VCS:
Veritas cluster concepts
VCS Basics
Select New and choose the path of the RHEL 6.x iso image and add a total of three bridged network
interfaces as shown in the below steps.
click Create
Click Next
Click Next
Click Network
Click open
Click OK
Now we are ready to start this VM. Please click on Start.
Select a password.
Reboot
Forward
Forward
Register Later
then
Forward
Forward
Finish
Reboot
Login
Then Right Click
Open in Terminal
So we observe that the eth0 dhcp assigned address is 192.168.0.189, we will make this a static address.
At this time, please download putty from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
and connect to 192.168.0.189 via putty
[ OK ]
Shutting down interface eth1:
[ OK ]
Shutting down interface eth2:
[ OK ]
Shutting down loopback interface:
[ OK ]
Bringing up loopback interface:
[ OK ]
Bringing up interface eth0: Active connection state: activated
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/2
[ OK ]
[root@node1 ~]#
Now we will disable two features, one is selinux and the other is iptables:
[root@node1 ~]# vi /etc/selinux/config
change enforcing to disabled, it should look like this:
[root@node1 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@node1 ~]#
Then, do:
[root@node1 ~]# chkconfig iptables off
Now we will power it down and clone it into another system called node2.
[root@node1 ~]# init 0
As you see below, node1 is powered off:
Select clone
Click Clone
We will now power on node2 and change it's name in the operating system to node2, give it a new IP
address, this will make them exactly two different systems.
Highlight node2 and start it
reboot
While you are at it, start node1 as well
Now we have both VM's which will be the two nodes of our cluster up and running.
Now we will install over virtual storage area network. This is openfiler. To do this we will again go to
virtualbox.
Go to virtualbox and click New
Click Network
Click start
Hit Enter
Select Yes
Reboot
username is openfiler
password is password
Now power it down and add a drive to it. This drive will be the shared storage for our cluster. We will
give it 40GB. Please observe below:
Click Create
Please click Ok
As you may observe an additional drive has been allocated. Now we will configure this as an iSCSI
target in openfiler.
NOTE: You may do well to study up on:
1)Hardware virtualization
2)Virtualization software
3)Virtual Machines
4)RHEL/CentOS network startup scripts
5)iSCSI
6)Oracle database
7)VCS!!!
Let us start openfiler once more
go to https://192.168.0.191:446
Click on volumes tab and then on the right side on block devices
NOTE: PLEASE DO NOT TOUCH THE DISK WITH THREE PARTITIONS, THAT IS THE
OPENFILER BOOT DRIVE Now, we click on /dev/sdb
NOTE: PLEASE DO NOT TOUCH THE DISK WITH THREE PARTITIONS, THAT IS THE
OPENFILER BOOT DRIVE Now, we click on /dev/sdb
Click Create
FROM RIGHT PLANE, CLICK ON VOLUME GROUPS
NOTE: we have in vol0, created a volume named lun0, maxed out on the space allocated to it and
chosen iSCSI as the Filesystem/Volume type
Click Create
Click on Map
Now start node1 and node 2 and on both nodes launch putty sessions to them. On EACH node do this:
[root@node1 ~]# yum install iscsi-initiator-utils.x86_64
On any node, say, node2, do this:
[root@node2 ~]# service iscsid start
[root@node2 ~]# chkconfig iscsid on
[root@node2 ~]# chkconfig iscsi on
[root@node2 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.0.191
192.168.0.191:3260,1 iqn.2006-01.com.openfiler:tsn.d5db5d22c74d
192.168.0.191:3260,1 iqn.2006-01.com.openfiler:tsn.e5b215212686
192.168.0.191:3260,1 iqn.2006-01.com.openfiler:tsn.57b9916dc11a
192.168.0.191:3260,1 iqn.2006-01.com.openfiler:tsn.d3e4680d2625
192.168.0.191:3260,1 iqn.2006-01.com.openfiler:tsn.b795fec580c1
[root@node2 ~]# iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.d5db5d22c74d -p 192.168.0.191
--login
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:tsn.d5db5d22c74d, portal:
192.168.0.191,3260] (multiple)
Login to [iface: default, target: iqn.2006-01.com.openfiler:tsn.d5db5d22c74d, portal:
192.168.0.191,3260] successful.
[root@node2 ~]# fdisk -l
Disk /dev/sda: 68.7 GB, 68719476736 bytes
255 heads, 63 sectors/track, 8354 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000c60df
Device Boot Start
End
Blocks Id System
/dev/sda1 *
1
64
512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2
64
8355 66595840 8e Linux LVM
Disk /dev/mapper/vg_node1-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_node1-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[ OK ]
PLEASE NOTE: I have commented out the MAC/HWADDR and changed NM_CONTROLLED to no
Next:
[root@node2 yum.repos.d]# ifup eth1
Error: No suitable device found: no device found for connection 'System eth1'.
[root@node2 yum.repos.d]# ifup eth2
Error: No suitable device found: no device found for connection 'System eth2'.
[root@node2 yum.repos.d]# vi /etc/sysconfig/network-scripts/ifcfg-eth2
[root@node2 yum.repos.d]#
OOPS we have an issue, never mind, we will resolve it:
[root@node2 yum.repos.d]# cd /etc/udev/rules.d
[root@node2 rules.d]# ls -al
total 52
drwxr-xr-x. 2 root root 4096 Apr 1 20:27 .
drwxr-xr-x. 4 root root 4096 Apr 1 20:19 ..
-rw-r--r--. 1 root root 1652 Aug 25 2010 60-fprint-autosuspend.rules
-rw-r--r--. 1 root root 1060 Jun 29 2010 60-pcmcia.rules
-rw-r--r--. 1 root root 316 Aug 11 2014 60-raw.rules
-rw-r--r--. 1 root root 530 Apr 1 20:27 70-persistent-cd.rules
-rw-r--r--. 1 root root 1245 Apr 1 20:56 70-persistent-net.rules
-rw-r--r--. 1 root root 40 Sep 9 2014 80-kvm.rules
-rw-r--r--. 1 root root 320 Jun 25 2014 90-alsa.rules
-rw-r--r--. 1 root root 83 Jun 19 2014 90-hal.rules
-rw-r--r--. 1 root root 2486 Jun 30 2010 97-bluetooth-serial.rules
-rw-r--r--. 1 root root 308 Aug 26 2014 98-kexec.rules
-rw-r--r--. 1 root root 54 Nov 3 2011 99-fuse.rules
[root@node2 rules.d]# rm -f 70-persistent-net.rules
[root@node2 rules.d]# reboot
TRY AGAIN
On node1
[root@node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
#HWADDR=08:00:27:61:F4:AE
TYPE=Ethernet
UUID=905581ef-c586-485c-be3c-65bb81e0b52a
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.10.10.10
[root@node1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
#HWADDR=08:00:27:61:F4:AE
TYPE=Ethernet
UUID=905581ef-c586-485c-be3c-65bb81e0b52a
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=10.10.10.11
[root@node1 ~]#
[root@node1 ~]# service NetworkManager stop
Stopping NetworkManager daemon:
[root@node1 ~]# chkconfig NetworkManager off
[root@node1 ~]#
[root@node1 ~]# cd /etc/udev/rules.d
[root@node1 rules.d]# ls -al
total 52
drwxr-xr-x. 2 root root 4096 Apr 1 20:27 .
drwxr-xr-x. 4 root root 4096 Apr 1 20:19 ..
-rw-r--r--. 1 root root 1652 Aug 25 2010 60-fprint-autosuspend.rules
-rw-r--r--. 1 root root 1060 Jun 29 2010 60-pcmcia.rules
-rw-r--r--. 1 root root 316 Aug 11 2014 60-raw.rules
-rw-r--r--. 1 root root 530 Apr 1 20:27 70-persistent-cd.rules
-rw-r--r--. 1 root root 750 Apr 1 20:14 70-persistent-net.rules
-rw-r--r--. 1 root root 40 Sep 9 2014 80-kvm.rules
-rw-r--r--. 1 root root 320 Jun 25 2014 90-alsa.rules
-rw-r--r--. 1 root root 83 Jun 19 2014 90-hal.rules
-rw-r--r--. 1 root root 2486 Jun 30 2010 97-bluetooth-serial.rules
-rw-r--r--. 1 root root 308 Aug 26 2014 98-kexec.rules
-rw-r--r--. 1 root root 54 Nov 3 2011 99-fuse.rules
[root@node1 rules.d]# rm -f 70-persistent-net.rules
[root@node1 rules.d]# reboot
[root@node1 rules.d]#
Broadcast message from [email protected]
(/dev/pts/1) at 8:11 ...
The system is going down for reboot NOW!
Now we have downloaded the SFHA(Veritas Storage Foundation High Availibility) package on node1,
we will now commence installing VCS.
[root@node1 ~]# cd /home/testuser/Downloads/
[root@node1 Downloads]# ls -al
total 3673040
drwxr-xr-x. 2 testuser testuser
4096 Apr 2 07:29 .
drwx------. 26 testuser testuser
4096 Apr 1 20:49 ..
-rw-r--r-- 1 testuser testuser 1673544724 Apr 2 07:20 linuxamd64_12102_database_1of2.zip
-rw-r--r-- 1 testuser testuser 1014530602 Apr 2 07:16 linuxamd64_12102_database_2of2.zip
-rw-r--r-- 1 testuser testuser 1073090232 Apr 2 07:36 VRTS_SF_HA_Solutions_6.1_RHEL.tar.gz
[root@node1 Downloads]#
[root@node1 Downloads]# gzip -d VRTS_SF_HA_Solutions_6.1_RHEL.tar.gz
[root@node1 Downloads]#
[root@node1 Downloads]# tar xvf VRTS_SF_HA_Solutions_6.1_RHEL.tar
<snip>
./dvd1-redhatlinux/rhel6_x86_64/docs/dynamic_multipathing/
./dvd1-redhatlinux/rhel6_x86_64/docs/dynamic_multipathing/dmp_admin_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/dynamic_multipathing/dmp_install_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/dynamic_multipathing/dmp_notes_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/getting_started.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/readme_first.txt
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/sfhas_db2_admin_61_unix.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/sfhas_oracle_admin_61_unix.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/sfhas_replication_admin_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/sfhas_smartio_solutions_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/sfhas_solutions_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/sfha_solutions/sfhas_tshoot_61_lin.pdf
./dvd1-redhatlinux/rhel6_x86_64/docs/sf_cluster_file_system_ha/
<snip>
Symantec Product
Version Installed on node1 Licensed
=========================================================================
=======
Symantec Licensing Utilities (VRTSvlic) are not installed due to which products and licenses are not
discovered.
Use the menu below to continue.
Task Menu:
P) Perform a Pre-Installation Check I) Install a Product
C) Configure an Installed Product
G) Upgrade a Product
O) Perform a Post-Installation Check U) Uninstall a Product
L) License a Product
S) Start a Product
D) View Product Descriptions
X) Stop a Product
R) View Product Requirements
?) Help
Enter a Task: [P,I,C,G,O,U,L,S,D,X,R,?]
Choose option I
1)
2)
3)
4)
5)
L) License a Product
S) Start a Product
D) View Product Descriptions
X) Stop a Product
R) View Product Requirements
?) Help
Enter a Task: [P,I,C,G,O,U,L,S,D,X,R,?] I
Symantec Storage Foundation and High Availability
Solutions 6.2 Install Program
1)
2)
3)
4)
5)
6)
7)
b)
Version
Rpm Description
3.02.61.010
Licensing
5.16.1.6
Perl Redistribution
The following Symantec Storage Foundation and High Availability rpms will be installed on all
systems:
Rpm
Version
Rpm Description
VRTSperl
5.16.1.26
Perl Redistribution
VRTSvlic
3.02.62.003
Licensing
VRTSspt
6.2.0.000
Software Support Tools
VRTSvxvm
6.2.0.000
Volume Manager Binaries
VRTSaslapm
6.2.0.000
Volume Manager - ASL/APM
VRTSob
3.4.703
Enterprise Administrator Service
VRTSvxfs
6.2.0.000
File System
VRTSfsadv
6.2.0.000
File System Advanced Solutions
VRTSfssdk
6.2.0.000
File System Software Developer Kit
VRTSllt
6.2.0.000
Low Latency Transport
VRTSgab
6.2.0.000
Group Membership and Atomic Broadcast
VRTSvxfen
6.2.0.000
I/O Fencing
VRTSamf
6.2.0.000
Asynchronous Monitoring Framework
VRTSvcs
6.2.0.000
Cluster Server
VRTScps
6.2.0.000
Cluster Server - Coordination Point Server
VRTSvcsag
6.2.0.000
Cluster Server Bundled Agents
VRTSvcsdr
6.2.0.000
Cluster Server Disk Reservation Modules
VRTSvcsea
6.2.0.000
Cluster Server Enterprise Agents
VRTSdbed
6.2.0.000
Storage Foundation Databases
VRTSodm
6.2.0.000
Oracle Disk Manager
VRTSsfmh
6.1.0.100
Storage Foundation Managed Host
VRTSvbs
6.2.0.000
Virtual Business Service
VRTSvcswiz
6.2.0.000
Cluster Server Wizards
VRTSsfcpi62
6.2.0.000
Storage Foundation Installer
Press [Enter] to continue:
Symantec Storage Foundation and High
Availability 6.2 Install Program
node1 node2
Logs are being written to /var/tmp/installer-201504021652DRd while installer is in progress
Uninstalling SFHA: 100%
Estimated time remaining: (mm:ss) 0:00
4 of 4
Performing SFHA preremove
tasks .............................................................................................................................................................
................................... Done
Uninstalling
VRTSvlic .....................................................................................................................................................
..................................................... Done
Uninstalling
VRTSperl ....................................................................................................................................................
...................................................... Done
Performing SFHA postremove
tasks .............................................................................................................................................................
.................................. Done
Symantec Storage Foundation and High Availability Uninstall completed successfully
Symantec Storage Foundation and High
Availability 6.2 Install Program
node1 node2
Logs are being written to /var/tmp/installer-201504021652DRd while installer is in progress
Installing SFHA: 100%
Estimated time remaining: (mm:ss) 0:00
26 of 26
Performing SFHA preinstall
tasks .............................................................................................................................................................
.................................. Done
Installing VRTSperl
rpm ..............................................................................................................................................................
.......................................... Done
Installing VRTSvlic
rpm ..............................................................................................................................................................
.......................................... Done
Installing VRTSspt
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSvxvm
rpm ..............................................................................................................................................................
.......................................... Done
Installing VRTSaslapm
rpm ..............................................................................................................................................................
........................................ Done
Installing VRTSob
rpm ..............................................................................................................................................................
............................................ Done
Installing VRTSvxfs
rpm ..............................................................................................................................................................
.......................................... Done
Installing VRTSfsadv
rpm ..............................................................................................................................................................
......................................... Done
Installing VRTSfssdk
rpm ..............................................................................................................................................................
......................................... Done
Installing VRTSllt
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSgab
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSvxfen
rpm ..............................................................................................................................................................
......................................... Done
Installing VRTSamf
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSvcs
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTScps
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSvcsag
rpm ..............................................................................................................................................................
......................................... Done
Installing VRTSvcsdr
rpm ..............................................................................................................................................................
......................................... Done
Installing VRTSvcsea
rpm ..............................................................................................................................................................
......................................... Done
Installing VRTSdbed
rpm ..............................................................................................................................................................
.......................................... Done
Installing VRTSodm
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSsfmh
rpm ..............................................................................................................................................................
.......................................... Done
Installing VRTSvbs
rpm ..............................................................................................................................................................
........................................... Done
Installing VRTSvcswiz
rpm ..............................................................................................................................................................
........................................ Done
Installing VRTSsfcpi62
rpm ..............................................................................................................................................................
....................................... Done
Performing SFHA postinstall
tasks .............................................................................................................................................................
................................. Done
Symantec Storage Foundation and High Availability Install completed successfully
Symantec Storage Foundation and High
Availability 6.2 Install Program
node1 node2
To comply with the terms of Symantec's End User License Agreement, you have 60 days to either:
* Enter a valid license key matching the functionality in use on the systems
* Enable keyless licensing and manage the systems with a Management Server. For more details visit
http://go.symantec.com/sfhakeyless. The product is fully functional during these 60 days.
1) Enter a valid license key
2) Enable keyless licensing and complete system licensing later
How would you like to license the systems? [1-2,q] (2)
1) SF Standard HA
2) SF Enterprise HA
b) Back to previous menu
Select product mode to license: [1-2,b,q,?] (1) 2
Would you like to enable replication? [y,n,q] (n)
Would you like to enable the Global Cluster Option? [y,n,q] (n)
Registering SFHA license
SFHA vxkeyless key (SFHAENT) successfully registered on node1
SFHA vxkeyless key (SFHAENT) successfully registered on node2
Would you like to configure SFHA on node1 node2? [y,n,q] (n) y
I/O Fencing
It needs to be determined at this time if you plan to configure I/O Fencing in enabled or disabled mode,
as well as help in determining the number of network interconnects (NICS) required on your systems.
If you configure I/O Fencing in
enabled mode, only a single NIC is required, though at least two are recommended.
A split brain can occur if servers within the cluster become unable to communicate for any number of
reasons. If I/O Fencing is not enabled, you run the risk of data corruption should a split brain occur.
Therefore, to avoid data
corruption due to split brain in CFS environments, I/O Fencing has to be enabled.
The cluster cannot be configured if the cluster ID 77 is in use by another cluster. Installer can perform a
check to determine if the cluster ID is duplicate. The check will take less than a minute to complete.
Would you like to check if the cluster ID is in use by another cluster? [y,n,q] (y) n
NIC: eth0
IP: 192.168.0.200
NetMask: 255.255.255.0
Is this information correct? [y,n,q] (y)
Symantec Storage Foundation and High
Availability 6.2 Install Program
node1 node2
Symantec recommends to run Symantec Cluster Server in secure mode.
Running VCS in Secure Mode guarantees that all inter-system communication is encrypted, and users
are verified with security credentials.
When running VCS in Secure Mode, NIS and system usernames and passwords are used to verify
identity. VCS usernames and passwords are no longer utilized when a cluster is running in Secure
Mode.
Would you like to configure the VCS cluster in secure mode? [y,n,q,?] (y) n
Fencing configuration
1) Configure Coordination Point client based fencing
2) Configure disk based fencing
3) Configure majority based fencing
Select the fencing mechanism to be configured in this Application Cluster: [1-3,q,?] q
Symantec Storage Foundation and High
Availability 6.2 Install Program
node1 node2
To configure VCS, answer the set of questions on the next screen.
When [b] is presented after a question, 'b' may be entered to go back to the first question of the
configuration set.
When [?] is presented after a question, '?' may be entered for help or additional information about the
question.
Following each set of questions, the information you have entered will be presented for confirmation.
To repeat the set of questions and correct any previous errors, enter 'n' at the confirmation prompt.
No configuration changes are made to the systems until all configuration questions are completed and
confirmed.
Privilege: Administrators
node1 node2
Logs are being written to /var/tmp/installer-201504021652DRd while installer is in progress
Starting SFHA: 100%
Estimated time remaining: (mm:ss) 0:00
21 of 21
Performing SFHA
configuration ...............................................................................................................................................
................................................... Done
Starting
vxdmp ..........................................................................................................................................................
....................................................... Done
Starting
vxio ..............................................................................................................................................................
.................................................... Done
Starting
vxspec ..........................................................................................................................................................
...................................................... Done
Starting
vxconfigd ....................................................................................................................................................
......................................................... Done
Starting
vxesd ...........................................................................................................................................................
...................................................... Done
Starting
vxrelocd .......................................................................................................................................................
....................................................... Done
Starting
vxcached ......................................................................................................................................................
........................................................ Done
Starting
vxconfigbackupd .........................................................................................................................................
.............................................................. Done
Starting
vxattachd .....................................................................................................................................................
........................................................ Done
Starting
xprtld ...........................................................................................................................................................
..................................................... Done
Starting
vxportal .......................................................................................................................................................
....................................................... Done
Starting
fdd ...............................................................................................................................................................
.................................................... Done
Starting
vxcafs ..........................................................................................................................................................
...................................................... Done
Starting
llt .................................................................................................................................................................
.................................................. Done
Starting
gab ...............................................................................................................................................................
.................................................... Done
Starting
amf ..............................................................................................................................................................
..................................................... Done
Starting
had ...............................................................................................................................................................
.................................................... Done
Starting
CmdServer ..................................................................................................................................................
........................................................... Done
Starting
vxodm ..........................................................................................................................................................
....................................................... Done
Performing SFHA poststart
tasks .............................................................................................................................................................
................................... Done
Symantec Storage Foundation and High Availability Startup completed successfully
Symantec Storage Foundation and High
Availability 6.2 Install Program
node1 node2
Fencing configuration
1) Configure Coordination Point client based fencing
2) Configure disk based fencing
3) Configure majority based fencing
Select the fencing mechanism to be configured in this Application Cluster: [1-3,q,?] q
RUNNING
RUNNING
Frozen
0
0
-- GROUP STATE
-- Group
System
B ClusterService node1
B ClusterService node2
[root@node1 ~]#
Probed
Y
Y
AutoDisabled
N
N
State
ONLINE
OFFLINE
GROUP
STATUS
online invalid
sdc
online invalid
sda
OS_NATIVE_NAME ATTR
-
GROUP
STATUS
online invalid
online invalid
?
??
q
GROUP
STATUS
newdg
online
online invalid
sda
sdc
OS_NATIVE_NAME ATTR
-
[root@node1 vx]#
Now we will add this volume(and associated filesystem) into Veritas Cluster Server (VCS) control.
ON BOTH NODES DO THIS:
[root@node2 ~]# mkdir /ORACLE
[root@node2 ~]#
[root@node1 vx]# mkdir /ORACLE
[root@node1 vx]#
[root@node1 vx]# hagrp -add new_servicegroup
VCS NOTICE V-16-1-10136 Group added; populating SystemList and setting the Parallel attribute
recommended before adding resources
[root@node1 vx]# hagrp -modify new_servicegroup Parallel 0
[root@node1 vx]# hagrp -modify new_servicegroup SystemList node1 0 node2 1
[root@node1 vx]# hagrp -modify new_servicegroup AutoStartList node1
[root@node1 vx]#
[root@node1 vx]# hares -add diskgroup_resource DiskGroup new_servicegroup
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
[root@node1 vx]# hares -modify diskgroup_resource DiskGroup newdg
[root@node1 vx]# hares -modify diskgroup_resource Critical 0
[root@node1 vx]# hares -modify diskgroup_resource Enabled 1
[root@node1 vx]#
[root@node1 vx]# hares -add volume_resource Volume new_servicegroup
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
[root@node1 vx]# hares -modify volume_resource Critical 0
[root@node1 vx]# hares -modify volume_resource DiskGroup newdg
[root@node1 vx]# hares -modify volume_resource Volume newvol
[root@node1 vx]# hares -modify volume_resource Enabled 1
[root@node1 vx]#
[root@node1 vx]# hares -add mount_resource Mount new_servicegroup
VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
[root@node1 vx]# hares -modify mount_resource Critical 0
[root@node1 vx]# hares -modify mount_resource MountPoint /ORACLE
[root@node1 vx]# hares -modify mount_resource BlockDevice /dev/vx/dsk/newdg/newvol
[root@node1 vx]# hares -modify mount_resource FSType vxfs
[root@node1 vx]# hares -modify mount_resource FsckOpt %-y
[root@node1 vx]# hares -modify mount_resource Enabled 1
[root@node1 vx]# hares -offline mount_resource -sys node1
[root@node1 vx]# hares -online volume_resource -sys node1
[root@node1 vx]# hares -online mount_resource -sys node1
[root@node1 vx]# df -kh
Filesystem
Size Used Avail Use% Mounted on
/dev/mapper/vg_node1-lv_root
50G 9.6G 37G 21% /
tmpfs
940M 228K 939M 1% /dev/shm
/dev/sda1
477M 65M 387M 15% /boot
/dev/mapper/vg_node1-lv_home
9.3G 8.9G 17M 100% /home
tmpfs
4.0K 0 4.0K 0% /dev/vx
/dev/vx/dsk/newdg/newvol
34G 78M 32G 1% /ORACLE
[root@node1 vx]#
[root@node1 vx]# hares -modify diskgroup_resource Critical 1
[root@node1 vx]# hares -modify volume_resource Critical 1
[root@node1 vx]# hares -modify mount_resource Critical 1
Once all of the resources have been added to the service group, VCS must be told in which
order to bring them online. Otherwise, it will try to bring all resources on line simultaneously.
The command 'hares -link res2 res1' will create a dependency such that "res1" MUST be
online before VCS will attempt to start "res2":
Obviously the diskgroup must be operational before the volume which in turn must be available prior
to the mount resource.
[root@node1 vx]# hares -link volume_resource diskgroup_resource
[root@node1 vx]# hares -link mount_resource volume_resource
[root@node1 vx]#
RUNNING
RUNNING
-- GROUP STATE
-- Group
System
B
B
B
B
Frozen
ClusterService node1
ClusterService node2
new_servicegroup node1
new_servicegroup node2
0
0
Probed
Y
Y
AutoDisabled
N
N
Y
Y
N
N
State
ONLINE
OFFLINE
OFFLINE
STARTING|PARTIAL
-- RESOURCES ONLINING
-- Group
Type
Resource
F new_servicegroup Volume
[root@node1 vx]# hastatus -sum
-- SYSTEM STATE
-- System
State
A node1
A node2
B
B
B
B
ClusterService node1
ClusterService node2
new_servicegroup node1
new_servicegroup node2
IState
volume_resource
node2
0
0
Probed
Y
Y
AutoDisabled
N
N
Y
Y
N
N
-- RESOURCES ONLINING
-- Group
Type
Resource
A node1
A node2
System
IState
B ClusterService node1
B ClusterService node2
B new_servicegroup node1
B new_servicegroup node2
[root@node1 vx]#
node2
W_ONLINE
Frozen
RUNNING
RUNNING
-- GROUP STATE
-- Group
System
State
ONLINE
OFFLINE
OFFLINE
STARTING|PARTIAL
F new_servicegroup Mount
mount_resource
[root@node1 vx]# hastatus -sum
-- SYSTEM STATE
-- System
State
W_ONLINE
Frozen
RUNNING
RUNNING
-- GROUP STATE
-- Group
System
System
0
0
Probed
Y
Y
AutoDisabled
N
N
Y
Y
N
N
State
ONLINE
OFFLINE
OFFLINE
ONLINE
SO WE HAVE BEEN ABLE TO SWITCH THE VOLUME FROM ONE NODE TO THE OTHER,
HENCE IF ONE NODE GOES DOWN(CRASHES) THE VOLUME WILL STILL BE AVAILABLE
VIA THE OTHER NODE.
Check node2
[root@node2 ~]# df -kh
Filesystem
Size Used Avail Use% Mounted on
/dev/mapper/vg_node1-lv_root
50G 6.5G 41G 14% /
tmpfs
940M 224K 939M 1% /dev/shm
/dev/sda1
477M 65M 387M 15% /boot
/dev/mapper/vg_node1-lv_home
9.3G 23M 8.8G 1% /home
tmpfs
4.0K 0 4.0K 0% /dev/vx
/dev/vx/dsk/newdg/newvol
34G 78M 32G 1% /ORACLE
[root@node2 ~]#
LLT (Low Latency Transport) provides fast, kernel-to-kernel comms and monito
network connections. The system admin configures the LLT by creating a
configuration file (llttab) that describes the systems in the cluster and pr
network links among them. The LLT runs in layer 2 of the network stack
GAB (Group membership and Atomic Broadcast) provides the global message orde
required to maintain a synchronised state among the systems, and monitors di
comms such as that required by the VCS heartbeat utility. The system admin
configures GAB driver by creating a configuration file ( gabtab).
LLT
GAB
The file is a database, containing one entry per system, that links
the LLT system ID with the hosts name. The file is identical on each
server in the cluster.
/etc/llttab
/etc/gabtab
The file contains the information needed to configure the GAB driver.
This file is used by the gabconfig utility.
The VCS configuration file. The file contains the information that
/
etc/VRTSvcs/conf/config/main.cf defines the cluster and its systems.
Gabtab Entries
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2
/sbin/gabdiskconf - i /dev/dsk/c1t2d0s2
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s
/sbin/gabdiskhb -a /dev/dsk/c1t2d0s2 -s
/sbin/gabconfig -c -n2
gabdiskconf
-i
-s
-S
-a
-s
gabdiskhb (heartbeat disks) -p
-S
gabconfig
-c
-s 16 -S 1123
-s 144 -S 1124
16 -p a -s 1123
144 -p h -s 1124
-n
lltstat -n
lltstat -p
lltstat -l
lltconfig -U
gabconfig -U
gabconfig -a
Unregister port f
/opt/VRTS/bin/fsclustadm cfsdeinit
Port Function
a
b
d
f
h
o
q
v
w
gab driver
I/O fencing (designed to guarantee data integrity)
ODM (Oracle Disk Manager)
CFS (Cluster File System)
VCS (VERITAS Cluster Server: high availability daemon)
VCSMM driver (kernel module needed for Oracle and VCS interfa
QuickLog daemon
CVM (Cluster Volume Manager)
vxconfigd (module for cvm)
Cluster daemons
High Availability Daemon
Companion Daemon
had
<resource>Agent
hashadow
CmdServer
/var/VRTSvcs/log
/var/VRTSvcs/log/engine_A.log
hastart [-stale|-force]
Bring the cluster into running mode from a stale state using the configuration file
from a particular server
stop the cluster on the local server but leave the application/s running, do not
failover the application/s
hastop -local
stop cluster on local server but evacuate (failover) the application/s to another node hastop -local -evacuate
Cluster Status
display cluster summary
hastatus -summary
hastatus
hasys -display
Cluster Details
information about a cluster
value for a specific cluster attribute
haclus -display
Disable LinkMonitoring
Users
add a user
modify a user
delete a user
hauser -display
System Operations
add a system to the cluster
hasys -state
Dynamic Configuration
The VCS configuration must be in read/write mode in order to make changes. When in
read/write mode the
configuration becomes stale, a .stale file is created in $VCS_CONF/conf/config. When
the configuration is put
back into read only mode the .stale file is removed.
Change configuration to read/write mode
Change configuration to read-only mode
haconf -makerw
0 = write mode
1 = read only mode
hacf -verify /etc/VRTSvcs/conf/config
Note: you can point to any directory as long as it has main.cf and types
convert a main.cf file into cluster commands hacf -cftocmd /etc/VRTSvcs/conf/config -dest /tmp
convert a command file into a main.cf file
Service Groups
add a service group
haconf -makerw
hagrp -add groupw
hagrp -modify groupw SystemList sun1 1 sun2 2
hagrp -autoenable groupw -sys sun1
haconf -dump -makero
haconf -makerw
hagrp -delete groupw
haconf -dump -makero
haconf -makerw
hagrp -modify groupw SystemList sun1 1 sun2 2 sun3 3
haconf -dump -makero
Note: use the "hagrp -display <group>" to list attributes
hagrp -list
Freeze a service group (disable onlining and offlining) note: use the following to check "hagrp -display <group> | grep T
Unfreeze a service group (enable onlining and
offlining)
haconf -makerw
hagrp -enable <group> [-sys]
haconf -dump -makero
Resources
add a resource
delete a resource
change a resource
haconf -makerw
hares -add appDG DiskGroup groupw
hares -modify appDG Enabled 1
hares -modify appDG DiskGroup appdg
hares -modify appDG StartVolumes 0
haconf -dump -makero
haconf -makerw
hares -delete <resource>
haconf -dump -makero
haconf -makerw
hares -modify appDG Enabled 1
haconf -dump -makero
Note: list parameters "hares -display <resource>"
hares -dep
hares -list
Resource Operations
Online a resource
Offline a resource
display the state of a resource( offline, online, etc)
hares -state
Resource Types
Add a resource type
hatype -list
Resource Agents
add a agent
remove a agent
change a agent
list all ha agents
n/a
Display agents run-time information i.e has it started, haagent -display <agent_name>
is it running ?
Display agents faults
Stop an agent
Interview Questions
The ultimate Veritas Cluster Server (VCS) interview questions
Basics
What are the different service group types ?
Service groups can be one of the 3 type :
1. Failover Service group runs on one system at a time.
2. Parallel Service group runs on multiple systems simultaneously.
3. Hybrid Used in replicated data clusters (disaster recovery setups). SG behaves as Failover within
the local cluster and Parallel for the remote cluster.
Where is the VCS main configuration file located ?
The main.cf file contains the configuration of the entire cluster and is located in the directory
/etc/VRTSvcs/conf/config.
# cat /etc/llthosts
0 node01
1 node02
LLT has an another optional configuration file : /etc/VRTSvcs/conf/sysname. It contains short names
for VCS to refer. It can be used by VCS to remove the dependency on OS hostnames.
What are various GAB configuration files and their function ?
The file /etc/gabtab contains the command to start the GAB.
# cat /etc/gabtab
/sbin/gabconfig -c -n 4
here -n 4 > number of nodes that must be communicating in order to start VCS.
How to start/stop GAB
The commands to start and stop GAB are :
# gabconfig -c
(start GAB)
# gabconfig -U
(stop GAB)
How to start/stop LLT
The commands to stop and start LLT are :
# lltconfig -c
-> start LLT
# lltconfig -U
-> stop LLT (GAB needs to stopped first)
Whats a GAB seeding and why manual GAB seeding is required ?
The GAB configuration file /etc/gabtab defines the minimum number of nodes that must be
communicating for the cluster to start. This is called as GAB seeding.
In case we dont have sufficient number of nodes to start VCS [ may be due to a maintenance activity ],
but have to do it anyways, then we have do what is called as manual seeding by firing below command
on each of the nodes.
# gabconfig -c -x
How to start HAD or VCS ?
To start HAD or VCS on all nodes in the cluster, the hastart command need to be run on all nodes
individually.
# hastart
What are the various ways to stop HAD or VCS cluster ?
The command hastop gives various ways to stop the cluster.
# hastop -local
# hastop -local -evacuate
# hastop -local -force
# hastop -all -force
# hastop -all
-local -> Stops service groups and VCS engine [HAD] on the node where it is fired
-local -evacuate -> migrates Service groups on the node where it is fired and stops HAD on the same
node only
-local -force -> Stops HAD leaving services running on the node where it is fired
-all -force -> Stops HAD on all the nodes of cluster leaving the services running
-all -> Stops HAD on all nodes in cluster and takes service groups offline
Resource Operations
How to list all the resource dependencies
To list the resource dependencies :
# hares -dep
How to enable/disable a resource ?
# hares -modify [resource_name] Enabled 1
# hares -modify [resource_name] Enabled 0
How to list the parameters of a resource
To list all the parameters of a resource :
disks.
2. node01 manages to write the key to majority of disks i.e. 2 disks
3. node02 panics
4. node01 now has a perfect membership and hence Service groups from node02 can be started on
node01
Whats the difference between MultiNICA and MultiNICB resource types ?
MultiNICA and IPMultiNIC
supports active/passive configuration.
Requires only 1 base IP (test IP).
Does not require to have all IPs in the same subnet.
MultiNICB and IPMultiNICB
supports active/active configuration.
Faster failover than the MultiNICA.
Requires IP address for each interface.
Troubleshooting
How to flush a service group and when its required ?
Flushing of a service group is required when, agents for the resources in the service group seems
suspended waiting for resources to be taken online/offline. Flushing a service group clears any internal
wait states and stops VCS from attempting to bring resources online.
To flush the service group SG on the cluster node, node01 :
# hagrp -flush [SG] -sys node01
How to clear resource faults ?
To clear a resource fault, we first have to fix the underlying problem.
1. For persistent resources :
Do not do anything and wait for the next OfflineMonitorInterval (default 300 seconds) for the
resource to become online.
2. For non-persistent resources :
Clear the fault and probe the resource on node01 :
# hares -clear [resource_name] -sys node01
# hares -probe [resource_name] -sys node01
How to clear resources with ADMIN_WAIT state ?
If the ManageFaults attribute of a service group is set to NONE, VCS does not take any automatic
action when it detects a resource fault. VCS places the resource into the ADMIN_WAIT state and waits
for administrative intervention.
1. To clear the resource in ADMIN_WAIT state without faulting service group :
# hares -probe [resource] -sys node01
2. To clear the resource in ADMIN_WAIT state by changing the status to OFFLINE|FAULTED :
each system.
modinfo | grep llt
modunload -i <LLT module number>
9. Rename VCS startup and stop scripts on each system.
cd /etc/rc2.d
mv S70llt s70llt
mv S92gab s92gab
cd /etc/rc3.d
mv S99vcs s99vcs
cd /etc/rc0.d
mv K10vcs k10vcs
10. Make a backup copy of /etc/VRTSvcs/conf/config/main.cf.
Make a backup copy of /etc/VRTSvcs/conf/config/types.cf.
Starting with VCS 1.3.0, preonline and other trigger scripts must
be in /opt/VRTSvcs/bin/triggers. Also, all preonline scripts in
previous versions (such as VCS 1.1.2) must now be combined in one
preonline script.
11. Remove old VCS packages.
pkgrm VRTScsga VRTSvcs VRTSgab VRTSllt VRTSperl VRTSvcswz
If you are upgrading from 1.0.1 or 1.0.2, you must also remove the package
VRTSsnmp, and any packages containing a .2 extension, such as VRTScsga.2,
VRTSvcs.2, etc.
Also remove any agent packages such as VRTSvcsix (Informix),
VRTSvcsnb (NetBackup), VRTSvcssor (Oracle), and VRTSvcssy (Sybase).
Install new VCS packages.
Restore your main.cf and types.cf files.
12. Start LLT, GAB and VCS.
cd /etc/rc2.d
mv s70llt S70llt
mv s92gab S92gab
cd /etc/rc3.d
mv s99vcs S99vcs
cd /etc/rc0.d
mv k10vcs K10vcs
/etc/rc2.d/S70llt start
/etc/rc2.d/S92gab
/etc/rc3.d/S99vcs start
13. Check on status of VCS.
hastatus
hastatus -sum
14. Unfreeze all Service Groups.
haconf -makerw
hagrp -unfreeze <Service Group> -persistent
haconf -dump -makero
#
- msgqueue - max memory used by POSIX message queues (bytes)
#
- nice - max nice priority allowed to raise to values: [-20, 19]
#
- rtprio - max realtime priority
#
#<domain>
<type> <item>
<value>
#
#*
soft core
0
#*
hard rss
10000
#@student
hard nproc
20
#@faculty
soft nproc
20
#@faculty
hard nproc
50
#ftp
hard nproc
0
#@student
maxlogins
4
oracle
soft nproc
2048
oracle
hard nproc
20480
oracle
soft stack
20480
oracle
hard stack
32768
oracle
soft nofile
4096
# End of file
oracle hard nofile 65536
EDIT THIS FILE (/etc/sysctl.conf) OMN BOTH NODES, IT SHOULD ULTIMATELY LOOK LIKE
THIS:
[root@node1 ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
cd database
as user oracle:
export DISPLAY=192.168.0.187:0.0 (note: <MY PC'S IP ADDRESS:0.0>
Please note that you will have to do yum installs of the many packages that are missing, please do so on
both nodes(BOTH nodes have to be kept as identical as possible).
Since this is for our training and testing we will choose desktop class
0.8KB/s 00:00
6.9KB/s 00:00
RUNNING
RUNNING
-- GROUP STATE
-- Group
System
B
B
B
B
Frozen
ClusterService node1
ClusterService node2
new_servicegroup node1
new_servicegroup node2
0
0
Probed
Y
Y
AutoDisabled
N
N
Y
Y
N
N
State
OFFLINE
ONLINE
OFFLINE
ONLINE
Frozen
RUNNING
RUNNING
-- GROUP STATE
-- Group
System
B ClusterService node1
B ClusterService node2
B new_servicegroup node1
B new_servicegroup node2
[root@node1 ~]#
0
0
Probed
Y
Y
AutoDisabled
N
N
Y
Y
N
N
State
OFFLINE
ONLINE
ONLINE
OFFLINE