Sunday, 29 December 2013

To create CFS service group in VCS 6.x on solaris 11

1)To create Service Group
hagrp -add  testsg
hagrp -modify testsg SystemList  Z10CI 0 Z10DB 1
hagrp -modify testsg AutoStartList Z10CI Z10DB
hagrp -modify testsg Parallel 1
2)To create CVMvolDG with three volumes vol1 vol2 vol3
hares -add  vol1rg  CVMVolDg  testsg
hares -modify vol1rg Critical 1
hares -modify vol1rg CVMDiskGroup  testdg
hares -modify vol1rg CVMVolume  vol1  vol2  vol3
hares -local vol1rg CVMActivation
hares -modify vol1rg CVMActivation  sw  -sys Z10DB
hares -modify vol1rg CVMActivation  sw  -sys Z10CI
hares -modify vol1rg CVMVolumeIoTest -delete -keys
hares -modify vol1rg CVMDGAction  
hares -modify vol1rg Enabled 1
3)To create File System Mountpoints
hares -add  vol1mntres  CFSMount  testsg
hares -modify vol1mntres Critical 1
hares -modify vol1mntres CloneSkip  no
hares -modify vol1mntres MountPoint  /a
hares -modify vol1mntres BlockDevice  /dev/vx/dsk/testdg/vol1
hares -local vol1mntres MountOpt
hares -modify vol1mntres MountOpt  cluster  -sys Z10DB
hares -modify vol1mntres MountOpt  cluster  -sys Z10CI
hares -modify vol1mntres Primary  Z10CI
hares -modify vol1mntres AMFMountType  vxfs
hares -modify vol1mntres Enabled 1

hares -add  vol2mntres  CFSMount  testsg
hares -modify vol2mntres Critical 1
hares -modify vol2mntres CloneSkip  no
hares -modify vol2mntres MountPoint  /b
hares -modify vol2mntres BlockDevice  /dev/vx/dsk/testdg/vol2
hares -local vol2mntres MountOpt
hares -modify vol2mntres MountOpt  cluster  -sys Z10DB
hares -modify vol2mntres MountOpt  cluster  -sys Z10CI
hares -modify vol2mntres Primary  Z10CI
hares -modify vol2mntres AMFMountType  vxfs
hares -modify vol2mntres Enabled 1

hares -add  vol3mntres  CFSMount  testsg
hares -modify vol3mntres Critical 1
hares -modify vol3mntres CloneSkip  no
hares -modify vol3mntres MountPoint  /c
hares -modify vol3mntres BlockDevice  /dev/vx/dsk/testdg/vol3
hares -local vol3mntres MountOpt
hares -modify vol3mntres MountOpt  cluster  -sys Z10DB
hares -modify vol3mntres MountOpt  cluster  -sys Z10CI
hares -modify vol3mntres Primary  Z10CI
hares -modify vol3mntres AMFMountType  vxfs
hares -modify vol3mntres Enabled 1
4)To create NFS resource
hares -add  nfsres  NFS  testsg
hares -modify nfsres Critical 1
hares -modify nfsres UseSMF  1
hares -modify nfsres Nservers  16
hares -modify nfsres LockFileTimeout  180
hares -modify nfsres CleanRmtab  0
hares -modify nfsres Enabled 1
5)To create Share resources
hares -add  shareres  Share  testsg
hares -modify shareres Critical 1
hares -modify shareres PathName  /c
hares -modify shareres Options  -o rw
hares -modify shareres NFSRes  
hares -modify shareres Enabled 1

hares -add  shreresb  Share  testsg
hares -modify shreresb Critical 1
hares -modify shreresb PathName  /b
hares -modify shreresb Options  -o rw
hares -modify shreresb NFSRes  
hares -modify shreresb Enabled 1

hares -add  shareresa  Share  testsg
hares -modify shareresa Critical 1
hares -modify shareresa PathName  /a
hares -modify shareresa Options  -o rw
hares -modify shareresa NFSRes  
hares -modify shareresa Enabled 1
6)To Create links
hares -link vol3mntres vol1rg
hares -link vol2mntres vol1rg
hares -link vol1mntres vol1rg
hares -link shareresc nfsres
hares -link shareresb nfsres
hares -link shareresa nfsres
7)To create virtualip sg
hagrp -add  vip2
hagrp -modify vip2 SystemList  Z10CI 0 Z10DB 1
hagrp -modify vip2 AutoStartList Z10CI Z10DB
hagrp -modify vip2 Parallel 0
8)To add NIC resource
hares -add  nicres  NIC  vip2
hares -modify nicres Critical 1
hares -modify nicres PingOptimize  1
hares -modify nicres Protocol  IPv4
hares -modify nicres ExclusiveIPZone  0
hares -modify nicres Device  net0
hares -modify nicres NetworkHosts -delete -keys
hares -modify nicres NetworkType  
hares -modify nicres Enabled 1
9)To add IP resource
hares -add  ipres1  IP  vip2
hares -modify ipres1 Critical 1
hares -modify ipres1 ArpDelay  1
hares -modify ipres1 IfconfigTwice  0
hares -modify ipres1 PrefixLen  0
hares -modify ipres1 ExclusiveIPZone  0
hares -modify ipres1 Device  net0
hares -modify ipres1 Address  10.66.10.113
hares -modify ipres1 NetMask  255.255.255.0
hares -modify ipres1 Options  
hares -modify ipres1 RouteOptions  
hares -modify ipres1 Enabled 1
10)To link service groups.
hares -link ipres1 nicres1
hagrp -link vip2 testsg

No comments:

Post a Comment