How to place a volume and disk group under the control of VCS (Symantec Cluster Server)

Article:TECH20539  |  Created: 2002-01-06  |  Updated: 2013-12-05  |  Article URL http://www.symantec.com/docs/TECH20539
Article Type
Technical Solution


Issue



How to place a volume and disk group under the control of VCS (Symantec Cluster Server)


Solution



Following is the algorithm to create a volume, file system and put them under VCS (Symantec Cluster Server).
 
1. Create a disk group. This can be done with vxdg.

2. Create a mount point and file system.

3. Deport the disk group. This can be done with vxdg.

4. Create a service group. This can be done with hagrp.

5. Add cluster resources to the service group. This can be done with hagrp.


Note: An example of a service group that contains a DiskGroup resource can be found in the "Symantec Cluster Server 6.1 Bundled Agents Guide":
 


6. Create dependencies between the resources. This can be done using hadep.

7. Enable all resources. This can be done using hares.

 
The following examples show how to create a RAID-5 volume with a VxFS file system and put it under VCS control.
 
Method 1 - Using the command line
 
1. Create a disk group using Volume Manager with a minimum of 4 disks:
 
# vxdg init datadg disk01=c1t1d0s2 disk02=c1t2d0s2 disk03=c1t3d0s2 disk04=c1t4d0s2
# vxassist -g datadg make vol01 2g layout=raid5
 
2. Create a mount point for this volume:
 
# mkdir /vol01
 
3. Create a file system on this volume:
 
# mkfs -F vxfs /dev/vx/rdsk/datadg/vol01
 
4. Deport this disk group:
 
# vxdg deport datadg
 
5. Create a service group: 
 
# haconf -makerw
# hagrp -add newgroup
# hagrp -modify newgroup SystemList <sysA> 0 <sysB> 1
# hagrp -modify newgroup AutoStartList <sysA>
 
6. Create a disk group resource and modify its attributes:
 
# hares -add data_dg DiskGroup newgroup
# hares -modify data_dg DiskGroup datadg
 
 
7. Create a mount resource and modify its attributes:
 
# hares -add mnt Mount newgroup
# hares -modify mnt BlockDevice /dev/vx/dsk/datadg/vol01
# hares -modify mnt FSType vxfs
# hares -modify mnt MountPoint /vol01
 
8. Link the mount resource to the disk group resource:
 
# hares -link mnt data_dg
 
9. Enable the resources and close the configuration:
 
# hagrp -enableresources newgroup
# haconf -dump -makero

 
Method 2 - Editing /etc/VRTSvcs/conf/config/main.cf
 
# hastop -all
# cd /etc/VRTSvcs/conf/config
# haconf -makerw
# vi main.cf
Add the following lines to end of this file, customizing the attributes as appropriate for your configuration:
 
group newgroup (
SystemList = { sysA =0, sysB=1}
AutoStartList = { sysA }
)
 
DiskGroup data_dg (
DiskGroup = datadg
)
 
Mount mnt (
MountPoint = "/vol01"
BlockDevice = " /dev/vx/dsk/datadg/vol01"
FSType = vxfs
)
 
mnt requires data_dg
 
# haconf -dump -makero
# hastart -local
Check status of the new service group.



Legacy ID



248003


Article URL http://www.symantec.com/docs/TECH20539


Terms of use for this information are found in Legal Notices