How to Add a New Diskgroup, Volume and Mount Resources to an Already Configured Service Group, With out Shutting down the Cluster, and the services.

book

Article ID: 100025908

calendar_today

Updated On:

Description

Problem

How to Add a New Diskgroup and Mount Resources to an Already Configured Service Group, Without Shutting down the Cluster and the services.

 

Solution

Note: The command below is just an example only. Need to replace it with the actual Service Group name /resource name which you had planned to use. It is better to get a change window to perform this change.

A) Freeze the service group.  Freezing enables VCS to continue to monitor, but it will not take any action against resources it thinks have failed.  

# hagrp -freeze

B) Open configuration for read/write
# haconf -makerw

C)Create the Diskgroup Resource
hares -add  bnsdg  DiskGroup  bnsdg
hares -modify bnsdg Critical1
hares -modify bnsdg StartVolumes  1
hares -modify bnsdg StopVolumes  1
hares -modify bnsdg MonitorReservation  0
hares -modify bnsdg DiskGroupType  private
hares -modify bnsdg DiskGroup  bnsdg
hares -modify bnsdg Enabled1


D) Create Mount resources
hares -add  Vol_mnt  Mount  bnsdg
hares -modifyVol_mnt Critical 1
hares -modify Vol_mnt SnapUmount  0
hares -modifyVol_mnt CkptUmount  1
hares -modify Vol_mnt MountPoint  /vol1
hares -modify Vol_mnt BlockDevice  /dev/vx/dsk/bnsdg/vol1
hares -modify Vol_mnt FSType  vxfs
hares -modify Vol_mnt MountOpt  vxfs
hares -modifyVol_mnt FsckOpt  %-y
hares -modify Vol_mnt Enabled 1


F) Link the new resources

#hares -link **Parent depends on Child

# hares -link Vol_mnt bnsdg    *** All Mount resources should be dependent on the DiskGroup resource


G) Close the configuration after all the changes have been made to save the changes.
# haconf -dump -makero

H) Run hastatus and be sure the service group and all the new resources are reporting ONLINE.  Give VCS a few minutes to run the monitor scripts for the new resources.

# hastatus -sum

$ hastatus -sum

-- SYSTEMSTATE
-- System              State                Frozen              

A  itakacs              RUNNING              0                    
A  sreedhar-v240        RUNNING              0                    

--GROUP STATE
-- Group          System               Probed    AutoDisabled    State          

B  ClusterService  itakacs              Y          N              ONLINE        
B  ClusterService  sreedhar-v240        Y          N              OFFLINE        
B  SG_parallel    itakacs              Y          N              ONLINE        
B  SG_parallel    sreedhar-v240        Y          N              ONLINE        
B  bnsdg          sreedhar-v240        Y          N              ONLINE        
===> bnsdg is online.
B  cvm            itakacs              Y          N              ONLINE        
B  cvm            sreedhar-v240        Y          N              ONLINE        
B  ipnicb          sreedhar-v240        N          Y              OFFLINE        
B  mnica          itakacs              Y          N              ONLINE        
B  mnica          sreedhar-v240        Y          N              ONLINE        
B  mnicb          sreedhar-v240        Y          N              ONLINE        
B  nfs_server      itakacs              Y          N              ONLINE        
B  nfs_server      sreedhar-v240        N          Y              PARTIAL        
B  vvrdg          itakacs              Y          N              OFFLINE        
B  vvrdg          sreedhar-v240        Y          N              ONLINE    


**Notice bnsdg is reporting ONLINE on sreedhar-v240 and all the resources in the group are also reporting ONLINE on sreedhar-v240.

***If any resources show FAULTED or OFFLINE, check the /etc/VRTSvcs/conf/config/main.cf file to be sure all the attribute values are correct.  If you need to change the value of an attribute, open the configuration (haconf -makerw) and use`hares -modify `.  Be sure to save the configuration when you are done(haconf -dump -makero)

I)  After the service group is showing ONLINE it is safe to unfreeze the service group

# hagrp -unfreeze

Issue/Introduction

How to Add a New Diskgroup, Volume and Mount Resources to an Already Configured Service Group, With out Shutting down the Cluster, and the services.