VCS ON
RHEL6–CONFIGURE & OPERATION-P6
SERVICE GROUP:
·
How to list the available SG's…?
·
What is the name of SG / how many
SG’s ?
·
How to check the contained resources
of a SG…?
·
How to switch a SG…?
·
How to online/offline a SG…?
·
How to freeze/unfreeze a SG…?
·
How to enable/disable a SG…?
·
How to flush a SG…?
·
How to display the
attributes/parameters of a SG…?
·
How to show the state of a SG…?
·
How to list dependency of a SG…?
·
How to enable/disable all resources
in one go of a SG…?
·
How to check the attribute value of
a SG…?
·
How to clear a faulted
non-persistent resource of a SG…?
How to list the available SG's…?
What is the name of SG / how many SG’s…?
[root@pr01 ~]# hagrp -list
NFS_APP1 dr01
NFS_APP1 pr01
Web-App dr01
Web-App pr01
How to check the contained resources of a SG…?
[root@pr01 ~]# hagrp -resources NFS_APP1
NFS_DG1
NFS_IP1
NFS_MOUNT1
NFS_SERVICE1
NFS_RESTART1
NFS_NIC1
NFS_SHARE1
NFS_VOLUME1
How to check the resource status of a SG…?
[root@dr01 ~]# hares -display -attribute State -group
Web-App -sys dr01
#Resource Attribute System Value
DG_Res State dr01 ONLINE
Mount_Res State dr01 OFFLINE
Nic_Res State dr01 ONLINE
Service_IP State dr01 OFFLINE
Volume_Res State dr01 ONLINE
Web_Res State dr01 OFFLINE
How to show the state of a SG…?
[root@pr01 ~]# hagrp -state
#Group Attribute System Value
NFS_APP1 State dr01 |ONLINE|
NFS_APP1 State pr01 |OFFLINE|
Web-App State dr01 |PARTIAL|STOPPING|
Web-App State pr01 |PARTIAL|
How to switch a SG…?
[root@pr01 ~]# hagrp -switch NFS_APP1 -to dr01
How to online/offline a SG…?
OFFLINE,
[root@pr01 ~]# hagrp -offline Web-App -sys pr01
[root@pr01 ~]# hagrp -state
#Group Attribute System Value
NFS_APP1 State dr01 |ONLINE|
NFS_APP1 State pr01 |OFFLINE|
Web-App State dr01 |PARTIAL|STOPPING|
Web-App State pr01 |OFFLINE|
[root@pr01 ~]# hagrp -offline -force Web-App -sys dr01
[root@pr01 ~]# hagrp -state
#Group Attribute System Value
NFS_APP1 State dr01 |ONLINE|
NFS_APP1 State pr01 |OFFLINE|
Web-App State dr01 |PARTIAL|STOPPING|
Web-App State pr01 |OFFLINE|
There is some issue with SG “Web-App” on dr01.
Need to check,
1st identify which resource(s) having problem,
[root@pr01 ~]# hares -display -attribute State -group
Web-App -sys dr01
#Resource Attribute System Value
DG_Res State dr01 ONLINE
Mount_Res State dr01 OFFLINE
Nic_Res State dr01 ONLINE
Service_IP State dr01 OFFLINE
Volume_Res State dr01 ONLINE
Web_Res State dr01
OFFLINE
2nd check the logs to identify the reason,
[root@pr01 ~]# tail -40 /var/VRTSvcs/log/engine_A.log
There was no clear indication in logs regarding this issue.
What I did is…
[root@dr01 ~]# hares -flushinfo Volume_Res -sys dr01
VCS WARNING V-16-1-10573 Scope (global/local) is wrong
[root@dr01 ~]# hares -flushinfo Volume_Res –localclus
[root@dr01 ~]# hares -offline Volume_Res -sys dr01
[root@dr01 ~]# hastop -sys dr01
[root@dr01 ~]# hastop -all –force
[root@dr01 ~]# hastart
[root@dr01 ~]# hares -display -attribute State -group
Web-App -sys dr01
#Resource Attribute System Value
DG_Res State dr01 ONLINE
Mount_Res State dr01 OFFLINE
Nic_Res State dr01 ONLINE
Service_IP State dr01 OFFLINE
Volume_Res State dr01 ONLINE
Web_Res State dr01 OFFLINE
[root@dr01 ~]# hagrp -offline -force Web-App -sys dr01
Nothing happened, situation remains same.
[root@dr01 DiskGroup]# vxtask list
TASKID PTID TYPE/STATE PCT
PROGRESS
[root@dr01 DiskGroup]# hastop -all -force
[root@dr01 DiskGroup]# vxdg list
NAME STATE ID
app_dg enabled 1489184379.30.pr01
[root@dr01 DiskGroup]# vxdg deport app_dg çç at dr01
[root@pr01 ~]# vxdg import app_dg çç at
pr01
[root@dr01 DiskGroup]# hastart
[root@pr01 ~]# hastart
Now it is OK,
[root@pr01 ~]# hagrp -state
#Group Attribute System Value
NFS_APP1 State dr01 |OFFLINE|
NFS_APP1 State pr01 |ONLINE|
Web-App State dr01 |OFFLINE|
Web-App State pr01 |ONLINE|
ONLINE,
[root@pr01 ~]# hagrp -online Web-App -sys pr01
How to enable/disable all resources in one go of a SG…?
[root@pr01 ~]# hagrp -disableresources Web-App
VCS WARNING V-16-1-11335 Configuration must be ReadWrite : Use haconf
-makerw
[root@pr01 ~]# haconf –makerw
[root@pr01 ~]# hagrp -disableresources Web-App
VCS WARNING V-16-1-50040 All the resources in group are not
completely offline
[root@pr01 ~]# hagrp -enableresources Web-App
How to freeze/unfreeze a SG…?
[root@pr01 ~]# hagrp -freeze Web-App -persistent
[root@pr01 ~]# hagrp -unfreeze Web-App -persistent
How to enable/disable a SG…?
[root@pr01 ~]# hagrp -disable Web-App -sys pr01
[root@pr01 ~]# hagrp -enable Web-App -sys pr01
How to flush a SG…?
[root@pr01 ~]# hagrp -flush Web-App -sys dr01
How to display the attributes/parameters of a SG…?
[root@pr01 ~]# hagrp -display Web-App
#Group Attribute System Value
Web-App
AdministratorGroups global
Web-App
Administrators global
Web-App Authority global 0
Web-App AutoFailOver global 1
Web-App AutoRestart global 1
Web-App AutoStart global 1
Web-App
AutoStartIfPartial global 1
Web-App AutoStartList global pr01
=============================O/P REMOVED============================
[root@pr01 ~]# hagrp -display Web-App -attribute
AutoFailOver AutoRestart -localclus
#Group Attribute System Value
Web-App AutoFailOver global 1
Web-App AutoRestart global 1
How to list dependency of a SG…?
[root@pr01 ~]# hagrp -dep NFS_APP1
VCS WARNING V-16-1-50035 No Group dependencies are configured
[root@pr01 ~]# hagrp -dep Web-App
VCS WARNING V-16-1-50035 No Group dependencies are configured
How to check the attribute value of a SG…?
[root@pr01 ~]# hagrp -value Web-App AutoStart -localclus
1
[root@pr01 ~]# hagrp -value Web-App Frozen -localclus
0
How to clear a faulted non-persistent resource of a SG…?
[root@pr01 ~]# hagrp -clear Web-App -localclus
VCS NOTICE V-16-1-10145 There are no non-persistent resources in the
group that are faulted on the specified systems
Reference & Good Read:
Great blog, and thanks for sharing your knowledge.
ReplyDeleteThanks to appreciate my work Dear, request to share if possible so that others can also be benefited
Delete