1: *Recently I was charged with creating a two node Veritas Cluster
2: *server. Everything in VCS resolves around this config file.
3: *Since all of the binaries in VCS are written in Perl and with
4: *the increasing popularity of this product I thought some monks
5: *might find this useful. This configuration fails over four
6: *resources, Apache, Sendmail, SMMS and the RAID. When any
7: *of the apps fail Veritas umounts /var/md and mounts it on
8: *the other system and then starts up the apps. you must write
9: *a small monitoring script for each app and place it in
10: */opt/VRTSvcs/bin. The monitoring script simply needs to
11: *return "online" or "offline" (pgrep works well)
12: *Anyways I hope someone finds this useful
13: *the config file is pretty easy to read. Cheers!!!
14:
15:
16:
17: include "types.cf"
18:
19: cluster Mail (
20: UserNames = { admin = "cDRpdxPmHpzS." }
21: CounterInterval = 5
22: Factor = { runque = 5, memory = 1, disk = 10, cpu = 25,
23: network = 5 }
24: MaxFactor = { runque = 100, memory = 10, disk = 100, cpu = 100,
25: network = 100 }
26: )
27:
28: system wgmail1a
29:
30: system wgmail1b
31:
32: snmp vcs (
33: TrapList = { 1 = "A new system has joined the VCS Cluster",
34: 2 = "An existing system has changed its state",
35: 3 = "A service group has changed its state",
36: 4 = "One or more heartbeat links has gone down",
37: 5 = "An HA service has done a manual restart",
38: 6 = "An HA service has been manually idled",
39: 7 = "An HA service has been successfully started" }
40: )
41:
42: group mailgroup (
43: SystemList = { wgmail1a, wgmail1b }
44: AutoStartList = { wgmail1a }
45: )
46:
47: Application Apache (
48: User = root
49: StartProgram = "/etc/init.d/apache start"
50: StopProgram = "/etc/init.d/apache stop"
51: MonitorProgram = "/opt/VRTSvcs/bin/monitor_scripts/monitor_http"
52: )
53:
54: Application SMMS (
55: User = root
56: StartProgram = "/etc/init.d/smmsd start"
57: StopProgram = "/etc/init.d/smmsd stop"
58: MonitorProgram = "/opt/VRTSvcs/bin/monitor_scripts/monitor_smms"
59: )
60:
61: Application sendmail (
62: User = root
63: StartProgram = "/etc/init.d/sendmail start"
64: StopProgram = "/etc/init.d/sendmail stop"
65: MonitorProgram = "/opt/VRTSvcs/bin/monitor_scripts/monitor_sendmail"
66: )
67:
68: IP ip_eri0 (
69: Device = eri0
70: Address = "199.6.154.34"
71: NetMask = "255.255.255.0"
72: )
73:
74: Mount the_raid (
75: MountPoint = "/var/md"
76: BlockDevice = "/dev/dsk/c2t5d1s0"
77: FSType = ufs
78: MountOpt = logging
79: )
80:
81: NIC nic_eri (
82: Device = eri0
83: NetworkType = ether
84: )
85:
86: sendmail requires the_raid
87:
88:
89: // resource dependency tree
90: //
91: // group mailgroup
92: // {
93: // Application Apache
94: // Application SMMS
95: // IP ip_eri0
96: // NIC nic_eri
97: // Application sendmail
98: // {
99: // Mount the_raid
100: // }
101: // }