D74942GC20 Ag PDF
D74942GC20 Ag PDF
D74942GC20 Ag PDF
D80415
April 2013
Edition 2.0
D74942GC20
Activity Guide
Administration
Oracle Solaris Cluster 4.x
Raghavendra JS Disclaimer
Zeeshan Nofil This document contains proprietary information and is protected by copyright and
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Venu Poddar other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
Technical Contributors in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
and Reviewers publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.
Thorsten Fruauf
Harish Mallya The information contained in this document is subject to change without notice. If you
Hemachandran find any problems in the document, please report them in writing to: Oracle University,
Namachivayam 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
Pramod Rao
Tim Read Restricted Rights Notice
Sambit Nayak
Raj Kumar
Malavika Jinka
Daniel Milne
Publishers
Jayanthy Keshavamurthy
Veena Narasimhan
Table of Contents
Practices for Lesson 1: Introduction ..............................................................................................................1-1
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you identify the various hardware and software components that are made
available inside the virtual training environment for you to install, configure, and administer the
Oracle Solaris Cluster software.
In this practice, you participate in a guided tour of the virtual training lab. This tour helps you
review the essentials of the Oracle Solaris Cluster hardware components.
Tasks
You participate in a guided tour of the virtual training lab with your instructor. While participating
in the guided tour, you identify the various Oracle Solaris Cluster hardware components
including the cluster nodes, the Administrative Workstation, and the storage device.
The virtual training lab is created using VirtualBox software and consists of the following Oracle
Solaris Cluster hardware components in the form of virtual machines:
• Sun_ZFS_Storage_7000: The ZFS Storage 7000 storage appliance simulator
Chapter 2 - Page 4
Practices for Lesson 2: Planning the Oracle Solaris Cluster Environment
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle University and (Oracle Corporation) use only.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you install, configure, and use the Parallel Console Access (pconsole) utility
on the Administrative Workstation to manage a cluster environment.
In this practice, you install and configure the Parallel Console Access (pconsole) utility on an
Administrative Workstation to manage a cluster environment.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administration Workstation virtual
machines in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
This practice assumes that the Oracle Solaris 11.1 operating system is already installed on the
two cluster nodes and the Administrative Workstation.
3. Ensure that the /etc/inet/hosts file has entries for the IP addresses and host names of
the clnode1 and clnode2 cluster nodes.
$ cat /etc/inet/hosts
…
192.168.1.101 cluster-1 clnode1
192.168.1.102 cluster-2 clnode2
…
# svccfg -s system/name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: "files nis"
svc:/system/name-service/switch> quit
# svcadm refresh name-service/switch
# svcprop system/name-service/switch | grep config/host
config/host astring\ files\ nis
Note: Ensure that you exit the root role before moving on to the next task.
Note: By default, the pkg publisher command should list the solaris publisher having
https://pkg.oracle.com as the URI. If not set, type the following command to set the origin
for the solaris publisher to get the Oracle Solaris 11.1 operating system software
packages and the ha-cluster publisher to get the Oracle Solaris Cluster 4.1 software
packages from a local repository.
$ pfexec pkg set-publisher –G ‘*’ –g http://adminws:10001/ solaris
$ pfexec pkg set-publisher –g http://adminws:10002/ ha-cluster
$ pkg publisher
Installing the Oracle Solaris Cluster man page packages on the Administrative Workstation
enables you to view the various man pages of the Oracle Solaris Cluster software on the
Administrative Workstation before you actually install the software on the cluster nodes.
...
export PATH=/usr/cluster/man:/usr/bin:/usr/sbin
...
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 1
Practices for Lesson 4: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you verify the Oracle Solaris 11.1 OS installed on your lab systems, identify a
cluster topology, select quorum devices, verify the cluster interconnect configuration, and select
public network interfaces.
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 2
Practice 4-1: Preparing for Installation
Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you prepare your assigned cluster nodes for installing the Oracle Solaris Cluster
4.1 software.
Preparation
To begin this practice, you must be connected to the cluster nodes through the pconsole utility
from the Administrative Workstation and you should be logged in to them as the oracle1 user.
2. Use the /usr/sbin/prtconf command to record the size of (physical) memory on the
designated cluster nodes.
$ /usr/sbin/prtconf | grep –i memory
Node 1 memory: _______________
Node 2 memory: _______________
3. Use the df -h command and the zpool status command to determine whether ZFS is
the root file system on the cluster nodes.
$ df -kh
$ zpool status
$ zpool list
$ zfs list
4. Use the swap -l command to verify that at least 750 MB of swap space is given to each
cluster node. The swap space should be on zvol.
$ swap -l
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 3
Task 3: Selecting Quorum Devices
Perform the following tasks:
1. Record the number of quorum devices that you must configure after the cluster host
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
software installation.
Number of quorum devices: __________
Note: Consult with your instructor if you are not sure about your quorum device
configuration.
2. Decide whether the scinstall utility will automatically be able to choose a quorum device
(it can for a single quorum device for a two-node cluster).
Automatic quorum configuration: (yes/no)?
3. If there can be no automatic quorum configuration (for a three-node cluster, for example),
enter the format command and record the logical path to the disks that you want to use as
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 4
The following figure is a schematic representation of a cluster using an Ethernet-based,
point-to-point cluster-private interconnect configuration:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3. Verify that each Ethernet interconnect interface is connected to the correct switch. If you
are remote, and do not want to take your instructor’s word for it, you can verify that all
nodes can ping each other across the private switches.
Note: If you have any doubt about the private interconnect cabling, consult with your
instructor now. Do not continue this practice until you are confident that your cluster-private
interconnects are cabled correctly, and that you know the names of the cluster-private
transport adapters.
Note: In your given cluster setup environment inside VirtualBox, net1 and net3 are the
designated switch-based cluster-private interconnects.
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 5
Task 5: Selecting Public Network Interfaces
Ask your instructor for help from in identifying public network interfaces on each cluster node
that can be used in IPMP groups.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Record the logical names of the potential IPMP Ethernet interfaces on each cluster node, in the
following table:
System Primary IPMP interface Backup IPMP interface
Node 1
Node 2
Note: It is important that you are sure about the logical name of each public network
interface.
In your given cluster setup environment inside VirtualBox, net0 is the primary IPMP
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 6
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 1
Practices for Lesson 5: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you install and configure the Oracle Solaris Cluster software.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 2
Practice 5-1: Installing and Configuring the Oracle Solaris Cluster
Software
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you install and configure the Oracle Solaris Cluster software. To do this, you
verify the lab environment, update local name resolution, install the Oracle Solaris Cluster
packages, configure a new cluster, verify an automatically selected quorum device, configure a
quorum device, and verify the cluster configuration and status.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
4. Use the master console window to log in to the two cluster nodes with oracle1 as the
username and password.
You perform the remaining tasks of this practice in the master console window, unless
otherwise instructed.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 3
4. If necessary, edit the /etc/inet/hosts file of the cluster nodes and add the IP
addresses of your Administrative Workstation and of all your cluster nodes.
…
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
192.168.1.100 adminws
192.168.1.101 cluster-1 clnode1
192.168.1.102 cluster-1 clnode2
…
5. Verify that the Network Auto-Magic feature is disabled on the cluster nodes.
$ netadm list
TYPE PROFILE STATE
ncp Automatic disabled
ncp DefaultFixed online
loc Automatic offline
c. Exit the root role to return to the prompt of the oracle1 user on the cluster nodes.
7. Verify that the local_only property of the network/rpc/bind service is set to false
to enable external access to remote procedure call (RPC) communication.
$ svcprop network/rpc/bind:default | grep local_only
config/local_only boolean false
If the local_only property is set to true, use the svccfg command as follows to set the
local_only property of network/rpc/bind service to false.
$ svccfg
svc:> select network/rpc/bind
svc:/network/rpc/bind> setprop config/local_only=false
svc:/network/rpc/bind> quit
$ svcadm refresh network/rpc/bind:default
$ svcprop network/rpc/bind:default | grep local_only
config/local_only boolean false
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 4
Note: By default, the pkg publisher command should list the solaris publisher having
https://pkg.oracle.com as the URI. For the purpose of this practice, you will reset the origin
for the solaris publisher to get the Oracle Solaris 11.1 operating system software
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2. Install the primary group package of the Oracle Solaris Cluster 4.1 software that you
selected in step 3 of Task 2.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 5
5. As the installation proceeds, make the following choices:
a. From the Main menu, select option 1, Create a new cluster or add a
cluster node.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
b. From the New Cluster and Cluster Node menu, select option 1, Create a new
cluster.
c. Specify Yes when asked whether you want to continue.
The scinstall utility now checks whether the value of the local_only property of
network/rpc/bind service is correctly set to false.
d. Press the Enter key to continue.
e. From the Typical or Custom Mode menu, select option 1, Typical.
f. Specify a cluster name, such as cluster1.
g. Specify the name of the other cluster node, such as clnode2.
6. You observe the following error messages as the node reboots in the console window of
the clnode1 cluster node.
clnode1 did: WARNING: did_admin_open: FEXCL EBUSY
/usr/cluster/bin/scdidadm: Could not load /dev/did/admin –
Device busy.
These error messages are safe to ignore.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 6
Task 5: Configuring a New Cluster: The One-Node-at-a-Time Method
Perform the following steps to configure the first node in your cluster (the one that will be
assigned node ID 1). You must wait for this node to complete and reboot into the cluster before
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 7
6. You observe the following error messages as the node reboots in the console window of
the clnode1 cluster node. They are safe to ignore.
clnode1 did: WARNING: did_admin_open: FEXCL EBUSY
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 8
Task 6: Verifying the Cluster Configuration and Status
Perform the following steps on any one of the cluster nodes as the oracle1 user to verify the
cluster configuration:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
You should see the correct node and disk quorum votes.
2. Run the clinterconnect status command.
$ clinterconnect status
You should see active redundant interconnect paths between all pairs of nodes.
3. Run the cldevice list -v command.
$ cldevice list -v
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Chapter 5 - Page 9
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 5 - Page 10
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 5: Installing and Configuring the Oracle Solaris Cluster Software
Oracle University and (Oracle Corporation) use only.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you perform basic cluster administration tasks such as verifying basic cluster
configuration and status, reassigning a quorum device, adding a quorum server quorum device,
preventing cluster amnesia, and changing the cluster private IP address range.
In this practice, you perform basic cluster administration tasks such as verifying basic cluster
configuration and status, reassigning a quorum device, adding a quorum server quorum device,
preventing cluster amnesia, and changing the cluster private IP address range.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
Before you begin this practice, ensure that you have completed the tasks covered in the
2. Use the clquorum (clq) command to verify the current cluster membership and the
quorum status.
$ clq status
3. Record the quorum configuration from the previous step.
Quorum votes needed: _____
Quorum votes present: _____
Quorum votes possible: _____
4. Verify all cluster disk paths.
$ cldev status
5. Verify the interconnect status.
$ clintr status
6. Verify the revision of the currently installed Oracle Solaris Cluster software on each node.
$ clnode show-rev –v
following tasks from any one node in the cluster to reassign the quorum device:
1. Verify the status of your current quorum device(s):
$ clq status
$ cldev status d#
2. Show all disk paths:
$ cldev list -v
3. Choose a different shared disk to be the new quorum device, and add your new quorum
device:
$ clq add new-d-#
5. Add the Oracle Solaris Cluster Quorum Server binary location to your PATH environment
variable by adding the following entry to the .profile file.
export PATH=/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
adminws$ . .profile
The name that you give to the device on the cluster side as the last argument to the
command is not important. You can use any name.
3. Add back the disk quorum devices and remove the quorum server quorum device.
$ clq add d#
$ clq status
$ clq remove myqserver
$ clq status
If you have a cluster with nonstorage nodes, having a quorum server quorum device is not
necessarily exactly what you want, because it enables the nonstorage node to stay alive
even if both the storage nodes have failed.
b. In the boot parameters screen, use the arrow keys to select the $multiboot entry.
c. Append -x at the end of the $multiboot entry to specify system boot in noncluster
mode.
$multiboot /ROOT/solaris/@/$kern $kern –B $zfs_bootfs -x
d. Press Ctrl + x to boot the node into noncluster mode.
3. Choose (any) single node on which to perform the following commands. On the chosen
node only, run the following procedure to change the cluster-private IP address range:
a. As the root user, run the clsetup command.
b. Select option 1, Change Network Addressing and Ranges for the Cluster
$ ipadm show-addr
Practices for Lesson 7: Using ZFS with Oracle Solaris Cluster Software
Chapter 7 - Page 1
Practices for Lesson 7: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 7: Using ZFS with Oracle Solaris Cluster Software
Chapter 7 - Page 2
Practice 7-1: Configuring Volume Management by Using ZFS
Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you create a ZFS pool and file system for cluster data, create a snapshot and
then modify your data, and manually migrate your ZFS pool to another node.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
Before you begin this practice, ensure that you have completed the tasks covered in the
previous practices.
Task 1: Creating a ZFS Pool and File System for Cluster Data
Perform the following steps as the oracle1 user in the host terminal window of the clnode1
cluster node:
1. Select disk drives from the shared storage to use in a new ZFS pool for data.
$ zpool status
$ cldev list –v
$ clq status
Make sure that you do not use any disks already in use in the existing device group. Note
the logical device name of the identified disk, referred to as c#t#d# in the next step.
Consult with your instructor if you are unsure.
2. Assume the root role.
3. Create a ZFS pool that provides mirroring for the selected disks.
# zpool create nfspool mirror c#t#d# c#t#d#
# zpool status
Practices for Lesson 7: Using ZFS with Oracle Solaris Cluster Software
Chapter 7 - Page 3
Task 2: Creating a Snapshot and Then Modifying Your Data
Perform the following steps as the root user in the host terminal window of the clnode1
cluster node:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 7: Using ZFS with Oracle Solaris Cluster Software
Chapter 7 - Page 4
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 8: Using Solaris Volume Manager with Oracle Solaris Cluster Software
Chapter 8 - Page 1
Practices for Lesson 8: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you configure Solaris Volume Manager (SVM) to use with Oracle Solaris
Cluster.
Practices for Lesson 8: Using Solaris Volume Manager with Oracle Solaris Cluster Software
Chapter 8 - Page 2
Practice 8-1: Configuring Volume Management by Using Solaris
Volume Manager
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you configure Solaris Volume Manager (SVM).
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_ Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
Before you begin this practice, ensure that you have completed the tasks covered in the
previous practices.
Practices for Lesson 8: Using Solaris Volume Manager with Oracle Solaris Cluster Software
Chapter 8 - Page 3
2. Record the logical path and DID path numbers of two disks that you will use to create the
demonstration disk set, webds, and volumes in the following table:
Disk set Volumes Primary Disk Mirror Disk
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Webds d100
Note: You need to record only the last portion of the DID path. The first part is the same for
all DID devices: /dev/did/rdsk.
Note: Make sure that the disks you select are not local devices. They must be dual-hosted
and available to more than one cluster node.
For the purpose of this practice, select the d9 and d10 shared disks for the webds disk set.
Task 3: Configuring SVM Disk Sets and Volumes for a Web Server
Complete the following steps to create demonstration disk sets and volumes for use in later
2. Add the same nodes as disk set mediators to each disk set.
# metaset -s webds -a -m clnode1 clnode2
3. Add the two disks chosen in Task 2 to the webds disk set.
# metaset -s webds -a /dev/did/rdsk/d9 /dev/did/rdsk/d10
4. Verify the status of the new disk set.
# metaset -s webds
# medstat -s webds
# cldg status
8. Create a 500 MB soft partition, d100, on top of your mirror. This is the volume that you
actually use for your file system data.
# metainit -s webds d100 -p d99 500m
9. Verify the status of the new volume.
# metastat -s webds
Practices for Lesson 8: Using Solaris Volume Manager with Oracle Solaris Cluster Software
Chapter 8 - Page 4
2. Create a file system on d100 in the webds disk set by performing the following command,
and type y to construct a new file system.
# newfs /dev/md/webds/rdsk/d100
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
3. On all nodes, create a global mount point for the new file system.
# mkdir /global/web
4. On all nodes, add a mount entry in the /etc/vfstab file for the new file system with the
global mount option.
/dev/md/webds/dsk/d100 /dev/md/webds/rdsk/d100 \
/global/web ufs 2 yes global
Note: Do not use the line continuation character (\) in the vfstab file.
5. On the clnode1 cluster node, mount the /global/web file system.
3. On the clnode1 cluster node, try to unmount the /global/web file system.
# umount /global/web
Practices for Lesson 8: Using Solaris Volume Manager with Oracle Solaris Cluster Software
Chapter 8 - Page 5
4. Assume the root role and shut down the clnode1 cluster node.
# shutdown –g0 -y
5. On the clnode2 cluster node, use the cldg status command to verify that the webds
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 8: Using Solaris Volume Manager with Oracle Solaris Cluster Software
Chapter 8 - Page 6
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you verify the local-mac-address? variable, verify the adapters for the IPMP
group, and enter test addresses in the /etc/hosts file. Next, you verify that IPMP is
configured and test IPMP failover and failback.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
Before you begin this practice, ensure that you have completed the tasks covered in the
In another terminal window of the same cluster node or other cluster node, use the
following command:
$ ping -s pubnet_broadcast_addr
For example, ping the broadcast address, 192.168.1.255:
$ ping -s 192.168.1.255
Task 4: Configuring IPMP with Public Network Adapters and Test Addresses
Perform the following steps in the host terminal window of each cluster node, one at a time:
1. Assume the root role.
2. View the existing IPMP group information.
# ipmpstat -g
Note: During cluster configuration, the scinstall utility creates an IPMP group called
sc_ipmp0.
3. Add the second public network adapter to the IPMP group:
# ipadm add-ipmp -i net2 sc_ipmp0
Similarly, perform steps 3 through 5 on the other cluster node. Ensure that you use the
correct second public network adapter, the data address, and the test addresses.
For example, run the following commands on the other cluster node:
# ipadm add-ipmp -i net2 sc_ipmp0
# ipadm create-addr -T static -a 192.168.1.153/24 sc_ipmp0/v4add2
# ipadm create-addr -T static -a 192.168.1.154/24 net0/test
# ipadm create-addr -T static -a 192.168.1.155/24 net2/test
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 1
Practices for Lesson 10: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 2
Practice 10-1: Installing and Configuring HA for NFS
Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
Before you begin this practice, ensure that you have completed the tasks covered in the
previous practices.
For the purpose of this practice, run the pconsole utility on the Administrative
Task 1: Installing and Configuring the HA for NFS Agent and Server
In earlier practices, you created the cluster file system for NFS. Confirm that this file system is
available and ready to configure for Oracle Solaris Cluster HA for NFS.
Perform the following steps on the specified cluster nodes as the oracle1 user, unless
otherwise specified:
In the master console window:
1. Verify that the HA for NFS software package is already installed on both cluster nodes.
$ pkg info ha-cluster/data-service/nfs
4. Identify the node that is currently importing the ZFS storage pool, nfspool, which you
created in the lesson titled “Using ZFS with Oracle Solaris Cluster Software.”
$ zpool status
5. On the node identified in step 4, assume the root role and mount the nfspool/nfs ZFS
file system under /global/nfs.
# zfs set mountpoint=/global/nfs nfspool/nfs
# df –kh | grep nfspool/nfs
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 3
7. Assume the root role.
8. Create a directory within the /global/nfs file system for the HA for NFS resource to
maintain administrative information.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
# cd /global/nfs
# mkdir SUNW.nfs
9. Create the dfstab.nfs-res file in the /global/nfs/SUNW.nfs directory and add the
entry to share the /global/nfs/data directory.
# cd SUNW.nfs
# vi dfstab.nfs-res
share -F nfs -o rw /global/nfs/data
Task 2: Registering and Configuring the Solaris Cluster HA for NFS Data Service
Perform the following steps on the specified cluster nodes as the oracle1 user, unless
otherwise specified:
In the host terminal window of any one cluster node:
1. Register the SUNW.nfs and SUNW.HAStoragePlus resource types.
$ clrt register SUNW.nfs
$ clrt register SUNW.HAStoragePlus
$ clrt list -v
3. Create the logical host name resource for the NFS failover resource group.
$ clrslh create -g nfs-rg cluster1-nfs
4. Create the SUNW.HAStoragePlus resource and set the value of Zpools to nfspool.
$ clrs create -t SUNW.HAStoragePlus -g nfs-rg -p Zpools=nfspool nfs-stor
5. Bring the resource group to a managed state and then bring it online.
$ clrg online -M nfs-rg
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 4
6. Create the SUNW.nfs resource and set the value of Resource_dependencies to nfs-
stor resource.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
2. Copy the test.nfs file from the /opt/ora/lab directory into your home directory.
oracle1@adminws:~$ cp /opt/ora/lab/test.nfs $HOME
cd /net/cluster1-nfs/global/nfs/data
while :
do
date > date.out
cat date.out
rm date.out
sleep 1
done
oracle1@adminws:~$
When you run the test.nfs script in the next task, it will create and write a file containing
a timestamp, to the NFS-mounted cluster file system. The script will also display the file to
standard output (stdout). This script helps you determine the duration for which the NFS
data service is interrupted during switchovers and takeovers.
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 5
On the Administrative Workstation:
2. Run the test.nfs script.
$ chmod u+x test.nfs
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
$ ./test.nfs
In the host terminal window of any one cluster node:
3. Transfer control of the NFS resource to the other node.
$ clrg switch -n dest-node nfs-rg
Task 5: Generating Cluster Failures and Observing the Behavior of the NFS
Failover
Generate failures in your cluster to observe the recovery features.
Try to generate the following failures:
• Power down a cluster node.
• Simulate the unplugging of network cable of one public network interface.
On any one cluster node, try your tests while the resource group is in its normal, nonsuspended
state. Repeat some tests after suspending the resource group.
$ clrg suspend nfs-rg
Note: By suspending a resource group, you will temporarily be suspending the automatic
recovery actions of the resource group. You might need to suspend the automatic recovery
of a resource group to investigate and fix a problem in the cluster.
When you are satisfied with your results, remove the suspension.
$ clrg resume nfs-rg
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 6
Task 6: Making a Customized Application Fail Over with a Generic Data Service
Resource
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this task, you can see how easy it is to get any daemon to fail over in the cluster, by using the
Generic Data Service.
Perform the following steps on the specified cluster nodes:
1. On each cluster node, create a daemon that represents your customized application.
$ vi /var/tmp/myappdaemon
#!/bin/ksh
while :
do
sleep 10
done
5. From one cluster node, create the new resource and enable the resource group and
resources.
$ clrs create -g myapp-rg -t SUNW.gds -p Start_Command=/var/tmp/myappdaemon \
-p Probe_Command=/bin/true -p Network_aware=false myapp-res
$ clrg online -M myapp-rg
$ clrg status myapp-rg
$ clrs status myapp-res
$ ps –ef | grep myappdaemon
6. Verify the behavior of your customized application.
a. Verify that you can manually switch the group from the other cluster node.
$ clrg switch –n dest_node myapp-rg
$ clrg status myapp-rg
Wait a little while and note that the myappdaemon process restarts on the same node.
Also, wait until clrs status shows that the resource is fully online again.
c. Repeat step 6b a few times.
Eventually, the resource group switches over to the other node.
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 7
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 10 - Page 8
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle University and (Oracle Corporation) use only.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 1
Practices for Lesson 11: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you will install and configure Apache web server as a scalable data service on
Oracle Solaris Cluster software.
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 2
Practice 11-1: Installing and Configuring Apache as a Scalable
Service on Oracle Solaris Cluster
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you install and configure Apache as a scalable service on Oracle Solaris Cluster
software.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, in that order. Wait for the virtual machines to boot properly until you see the login
prompt.
Before you begin this practice, ensure that you have completed the tasks covered in the
3. Ensure that the /etc/inet/hosts file on the two cluster nodes and the Administrative
Workstation already contains an entry for the logical host name resource, cluster1-web.
$ cat /etc/inet/hosts | grep cluster1-web
192.168.1.121 cluster1-web
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 3
3. Copy the sample /etc/apache2/httpd.conf-example file to the
/global/web/conf/httpd.conf file.
# mkdir /global/web/conf
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
# cp /etc/apache2/2.2/httpd.conf /global/web/conf/httpd.conf
Note: The changes mentioned in the table are shown in the order of their appearance in the
httpd.conf file, so you can search for the first place to change, change it, then search for
the next, and so on.
5. Create directories for the HTML and CGI files and populate with the sample files.
# cp -rp /var/apache2/2.2/htdocs /global/web
# cp -rp /var/apache2/2.2/cgi-bin /global/web
Task 3: Testing the Server on Each Node Before Configuring the Data Service
Resources
Perform the following steps on both the cluster nodes, but one node at a time:
1. While logged in as the oracle1 user on a cluster node, assume the root role.
2. Temporarily configure the logical shared address (on one node).
# ipadm create-addr -T static -a 192.168.1.121/24 net0/web
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 4
4. Verify that the server is running.
clnode1:/# ps –ef | grep apache2
webservd 4604 4601 0 10:20:05 ? 0:00 /usr/apache2/bin/httpd -f
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
/global/web/conf/httpd.conf -k start
webservd 4603 4601 0 10:20:05 ? 0:00 /usr/apache2/bin/httpd -f
/global/web/conf/httpd.conf -k start
webservd 4605 4601 0 10:20:05 ? 0:00 /usr/apache2/bin/httpd -f
/global/web/conf/httpd.conf -k start
root 4601 1 0 10:20:04 ? 0:01 /usr/apache2/bin/httpd -f
/global/web/conf/httpd.conf -k start
webservd 4606 4601 0 10:20:05 ? 0:00 /usr/apache2/bin/httpd -f
/global/web/conf/httpd.conf -k start
webservd 4602 4601 0 10:20:05 ? 0:00 /usr/apache2/bin/httpd -f
/global/web/conf/httpd.conf -k start
5. Connect to the Apache web server from the web browser on your Administrative
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 5
8. Add an application resource to the scalable resource group.
$ clrs create -g web-rg -t SUNW.apache -p Bin_dir=/global/web/bin \
-p Scalable=true -p Resource_dependencies=cluster1-web,web-stor \
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
apache-res
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 6
4. Create a strong negative affinity with the Apache resource group as the source and
myapp-rg as the target. This means that Apache categorically refuses to run on any node
where myapp-rg is running.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
5. Switch myapp-rg to any one-cluster node where Apache is running. Observe what
happens to the Apache data service. Also, observe the console messages.
$ clrg status web-rg
$ clrg switch -n apacheclusternode myapp-rg
$ clrg status
6. Switch myapp-rg to another node where Apache is running. Observe what happens to the
Apache data service. Does it come back online on the first node?
$ clrg switch -n apacheclusternode myapp-rg
7. Switch myapp-rg offline. Can Apache come back online on both the cluster nodes? Now
remove the relationship.
$ clrg offline myapp-rg
$ clrg status
$ clrg set -p RG_affinities="" web-rg
8. Set a weak positive affinity so that myapp-rg (source) always prefers to run on the same
node as nfs-rg (target).
$ clrg set -p RG_affinities=+nfs-rg myapp-rg
10. Switch your nfs-rg so that it is not on the preferred node of myapp-rg.
$ clrg switch -n nonpreferrednode nfs-rg
11. Bring myapp-rg online without specifying the node. Where does it end up? Why does it not
end up on the nonpreferred node of its own node list?
$ clrg online myapp-rg
$ clrg status
12. Switch myapp-rg so it is no longer on the same node as nfs-rg. Check whether this can
be done. Notice that a weak affinity is a preference and not a requirement.
$ clrg switch -n othernode myapp-rg
$ clrg status
13. Switch myapp-rg offline and now change the affinity to a strong positive affinity with
delegation. What is the difference between ++ and +++ (use +++)? The answer is a few
steps further on.
$ clrg offline myapp-rg
$ clrg set -p RG_affinities=+++nfs-rg myapp-rg
14. Bring myapp-rg online without specifying the node. Identify the node on which it becomes
online.
$ clrg online myapp-rg
$ clrg status
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 7
15. Switch myapp-rg so that it is no longer on the same node as nfs-rg. Note what happens.
$ clrg switch -n othernode myapp-rg
$ clrg status
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
17. What happens if Resource Group Manager (RGM) wants to fail over the source myapp-rg
because its fault monitor indicates application failure?
Kill myappdaemon on whichever node it is running a few times (be patient with restarts) and
observe the console messages.
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 8
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 1
Practices for Lesson 12: Overview
Practice Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 2
Practice 12-1: Running Failover Zones with HA for Zones and
solaris10 Branded Zones
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you use the HA for Zones agent to create a failover zone using the brand,
solaris10. Such a zone could even run on hardware where Oracle Solaris 10 is not natively
supported. The HA for Zones feature on Oracle Solaris 11 supports branded zones of type
solaris and solaris10.
Preparation
Before proceeding with the tasks in this practice, start Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, one after the other. Wait for the virtual machines to boot properly until you see the
If not, use the pkg installs command to install the brand-solaris10 package.
$ pfexec pkg install brand-solaris10
$ pkg info brand-solaris10
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 3
Task 2: Verifying the HA for Zones Agent Support
Perform the following steps from within the master console window on the administrative
workstation:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
1. Ensure that you are logged in as the oracle1 user on the cluster nodes.
2. Verify that the ha-zones package is already installed on the cluster nodes.
# pkg info ha-zones
Name: ha-cluster/data-service/ha-zones
Summary: Oracle Solaris Cluster HA for Solaris Containers
Description: Oracle Solaris Cluster HA for Solaris Containers
Category: System/HA Cluster
State: Installed
Publisher: ha-cluster
Version: 4.1
If not, use the pkg install command to install the ha-zones package.
$ pfexec pkg install ha-zones
$ pkg info ha-zones
Task 3: Finding a Free Disk and Creating a Failover ZFS Pool and ZFS File
System for the Zonepath
Perform the following steps as the oracle1 user, unless otherwise specified:
In the master console window
1. Select an unused disk from shared storage for a new ZFS pool.
$ metaset
$ zpool status
In the host terminal window of any one cluster node
$ clq status
$ cldev list -v
Make sure that you do not use any disks already in use in existing device groups.
2. Assume the root role.
3. Create a failover ZFS pool and file system on the identified shared storage. Refer to the
listings in step 1.
# zpool create s10zonepool c#t#d#
# zfs create s10zonepool/s10zone
# zfs set mountpoint=/s10zone s10zonepool/s10zone
# chmod 700 /s10zone
4. Exit the root role.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 4
Task 4: Creating an Oracle solaris10 Branded Zone with Zonepath in the Shared
Storage
Perform the following steps only on the cluster node that currently mounts the s10zonepool
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 5
7. Boot the zone.
# zoneadm -z s10zone boot
# zoneadm list -cv
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 6
3. On the identified cluster node, create the skeleton resource group and its resources and
ensure that they are online.
$ clrg create -n clnode1,clnode2 s10zone-rg
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Task 7: Halting the Zone and Replicating the Zone Configuration on the Other
Cluster Node
Perform the following steps only on the cluster node that is hosting the s10zone zone and the
s10zone-rg resource group:
5. Copy the file /etc/zones/s10zone.xml to the other storage node that will host the
failover zone.
6. Copy the single-line entry for the s10zone zone in the /etc/zones/index file to the
same file on other cluster node that will host the failover zone.
Following is a sample entry of the s10zone in the /etc/zones/index file:
s10zone:installed:/s10zone:97606842-c887-465d-a9cc-ee8f6d2a9be1
Task 8: Switching the Skeleton Resource Group to the Other Cluster Node
Perform the following steps on the cluster node that is hosting the s10zone zone and the
s10zone-rg resource group:
1. Ensure that you are logged in as the oracle1 user on the cluster node.
2. Switch the resource group to the other cluster node for the failover zone:
$ clrg status s10zone-rg
$ clrg switch -n other_node s10zone-rg
$ clrg status s10zone-rg
3 On the new node now hosting the s10zone-rg resource group, assume the root role.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 7
4. Start the s10zone zone and verify its installation and configuration.
# zoneadm -z s10zone boot
# zlogin s10zone
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
# uname –a
# cat /etc/release
# exit
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 8
4. Create and enable the zone resource:
# ./sczbt_register
# cd
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
You should now see the s10zone-lh IP address automatically moved into the zone.
5. Halt the s10zone zone:
# zoneadm -z s10zone halt
# zoneadm list –cv
ID NAME STATUS PATH BRAND IP
Task 10: Investigating Node Failures and Zone Failures with the Failover Zone
Cause as many of the following failures as you can, given your physical access to the cluster.
Ensure that you induce the failure only one at a time, and fix each one before going on to induce
the next failure.
Induce the following failure scenarios to observe the behavior of the failover branded zone:
• Crash or reboot the physical node hosting the failover zone.
• Manually halt the failover zone when it is under control of the cluster.
• Cause a public network outage on the node hosting the zone, if possible.
Note: In the VirtualBox delivery environment, some amount of patience is required
when you cause a public network outage on a cluster node by simulating disconnection
of network cable, as it takes a while for the cluster node to recognize network failure
and to take corrective action.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 9
Practice 12-2: Building a Zone Cluster
Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice, you create a zone cluster and re-create your scalable Web application within the
zone cluster.
Preparation
Before proceeding with the tasks in this practice, start Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, one after the other. Wait for the virtual machines to boot properly until you see the
login prompt.
Before you begin this practice, please ensure that you have completed the tasks covered in the
previous practices.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 10
2. Create a zone cluster, myzc.
# clzc configure myzc
myzc: No such zone cluster is configured.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
// zoneadm output for installation appears on the physical node consoles only
# clzc status myzc
Note: The zone cluster installation could take anywhere from 30-45 minutes.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 11
Task 4: Booting the Zone Cluster
From any global cluster node, as a root role, boot all zones in the zone cluster.
Note: The zone name (from the point of view of the zone commands in the global zone) will
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
be the same as the name of the zone cluster (myzc), on all physical nodes.
# clzc boot myzc
Waiting for zone boot commands to complete on all the nodes of the zone
cluster "myzc"...
# clzc status myzc
3. Log in to each zone cluster node as the oracle1 user and assume the root role.
4. Set your zone cluster environment:
a. Create a better login environment.
# vi ~/.profile
...
export PATH=/usr/cluster/bin:/usr/bin:/usr/sbin
...
# . .profile
# cd
b. Make any other desired customizations (for example, change your shell if you want, but
do it carefully).
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 12
5. While still logged in to each zone cluster node, explore the zone cluster environment from
the point of view of the zone:
# uname -a
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
# cat /etc/inet/hosts
# clnode status
# clq status // see an error: You cannot run this command from zone cluster
# clrg status
# clrs status
# clrt list –v
Task 6: Exploring the Zone Cluster from the Global Zone Point of View
Perform the following steps on the global cluster node:
$ clrg status
$ clrg status -Z myzc
$ clrg status -Z all
$ clrs status
$ clrs status -Z myzc
$ clrs status -Z all
$ clrs list -v
$ clrs list -v -Z myzc
$ clrs list -v -Z all
$ clrt list -v
$ clrt list -v -Z myzc
$ clrt list -v -Z all
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 13
Practice 12-3: Configuring a Scalable Application in a Zone Cluster
Overview
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
In this practice you configure the Apache scalable application, running in the global cluster, as a
scalable application in the zone cluster by reusing the Apache binaries of the global cluster.
Preparation
Before proceeding with the tasks in this practice, start Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation virtual
machines, one after the other. Wait for the virtual machines to boot properly until you see the
login prompt.
Before you begin this practice, please ensure that you have completed the tasks covered in the
previous practices.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 14
2. Add the /zonecfs/web-lofs highly available local file system for use by the myzc zone
cluster. Ensure that the Oracle Solaris Cluster does not manage the loopback file system
during the initial zone cluster configuration by setting the value of the cluster-control
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
property to false.
# clzc configure myzc
clzc:myzc> add net
clzc:myzc:net> set address=web-lofs-lh
clzc:myzc:net> end
clzc:myzc> add fs
clzc:myzc:fs> set dir=/zonecfs/web-lofs
clzc:myzc:fs> set special=/global/web
clzc:myzc:fs> set type=lofs
clzc:myzc:fs> set cluster-control=false
5. Ensure that the /etc/inet/hosts file on both the zone cluster nodes include entries for
the two zone clusters and for web-lofs-lh.
# cat /etc/inet/hosts
...
192.168.1.140 zcnode1
192.168.1.141 zcnode2
...
192.168.1.124 web-lofs-lh
...
6. Exit the root role and then reboot the myzc zone cluster from any one global cluster node.
# clzc reboot myzc
Task 3: Configuring the Apache Web Server Environment in the Zone Cluster
Perform the following steps on any one zone cluster node:
1. Ensure that you are logged in as the root role on a zone cluster node.
# zlogin myzc
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 15
3. Edit the /zonecfs/web-lofs/conf/httpd.conf file, and change the following entries,
as shown in the following table:
Old Entry New Entry
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Note: The changes mentioned in the table above are shown in the order of their
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 16
4. Create a scalable group containing the Apache resource:
# clrg create -S -n zcnode1,zcnode2 web-rg
# clrs create -g web-rg -t SUNW.HAStoragePlus \
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 17
Practice 12-4: Integrating Oracle 11g into Solaris Cluster Software as
a Failover Application (Optional)
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Overview
In this practice, you integrate Oracle 11g into Solaris Cluster software as a failover application.
In this practice, you complete the following tasks:
• Task 1: Creating a Logical IP Entry in the /etc/hosts File
• Task 2: Creating oracle user and required group accounts
• Task 3: Setting system parameters (On both nodes as root role)
• Task 4: Creating a Shared Storage File System (SVM or ZFS pool)
• Task 5: Preparing the oracle User Environment
Preparation
The Oracle database installation is very time consuming and could take anywhere between 120
minutes and 150 minutes. Therefore, to save time, you are given access to a new set of virtual
machines with pre-installed Oracle database using SVM only (Refer Task 4 of this practice).
Before proceeding with the tasks in this practice, perform the following steps:
• Power-off the following virtual machines:
• Sun_ZFS_Storage_7000
• Cluster_Node_1
• Cluster_Node_2
• Boot the following virtual machines in the given order, one after the other:
• Sun_ZFS_Storage_7000_DB
• Cluster_Node_1_DB
• Cluster_Node_2_DB
Task 1 to Task 9 of this practice is already performed for you to save the time and to speed up
the lab. However, the said tasks are documented here for your reference purpose and you just
need to verify them before proceeding to the next step.
You will start integrating the Oracle database instance with cluster from Task 10 onwards.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 18
If you wish to install the Oracle database using ZFS, follow all the instructions from Task 1 to
Task 13 on the following VM’s:
• Sun_ZFS_Storage_7000
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
• Cluster_Node_1
• Cluster_Node_2
Note: For Task 4, only perform Step 2 to install the Oracle database using ZFS
For the purpose of this practice, run the pconsole utility on the Administrative
Workstation (adminws) system to open the host terminal window for each cluster node and a
master console window.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 19
5. Verify the administrative access provided for the oracle user on both the cluster nodes.
# su - oracle
Oracle Corporation SunOS 5.11 11.1 September 2012
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
oracle@clnode1:~$ roles
root
oracle@clnode1:~$ exit
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 20
a. Verify that the metadb replicas are configured and operational on both the cluster
nodes.
root@clnode1:~# metadb
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 21
g. On the node on which you created the storage, mount the file system and modify its
ownership:
root@clnode1:~# mount /oracledb
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 22
2. Edit the .profile file with the following entries.
oracle@clnode1:~$ vi .profile
...
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
export PATH=/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
...
ORACLE_BASE=/oracledb
ORACLE_HOME=$ORACLE_BASE/11.3/db_1
ORACLE_UNQNAME=orcl
ORACLE_SID=orcl
PATH=$PATH:/usr/openwin/bin:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_UNQNAME ORACLE_SID PATH
...
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 23
Task 7: Installation of required packages
Perform the following steps from within the master console window on the administrative
workstation as root role to verify and install the required packages.
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 24
3. Run the runInstaller script:
oracle@clnode1:/oracledb11g/database$ ./runInstaller &
Starting Oracle Universal Installer...
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Checking Temp space: must be greater than 180 MB. Actual 3753 MB
Passed
Checking swap space: must be greater than 150 MB. Actual 4183 MB
Passed
Checking monitor: must be configured to display at least 256 colors.
Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from
/tmp/OraInstall2012-11-21_08-23-32AM. Please wait ..
. . .
4. Respond to the dialog boxes.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 25
Step Window/Page Choices or Values
Description
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
j. Perform Prerequisite The tests will either all succeed or you will be
Checks warned about swap space requirements.
Click Next, and if you get a pop-up warning
window, click Yes to proceed.
k. Summary Save the db.rsp file and click Install
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 26
6. Run dbca on any one node (clnode1)
Caution: While working inside VirtualBox environment, we observe that the cluster
nodes behave absurdly and many a time reports short of memory. We advise you to
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
reboot the two cluster nodes along with the storage appliance node before starting the
dbca script. In such a case, after reboot, you will observe that the oraclepool pool
goes into FAULTED state. Run the following commands as the root role to bring the
state of oraclepool pool to ONLINE and to mount the oraclepool/orafs file
system:
# zpool clear oraclepool
# zfs mount oraclepool/orafs
a. From admin work station login to the clnode1 as oracle user and run the dbca:
$ ssh –X oracle@clnode1
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 27
Task 10: Preparing an Oracle Instance for Cluster Integration
On the same node from which the Oracle software was installed, perform the following steps as
oracle user to prepare the Oracle instance for Solaris Cluster software integration:
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
1. Configure an Oracle user for the fault monitor (as user oracle):
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
SQL> create user sc_fm identified by sc_fm;
SQL> grant create session, create table to sc_fm;
SQL> grant select on v_$sysstat to sc_fm;
SQL> alter user sc_fm default tablespace users quota 1m on users;
SQL> quit
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 28
b. Add the following lines at the top:
SID_LIST_LISTENER =
(SID_LIST =
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = /oracledb/11.3/db_1)
(GLOBAL_DBNAME = orcl)
)
)
c. Modify the HOST variable to match logical host name ora-lh.
LISTENER =
(DESCRIPTION_LIST =
ADR_BASE_LISTENER = /oracledb
7. Configure the tnsnames.ora file (as user oracle):
Modify the HOST variable to match logical host name ora-lh of the
$ORACLE_HOME/network/admin/tnsnames.ora.
oracle@clnode1:~$ vi /oracledb/11.3/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File:
/oracledb/11.3/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-lh)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
oracle@clnode1:~$
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 29
2. Register the SUNW.oracle_server and SUNW.oracle_listener resource types from
one cluster node:
# clrt register SUNW.oracle_server
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 30
6. Create an oracle_listener resource:
# clrs create -g ora-rg -t oracle_listener \
-p ORACLE_HOME=/oracledb/11.3/db_1 \
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
-p Listener_name=LISTENER \
-p Resource_dependencies=ora-stor \
ora-listener-res
7. Verify the application:
# clrg status
# clrs status
# ps -ef | grep oracle
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 31
These eKit materials are to be used ONLY by you for the express purpose SELF STUDY. SHARING THE FILE IS STRICTLY PROHIBITED.
Chapter 12 - Page 32
Practices for Lesson 12: Using Oracle Solaris Zones in Oracle Solaris Cluster
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Oracle University and (Oracle Corporation) use only.