Anda di halaman 1dari 3

Create a service group haconf -makerw hagrp -add <SG_NAME> hagrp -modify <SG_NAME> SystemList host1 0 host2 1 hagrp

-modify <SG_NAME> AutoStartList host1 (SG will start automaticlly at bo ot time) hares -add <DG_RESOURCE> DiskGroup <SG_NAME> hares -modify <DG_RESOURCE> DiskGroup <DG_NAME> hares -add <MY_MOUNTPOINT_RESOURCE> Mount <SG_NAME> hares -modify <MY_MOUNTPOINT_RESOURCE> BlockDevice <block device to mount> hares -modify <MY_MOUNTPOINT_RESOURCE> MountPoint <mount point for file system> hares -modify <MY_MOUNTPOINT_RESOURCE> FsckOpt [%-y|%-n] hares -link <MY_MOUNTPOINT_RESOURCE> <DG_RESOURCE> hagrp -enableresources <service_group_name> haconf -dump -makero hagrp -online <SG_NAME> -sys host1 ***************************************************************************** # hagrp -add MyMountGrp VCS:10136:group added; populating SystemList and setting the Parallel attribute recommended before adding resources # hagrp -modify MyMountGrp SystemList camcs12 0 camcs9 1 # hagrp -modify MyMountGrp AutoStartList camcs12 # hares -add MyDgResource DiskGroup MyMountGrp VCS:10245:Resource added

NameRule and Enabled attributes must be set before agent monitors # hares -modify MyDgResource DiskGroup vxvm_mydg # hares -add MyMountResource Mount MyMountGrp VCS:10245:Resource added

NameRule and Enabled attributes must be set before agent monitors # hares -modify MyMountResource BlockDevice /dev/vx/dsk/vxvm_mydg/vol01

# hares -modify MyMountResource MountPoint /my/mount/point # hares -modify MyMountResource FsckOpt %-y # hares -link MyMountResource MyDgResource # hagrp -enableresources MyMountGrp # haconf -dump -makerw # hagrp -online MyMountGrp -sys camcs12 # hastatus -sum -- SYSTEM STATE -- System State Frozen A camcs12 RUNNING 0 A camcs9 RUNNING 0 -- GROUP STATE -- Group System Probed AutoDisabled State B MyMountGrp camcs12 Y N ONLINE B MyMountGrp camcs9 Y N OFFLINE

Looking in the /etc/VRTSvcs/conf/config/main.cf file, we can see the new service group configuration has been added: # cat /etc/VRTSvcs/conf/config/main.cf include "types.cf" cluster vcs01 ( ) system camcs12 ( ) system camcs9 ( ) group MyMountGrp ( SystemList = { camcs12 = 0, camcs9 = 1 } AutoStartList = { camcs12 } ) DiskGroup MyDgResource (

DiskGroup = vxvm_mydg ) Mount MyMountResource ( MountPoint = "/my/mount/point" BlockDevice = "/dev/vx/dsk/vxvm_mydg/vol01" FsckOpt = "-y" ) MyMountResource requires MyDgResource

Anda mungkin juga menyukai