Create the Broker database.
Perform this step in the global zone for zone z1.
Vigor5# zlogin z1 # cd /opt/IBM/db2/V8.1/instance # ./db2icrt -u db2user db2user # su - db2user $ db2start $ db2 create database BROKERDB $ db2 connect to BROKERDB $ db2 bind ./sqllib/bnd/@db2cli.lst grant public CLIPKG 5 $ db2 update database configuration for BROKERDB using dbheap 900 $ chmod 644 /ZFSwmb1/db2user/sqllib/db2nodes.cfg $ cat > /ZFSwmb1/db2user/sqllib/db2nodes.cfg <<-EOF 0 db2user 0 EOF $ chmod 444 /ZFSwmb1/db2user/sqllib/db2nodes.cfg $ exit |
Update /etc/hosts with db2user on both zones.
Perform this step in zones z1 and z2.
# vi /etc/hosts |
The following listing shows db2user that has been added to /etc/hosts on z1.
127.0.0.1 localhost loghost z1 db2user
Create the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z1 only.
The broker queue manager and broker database must be running before you perform this step.
Ensure that DB2 is started and resource group wmq1-rg is online on Vigor5:z1.
Deployment Example: Installing WebSphere MQ in Zones, from the Sun Cluster Data Service for WebSphere MQ Guide, was used to create the resource group wmq1-rg.
# cat > /ZFSwmb1/mqsiuser/.profile <<-EOF . /ZFSwmb1/db2user/sqllib/db2profile . /opt/IBM/mqsi/6.0/bin/mqsiprofile EOF # su - mqsiuser $ mqsicreatebroker brk \ > -i mqsiuser -a mqsiuser -q qmgr1 -n BROKERDB -u db2user -p db2user $ mqsicreateconfigmgr cmg \ > -i mqsiuser -a mqsiuser -q qmgr1 $ mqsicreateusernameserver \ > -i mqsiuser -a mqsiuser -q qmgr1 $ exit |
Start the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z1.
# su - mqsiuser $ mqsistart brk $ mqsistart cmg $ mqsistart UserNameServer |
Verify that the Broker, Configuration Manager and UserNameServer have been created and are running.
Perform this step in zone z1.
# su - mqsiuser $ mqsilist BIP8099I: ConfigMgr: cmg - qmgr1 BIP8099I: UserNameServer: UserNameServer - qmgr1 BIP8099I: Broker: brk - qmgr1 BIP8071I: Successful command completion. $ exit # ptree mqsiuser 2608 zsched 15573 bipservice brk 15574 bipbroker brk 15590 biphttplistener brk 15594 bipservice cmg 15595 bipconfigmgr cmg 15665 bipservice UserNameServer 15666 bipuns UserNameServer |
Stop the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z1.
# su - mqsiuser $ mqsistop -i brk $ mqsistop -i cmg $ mqsistop -i UserNameServer $ exit |
Stop the Broker database.
Perform this step in zone z1.
# su - db2user $ db2stop force $ exit # exit |
Failover the WebSphere MQ resource group to the other zone.
Perform this step in the global zone.
Vigor5# clrg switch -n Vigor5:z2 wmq1-rg |
Relocate the ZFS pool to the other zone.
Perform this step in the global zone.
Vigor5# zpool export -f HAZpool3 Vigor5# zpool import -R /zones/z2/root HAZpool3 |
Setup /etc/services and start the Broker database.
Perform this step in zone z2.
The port list entries for db2user should be the same as those on zone z1.
Vigor5# z2 # cat >> /etc/services <<-EOF DB2_db2user 60000/tcp DB2_db2user_1 60001/tcp DB2_db2user_2 60002/tcp DB2_db2user_END 60003/tcp EOF # su - db2user $ db2start $ exit |
Start the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z2.
# su - mqsiuser $ mqsistart brk $ mqsistart cmg $ mqsistart UserNameServer $ exit |
Verify that the Broker, Configuration Manager and UserNameServer are running.
Perform this step in zone z2.
# su - mqsiuser $ mqsilist BIP8099I: ConfigMgr: cmg - qmgr1 BIP8099I: UserNameServer: UserNameServer - qmgr1 BIP8099I: Broker: brk - qmgr1 BIP8071I: Successful command completion. $ exit # ptree mqsiuser 2614 zsched 6658 bipservice brk 6659 bipbroker brk 6681 biphttplistener brk 6674 bipservice cmg 6675 bipconfigmgr cmg 6691 bipservice UserNameServer 6692 bipuns UserNameServer |
Stop the Broker, Configuration Manager and UserNameServer.
Perform this step in zone z2.
# su - mqsiuser $ mqsistop -i brk $ mqsistop -i cmg $ mqsistop -i UserNameServer $ exit |
Stop the Broker database.
Perform this step in zone z2.
# su - db2user $ db2stop force $ exit # exit |
Export the ZFS pool.
Perform this step in the global zone.
Vigor5# zpool export -f HAZpool3 |