Question & Answer
Question
How do I add a virtual IP to the cluster using the Red Hat cluster manager?
Answer
The example of an existing service called "NPS" illustrates the remaining steps for adding a virtual IP address. The text in bold face indicates user input.
To add a floating IP that fails over with the cluster in a Red Hat 4 server environment, do the following:
1. Log in as root.
2. Run the cluster manager:
cluadmin
3. Before making changes, review the settings for the NPS service so that you can revert to these settings if needed :
cluadmin> service show NPS
1) state
2) config
3) services
service show what? 2
0) NPS
c) cancel
Choose service: 0
name: NPS
preferred node: ha1
relocate: yes
user script: /nzlocal/scripts/cluster.service.NPS
monitor interval: 0
IP address 0: 10.0.0.1
netmask 0: 255.255.0.0
broadcast 0: 10.0.255.255
IP address 1: 172.16.103.191
netmask 1: 255.255.252.0
broadcast 1: 172.16.103.255
IP address 2: 172.16.103.190
netmask 2: 255.255.252.0
broadcast 2: 172.16.103.255
device 0: /dev/cciss/c0d1p7
mount point, device 0: /nz
mount fstype, device 0: ext3
mount options, device 0: rw,suid,dev,exec,nouser,async,noauto
force unmount, device 0: yes
samba share, device 0: None
device 1: /dev/cciss/c0d1p2
mount point, device 1: /nzdata
mount fstype, device 1: ext3
mount options, device 1: rw,suid,dev,exec,nouser,async,noauto
more: return, or q
4. Add the virtual IP address by modifying the service which is called NPS:
cluadmin> service modify NPS
Modifying: NPS
Preferred member [ha1]: <enter>
Relocate when the preferred member joins the cluster (yes/no/?) [yes]: <enter>
User script (e.g., /usr/foo/script or None) [/nzlocal/scripts/cluster.service.NPS]: <enter>
Status check interval [0]: <enter>
Do you want to (a)dd, (m)odify, (d)elete or (s)how an IP address, or are you (f)inished adding IP addresses [f]:a
IP address: 10.0.0.3
Netmask (e.g. 255.255.255.0 or None) [None]: 255.255.0.0
Broadcast (e.g. X.Y.Z.255 or None) [None]: 10.0.255.255
Do you want to (a)dd, (m)odify, (d)elete or (s)how an IP address, or are you (f)inished adding IP addresses [f]:f
Do you want to (a)dd, (m)odify, (d)elete or (s)how DEVICES, or are you (f)inished adding DEVICES [f]: <enter>
name: NPS
preferred node: ha1
relocate: yes
user script: /nzlocal/scripts/cluster.service.NPS
monitor interval: 0
IP address 0: 10.0.0.1
netmask 0: 255.255.0.0
broadcast 0: 10.0.255.255
IP address 1: 172.16.103.191
netmask 1: 255.255.252.0
broadcast 1: 172.16.103.255
IP address 2: 172.16.103.190
netmask 2: 255.255.252.0
broadcast 2: 172.16.103.255
IP address 3: 10.0.0.3
netmask 3: 255.255.0.0
broadcast 3: 10.0.255.255
device 0: /dev/cciss/c0d1p7
mount point, device 0: /nz
mount fstype, device 0: ext3
mount options, device 0: rw,suid,dev,exec,nouser,async,noauto
force unmount, device 0: yes
samba share, device 0: None
device 1: /dev/cciss/c0d1p2
more: return, or q
mount fstype, device 2: ext3
mount options, device 2: rw,suid,dev,exec,nouser,async,noauto
force unmount, device 2: yes
samba share, device 2: None
device 3: /dev/cciss/c1d0p2
mount point, device 3: /shrres
mount fstype, device 3: ext3
mount options, device 3: rw,suid,dev,exec,nouser,async,noauto
force unmount, device 3: yes
samba share, device 3: None
Commit the above changes to service NPS (yes/no/?) yes
Modified NPS.
Service NPS enabled.
cluadmin>
5. To exit the cluster manager, type q followed by the Enter key.
In the above output, you can see the addition of the floating IP address.
IP address 3: 10.0.0.3
netmask 3: 255.255.0.0
broadcast 3: 10.0.255.255
Your virtual IP should now fail over with the cluster when you relocate NPS.
Historical Number
NZ342033
Was this topic helpful?
Document Information
Modified date:
17 October 2019
UID
swg21569211