Documente Academic
Documente Profesional
Documente Cultură
Activity Guide
D74942GC40
Administration
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Disclaimer
This document contains proprietary information and is protected by copyright and 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 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, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization
of Oracle.
Oracle University and Global Academy For Training & Consulting use only
The information contained in this document is subject to change without notice. If you find any problems in the document, please
report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.
If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United
States Government, the following notice is applicable:
Trademark Notice
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective
owners.
Author
Raghavendra J.S.
Editor
Chandrika Kennedy
Graphic Designers
Seema Bopaiah, Kavya Bellur
Publishers
Sumesh Koshy, Raghunath M, Asief Baig, Jayanthy Keshavamurthy, Joseph Fernandez
Table of Contents
Practices for Lesson 1: Introduction ........................................................................................................ 1-1
Practices for Lesson 1: Overview............................................................................................................. 1-2
Practices for Lesson 2: Introducing Oracle Solaris Cluster Hardware and Software.............................. 2-1
Practices for Lesson 2............................................................................................................................. 2-2
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 3: Establishing Cluster Node Console Connectivity.............................................. 3-1
Practice for Lesson 3: Overview .............................................................................................................. 3-2
Practice 3-1: Connecting to the Cluster Node Console ............................................................................. 3-3
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation ......................................... 4-1
Practices for Lesson 4: Overview............................................................................................................. 4-2
Practice 4-1: Preparing for Installation ..................................................................................................... 4-3
Practices for Lesson 5: Configuring the Oracle Solaris Cluster Software............................................... 5-1
Practices for Lesson 5: Overview............................................................................................................. 5-2
Practice 5-1: Installing and Configuring the Oracle Solaris Cluster Software.............................................. 5-3
Practices for Lesson 6: Administering Oracle Solaris Cluster ................................................................ 6-1
Practices for Lesson 6: Overview............................................................................................................. 6-2
Practice 6-1: Performing Basic Cluster Administration .............................................................................. 6-3
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS .............................. 7-1
Practices for Lesson 7: Overview............................................................................................................. 7-2
Practice 7-1: Configuring Volume Management by Using Oracle Solaris ZFS............................................ 7-3
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager ..................... 8-1
Practices for Lesson 8: Overview............................................................................................................. 8-2
Practice 8-1: Configuring Volume Management by Using Solaris Volume Manager ................................... 8-3
Practices for Lesson 9: Managing the Public Network with IPMP ........................................................... 9-1
Practices for Lesson 9: Overview............................................................................................................. 9-2
Practice 9-1: Configuring and Testing IPMP ............................................................................................. 9-3
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS .............................. 10-1
Practices for Lesson 10: Overview ........................................................................................................... 10-2
Practice 10-1: Installing and Configuring HA for NFS................................................................................ 10-3
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group
Relationships ..................................................................................................................................... 11-1
Practices for Lesson 11: Overview ........................................................................................................... 11-2
Practice 11-1: Installing and Configuring Apache as a Scalable Service on Oracle Solaris Cluster ............. 11-3
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster ........................... 12-1
Practices for Lesson 12: Overview ........................................................................................................... 12-2
Practice 12-1: Building a Zone Cluster ..................................................................................................... 12-3
Practice 12-2: Importing an Installed Zone into an Existing Zone Cluster................................................... 12-7
Practice 12-3: Configuring a Scalable Application in a Zone Cluster .......................................................... 12-13
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional) .................................. 13-1
Practices for Lesson 13: Overview (Optional) ........................................................................................... 13-2
Practice 13-1: Integrating Oracle Database 12c into Oracle Solaris Cluster Software as a Failover
Application ......................................................................................................................................... 13-3
Practice 13-2: Install and Configure Oracle Solaris and Oracle Solaris Cluster Software Using Unified
Archives (Demonstration) ................................................................................................................... 13-18
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practices Overview
This practice introduces you to your course infrastructure, which you will use for performing the
practices. The practices map to the respective lessons.
Oracle University and Global Academy For Training & Consulting use only
Practices Infrastructure
Your practice environment is based on the Oracle VirtualBox virtualization software. VirtualBox
is a cross-platform virtualization application. Figure 1 shows the configured virtual machines
(VM).
Oracle University and Global Academy For Training & Consulting use only
Figure 1: Oracle VirtualBox Virtual Machines
Oracle University and Global Academy For Training & Consulting use only
Sun_ZFS_Storage_7000_DB
cluster nodes to perform the Oracle Database 12c
practice.
This VM is preinstalled with Oracle Solaris 11.3
Cluster_Node_1_UA OS and Oracle Solaris Cluster 4.3 and used to
perform the Oracle Database 12c practice.
This VM is preinstalled with Oracle Solaris 11.3
Cluster_Node_2_UA OS and Oracle Solaris Cluster 4.23 and used to
perform the Oracle Database 12c practice.
The VMs are further configured to communicate with the host machine through the shared
directory. The shared directories are as listed in the following table:
Resource Name Location Description
Host share directory /opt/ora Contains various course files
Demo files /opt/ora/demo Contains the demonstration files that
are used in the course
OVA files /opt/ora/images Contains a backup of all virtual
machines used in the course.
If any virtual machine gets corrupted
while performing a practice, you can
delete the virtual machine and import
the respective VM from this folder.
However, after reimporting, you will
have to reperform previous practices
to bring the VM to the required start
state of the practice where the VM
got corrupted.
Lab files /opt/ora/lab Contains practice files that are
required to perform certain practices
The details of the shared directories can be verified in the respective VM settings. Each VM has
an entry in the /etc/vfstab file, which stores information about the mount points and related
directories on the system.
Oracle University and Global Academy For Training & Consulting use only
• Password: oracle1
• Administrator privileges: As the oracle1 user, use su - to switch to the primary
administrator (root) role. The password is oracle1. The oracle1 user switches to
root because root is configured as a role by default. The first username created on the
system (during the OS installation) is the initial privileged user who can assume the
administrator role. This can be verified in the /etc/user_attr database file.
The following table lists the login credentials for the cluster nodes and the administration
workstation:
Virtual Machines Regular User/Password Superuser/Password
Cluster_Node_1 oracle1/oracle1 root/oracle1
Cluster_Node_2 oracle1/oracle1 root/oracle1
Administration Workstation oracle1/oracle1 root/oracle1
Cluster_Node_1_DB oracle1/oracle1 root/oracle1
Cluster_Node_2_DB oracle1/oracle1 root/oracle1
Oracle University and Global Academy For Training & Consulting use only
How to Log In to the VM?
3. After the Administrative Workstation VM is powered ON, the Username login screen
appears. Enter oracle1 as the username and click the Log In button.
Note: It might take a few minutes for the Username login screen to appear.
4. When the password login screen appears, enter the password oracle1 and click the Log
In button.
Oracle University and Global Academy For Training & Consulting use only
5. Open a terminal window by right-clicking the desktop and selecting Open Terminal. In the
terminal window, run the su - command to assume the administrator privileges. The
password is oracle1.
oracle1@adminws:~$ su –
Password: oracle1
Oracle Corporation SunOS 5.11 11.3 September 2015
root@adminws:~#
Oracle University and Global Academy For Training & Consulting use only
7. When the Close Virtual Machine dialog box appears, select “Power off the machine” and
click OK.
Note: You can verify that the VM is shut down by checking the status that appears under
the VM’s name in the Oracle VM VirtualBox Manager window. The status for the
Administrative Workstation VM must be “Powered Off.”
Oracle University and Global Academy For Training & Consulting use only
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 2:
Introducing Oracle Solaris
Cluster Hardware and
Software
Chapter 2
Practices for Lesson 2: Introducing Oracle Solaris Cluster Hardware and Software
Chapter 2 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 2: Introducing Oracle Solaris Cluster Hardware and Software
Chapter 2 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 3:
Establishing Cluster Node
Console Connectivity
Chapter 3
Practice Overview
The Oracle Solaris pconsole utility is used to connect to the cluster nodes. The pconsole
utility creates a host terminal window for each remote host that you specify on the command
line. The utility also opens a central, or master, console window that you can use to send input
Oracle University and Global Academy For Training & Consulting use only
to all the nodes at the same time.
Note
• Command output or values may vary across systems.
• To accommodate the complete command output, the font size of the output is reduced in
a few places.
• Your system performance depends on the network speed and network load. If you find
your VM is too slow to proceed with, it is suggested that you restart the VM.
Overview
In this practice, you install and configure the pconsole utility on an administrative workstation
to manage a cluster environment.
In this practice, you perform the following tasks:
Oracle University and Global Academy For Training & Consulting use only
• Update host name resolution.
• Install the pconsole utility.
• Configure the pconsole utility.
• Use the pconsole utility.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation VMs in that
order. Wait for the VMs to boot properly until you see the login prompt.
This practice assumes that the Oracle Solaris 11.3 OS is already installed on the two cluster
nodes and the administrative workstation.
For the purpose of this practice, use the Administrative Workstation (adminws) system
to install, configure, and use the pconsole utility.
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
…
4. Verify that the config/host property of the system/name-service/switch service is
set to “files nis” to ensure that the name resolution first happens by using the
/etc/inet/hosts file before trying any other name service.
$ svcprop system/name-service/switch | grep config/host
config/host astring files\ nis
…
If the config/host property is not set, use the svccfg command as the root role to set
the config/host property of the system/name-service/switch service to “files
nis”.
# 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
Oracle University and Global Academy For Training & Consulting use only
sysconfig/config_properties astring sc_ns_switch_default:config/default
sc_ns_switch_host:config/host sc_ns_switch_netgroup:config/netgroup
root@adminws:~#
Note: Ensure that you exit the root role before proceeding to the next task.
PHASE ITEMS
Installing new actions 25/25
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only
in the cluster.
Category: Applications/System Utilities
State: Installed
Publisher: solaris
Version: 1.0
Build Release: 5.11
Branch: 0.175.3.0.0.25.3
Packaging Date: June 22, 2015 12:47:25 AM
Size: 73.89 kB
FMRI: pkg://solaris/terminal/pconsole@1.0,5.11-
0.175.3.0.0.25.3:20150622T004725Z
4. Install the Oracle Solaris Cluster man page packages:
$ pkg info ha-cluster/system/manual
pkg: info: no packages matching the following patterns you specified are
installed on the system. Try specifying -r to query remotely:
ha-cluster/system/manual
PHASE ITEMS
Installing new actions 321/321
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 2/2
Oracle University and Global Academy For Training & Consulting use only
$ pkg info ha-cluster/system/manual/data-services
$ pfexec pkg install ha-cluster/system/manual/data-services
Packages to install: 1
Create boot environment: No
Create backup boot environment: No
PHASE ITEMS
Installing new actions 89/89
Updating package state database Done
Updating package cache 0/0
Updating image state Done
Creating fast lookup database Done
Updating package cache 2/2
Oracle University and Global Academy For Training & Consulting use only
...
export PATH=/usr/cluster/man:/usr/bin:/usr/sbin
...
3. Set the environment variables by running the .profile login script.
$ echo $PATH
/usr/bin:/usr/sbin
$ . ~/.profile
$ echo $PATH
/usr/bin:/usr/sbin:/usr/cluster/man
5. Place the cursor in the master console window, and press the Enter key a couple of times.
You should see a response in the host terminal window of each cluster node. The
pconsole utility is now ready for use.
6. Adjust the two host terminal windows for each cluster node and the master console window
on the desktop of the administrative workstation, as shown in the following screenshot:
Oracle University and Global Academy For Training & Consulting use only
Summary: Now, you have successfully established console access to the cluster nodes
using the pconsole utility. Adjusting the two host terminal windows and the master
console window is just for your convenience and is not a mandatory step.
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 4:
Preparing for the Oracle
Solaris Cluster Installation
Chapter 4
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you verify the Oracle Solaris 11.3 OS installed on your practice systems, identify
a cluster topology, select quorum devices, verify the cluster interconnect configuration, and
select public network interfaces.
Oracle University and Global Academy For Training & Consulting use only
Note
• Command output or values may vary across systems.
• To accommodate the complete command output, the font size of the output is reduced in
a few places.
• Your system performance depends on the network speed and network load. If you find
your VM too slow to proceed with, it is suggested that you restart the VM.
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you prepare your assigned cluster nodes for installing the Oracle Solaris Cluster
4.3 software.
In this practice, you perform the following tasks:
Oracle University and Global Academy For Training & Consulting use only
• Verify the operating system environment.
• Identify the cluster topology.
• Select quorum devices.
• Verify the cluster-private interconnect configuration.
• Select public network interfaces.
Preparation
To begin this practice, you must be connected to the cluster nodes through the pconsole utility
from the administrative workstation and you must be logged in as the oracle1 user.
Example
$ /usr/sbin/prtconf | grep -i mem
Memory size: 4096 Megabytes
Node 1 memory: _______________
Node 2 memory: _______________
3. Determine whether ZFS is the root file system on the cluster nodes by using the following
commands:
$ df –kh
Filesystem Size Used Available Capacity Mounted on
rpool/ROOT/solaris 49G 2.9G 42G 7% /
....
$ zpool status
pool: rpool
state: ONLINE
scan: none requested
config:
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
c1t0d0s0 ONLINE 0 0 0
$ zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 49.8G 7.25G 42.5G 14% 1.00x ONLINE -
Oracle University and Global Academy For Training & Consulting use only
4. Verify that at least 750 MB of swap space is given to each cluster node by using the swap
–l command. The swap space must be in zvol.
$ swap -l
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
This task describes how to verify the cluster-private interconnect configuration.
Perform the following steps to configure an Ethernet-based, point-to-point interconnect:
1. Determine the names of your cluster-private interconnect adapters by using the dladm
show-phys command, followed by the ipadm show-addr command.
$ dladm show-phys
$ ipadm show-addr
Refrain from assigning IP addresses to the existing public network interfaces.
2. Determine the cluster-private interconnect interfaces for as many interfaces as are
applicable in your practice environment.
The following figure is a schematic representation of a cluster that uses an Ethernet-based,
point-to-point cluster-private interconnect configuration:
Note: In your VirtualBox practice environment, cluster nodes are configured with Ethernet-
based, point-to-point interconnects. Skip the steps listed under the switch-based Ethernet
interconnect section.
Perform the following steps to configure a switch-based Ethernet interconnect:
1. Record the logical names of the cluster interconnect interfaces.
Note: You can use the strategy of determining the cluster transport interfaces by using the
dladm show-phys command, followed by the ipadm show-addr command. Do not use
IP addresses in the existing public network space.
$ dladm show-phys
$ ipadm show-addr
Practices for Lesson 4: Preparing for the Oracle Solaris Cluster Installation
Chapter 4 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
2. Determine the interconnect interfaces for as many interfaces as are applicable in your
practice environment.
The following figure is a schematic representation of a cluster that uses Ethernet-based,
cluster-private interconnects with switches:
Oracle University and Global Academy For Training & Consulting use only
3. Verify that each Ethernet interconnect interface is connected to the correct switch by
pinging 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 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 5:
Configuring the Oracle
Solaris Cluster Software
Chapter 5
Practice Overview
In this practice, you install and configure the Oracle Solaris Cluster software.
Note
• Command output or values may vary across systems.
Oracle University and Global Academy For Training & Consulting use only
• To accommodate the complete command output, the font size of the output is reduced
in a few places.
• Your system performance depends on the network speed and network load. If you find
your VM too slow to proceed with, it is suggested that you restart the VM.
Overview
In this practice, you install and configure the Oracle Solaris Cluster software. You verify the
practice environment, update local name resolution, install the Oracle Solaris Cluster packages,
Oracle University and Global Academy For Training & Consulting use only
configure a new cluster, verify an automatically selected quorum device, configure a quorum
device, and verify the cluster configuration and status.
In this practice, you perform the following tasks:
• Establish connection with the cluster nodes.
• Prepare the cluster node environment.
• Install the Oracle Solaris Cluster packages.
• Authorize the acceptance of cluster configuration commands from the sponsor node.
• Configure a new cluster by using the all-nodes-at-once method.
• Configure a new cluster by using the one-node-at-a-time method.
• Verify the cluster configuration.
Preparation
Before proceeding with this practice, start the Sun_ZFS_Storage_7000, Cluster_Node_1,
Cluster_Node_2, and Administrative Workstation VMs, in that order. Wait for the
VMs to boot properly until you see the login prompt.
For the purpose of this practice, use the Administrative Workstation (adminws) system
to install and configure the Oracle Solaris Cluster software by using the pconsole utility.
Oracle University and Global Academy For Training & Consulting use only
Copyright (c) 1983, 2015, Oracle and/or its affiliates. All rights reserved.
Assembled 22 June 2015
2. Ensure that the CONSOLE=/dev/console line in the /etc/default/login file is
commented out on the cluster nodes.
$ cat /etc/default/login | grep CONSOLE
# If CONSOLE is set, root can only login on that device.
#CONSOLE=/dev/console
3. Choose the primary group package of the Oracle Solaris Cluster 4.3 software to install.
Primary group package: _________________________________________________
For the purpose of this practice, you select the ha-cluster-full primary group package
of the Oracle Solaris Cluster 4.3 software to install on the cluster nodes.
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.
…
192.168.1.100 adminws
192.168.1.101 cluster-1 clnode1
192.168.1.102 cluster-2 clnode2
…
5. Verify that the Network Auto-Magic (NWAM) feature is disabled on the cluster nodes.
$ netadm list
TYPE PROFILE STATE
ncp Automatic disabled
ncp DefaultFixed online
loc Automatic offline
loc NoNet offline
loc DefaultFixed online
Note: NWAM activates a single network interface and disables all others. For this reason,
NWAM cannot coexist with the Oracle Solaris Cluster software and you must disable it
before you configure or run your cluster. To disable NWAM, you enable the
defaultfixed profile.
# netadm enable -p ncp defaultfixed
# netadm list -p ncp defaultfixed
6. Grant the Service Management and Service Operator rights profiles to the oracle1
user on the cluster nodes.
a. While logged in as the oracle1 user on the cluster nodes, assume the root role.
b. Grant the Service Management and Service Operator rights profiles to the
oracle1 user.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only
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.
Note: During the installation of the Oracle Solaris OS, a restricted network profile is used
that disables external access for certain network services. The restricted services include
the RPC communication service, which is required for cluster communication.
Use the following commands to restore external access to RPC communication:
$ 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
Oracle University and Global Academy For Training & Consulting use only
Branch: 0.24.0
Packaging Date: August 26, 2015 03:29:30 AM
Size: 434.00 B
FMRI: pkg://ha-cluster/ha-cluster/group-package/ha-cluster-
full@4.3,5.11-0.20.0:20150826T233336Z
5. Assign the /usr/cluster/bin and /usr/cluster/man directory paths to the PATH
environment variable in the .profile login script of the oracle1 and root user.
$/# vi .profile
...
export PATH=/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
...
6. Set the environment variables by running the .profile login script.
$/# . .profile
$/# echo $PATH
/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
svc:/network/rpc/scrinstd:default online
Control node clnode1
Authentication protocol sys
Oracle University and Global Academy For Training & Consulting use only
1. While logged in as the oracle1 user on the clnode1 cluster node, assume the root role.
2. Verify that the /usr/cluster/bin and /usr/cluster/man directory paths are set the
.profile login script of the root role
# echo $PATH
/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
If the path variables are not set, assign the /usr/cluster/bin and /usr/cluster/man
directory paths to the PATH environment variable in the .profile login script of the root
role.
# vi .profile
...
export PATH=/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
...
# . .profile
# echo $PATH
/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
3. Start the scinstall utility.
# /usr/cluster/bin/scinstall
4. Make the following choices, as the installation proceeds:
a. From the Main menu, select option 1, Create a new cluster or add a
cluster node.
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
the 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.
h. Press Ctrl + D to finish adding the cluster nodes, to display the complete list of cluster
nodes added.
i. Specify Yes to confirm the listing of the cluster nodes.
j. Select the cluster transport adapters that will be used as the cluster-private
interconnect.
For this practice, select net1 and net3, one after the other.
k. Specify No when asked whether you want to disable the automatic quorum device
selection.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
l. Specify Yes when asked whether it is okay to create the new cluster.
m. Specify No when asked to interrupt cluster creation for cluster check errors.
The cluster configuration begins. Somewhere towards the end of the cluster configuration,
the clnode2 cluster node reboots and you lose the pconsole connection to the node.
After the clnode2 cluster node successfully reboots and joins the cluster, the scinstall
utility then proceeds to configure the clnode1 cluster node. After the configuration, the
Oracle University and Global Academy For Training & Consulting use only
clnode1 cluster node also reboots to join the cluster. At this point, you now lose the
pconsole connection to the clnode1 cluster node too and only the master console
window remains open. Press Ctrl + D to close the master console window.
After the clnode1 cluster node also successfully reboots and joins the cluster, reestablish
the pconsole connection to the cluster nodes to continue with cluster configuration and
administration.
Note: Refer to the various messages displayed in the console window of the cluster nodes
when they reboot.
Oracle University and Global Academy For Training & Consulting use only
m. Examine the scinstall command options for correctness. Accept them if they seem
appropriate.
You must wait for this node to complete rebooting to proceed to the second node.
Note: After cluster configuration completes, the node reboots, causing the host terminal
window to close. You have to reestablish the connection to the clnode1 cluster node by
using the pconsole utility. Refer to the messages displayed in the console window of the
cluster nodes.
Complete the following steps in the host terminal window of the clnode2 cluster node:
1. Assume the root role, while logged in as the oracle1 user on the clnode1 cluster node.
2. Assign the /usr/cluster/bin and /usr/cluster/man directory paths to the PATH
environment variable in the .profile login script of the root role.
# vi .profile
...
export PATH=/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
...
3. Set the environment variables by running the .profile login script.
# . .profile
# echo $PATH
Oracle University and Global Academy For Training & Consulting use only
window to close. You have to reestablish the connection to the clnode2 cluster node by
using the pconsole utility. Refer to the messages displayed in the console window of the
cluster nodes.
Oracle University and Global Academy For Training & Consulting use only
d2 clnode2:/dev/rdsk/c0t600144F0C96CB51800005382CD820003d0
d2 clnode1:/dev/rdsk/c0t600144F0C96CB51800005382CD820003d0
… …
Each shared (dual-ported) DID device must show a logical path from each cluster node.
4. Run the cluster show and cluster status commands.
$ cluster show
$ cluster status
The cluster status, node names, transport configuration, and quorum device information
must be complete.
Chapter 5 - Page 12
Practices for Lesson 5: Configuring the Oracle Solaris Cluster Software
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 6:
Administering Oracle Solaris
Cluster
Chapter 6
Practice Overview
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.
Oracle University and Global Academy For Training & Consulting use only
In this practice, you perform the following tasks:
• Verify basic cluster configuration and status.
• Reassign a quorum device.
• Configure the Oracle Solaris Cluster quorum server software.
• Add a quorum server quorum device.
• Prevent cluster amnesia.
Note
• Command output or values may vary across systems.
• To accommodate the complete command output, the font size of the output is reduced in
a few places.
• Your system performance depends on the network speed and network load. If you find
your VM too slow to proceed with, it is suggested that you restart the VM.
Overview
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.
Oracle University and Global Academy For Training & Consulting use only
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation VMs, in that
order. Wait for the VMs 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
Workstation (adminws) system to open a master console window and the host terminal
window for each cluster node.
$ clnode show
=== Cluster Nodes ===
reboot_on_path_failure: disabled
globalzoneshares: 1
defaultpsetmin: 1
quorum_vote: 1
quorum_defaultvote: 1
quorum_resv_key: 0x5395590700000001
Transport Adapter List: net1, net3
Oracle University and Global Academy For Training & Consulting use only
Node Name: clnode1
Node ID: 2
Enabled: yes
privatehostname: clusternode2-priv
reboot_on_path_failure: disabled
globalzoneshares: 1
defaultpsetmin: 1
quorum_vote: 1
quorum_defaultvote: 1
quorum_resv_key: 0x5395590700000002
Transport Adapter List: net1, net3
2. Use the clquorum (clq) command to verify the current cluster membership and the
quorum status.
$ clq status
=== Cluster Quorum ===
Oracle University and Global Academy For Training & Consulting use only
$ cldev status
/dev/did/rdsk/d10 clnode1 Ok
clnode2 Ok
<… output omitted…>
5. Verify the interconnect status.
$ clintr status
Oracle University and Global Academy For Training & Consulting use only
$ 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-#
$ clq status
$ clq status new-d-#
4. Remove your old broken quorum device.
$ clq remove old-d-#
5. Verify the quorum status again.
$ clq status
Oracle University and Global Academy For Training & Consulting use only
adminws# . .profile
7. Specify quorum configuration information in the /etc/scqsd/scqsd.conf file as follows:
# vi /etc/scqsd/scqsd.conf
…
/usr/cluster/lib/sc/scqsd -d /var/scqsd -i quorumserver -p 9000
8. Save and close the /etc/scqsd/scqsd.conf file.
9. Start the newly configured quorum server.
adminws# /usr/cluster/bin/clquorumserver start quorumserver
10. Exit the root role.
2. As the root role, shut down the clnode1 and clnode2 cluster nodes with init 0, one
after the other.
# init 0
Note: Wait until you see the message on the console screen.
…
syncing file systems... done
Oracle University and Global Academy For Training & Consulting use only
WARNING: CMM: Node being shut down.
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 7:
Configuring Volume
Management with Oracle
Solaris ZFS
Chapter 7
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you configure volume management by using ZFS.
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
In this practice, you perform the following tasks:
• Create a ZFS pool and file system for cluster data.
• Create a snapshot and modify your data.
• Migrate your ZFS pool manually 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 VMs, in that
order. Wait for the VMs to boot properly until you see the login prompt.
For the purpose of this practice, run the pconsole utility on the Administrative
Workstation (adminws) system to open a master console window and the host terminal
window for each cluster node.
Task 1: Create 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
Note: Ensure 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
Note: Use d3 and d4 to create the mirrored pool.
4. Create a ZFS file system within the pool.
# zfs create nfspool/nfs
# zfs list -r nfspool
NAME USED AVAIL REFER MOUNTPOINT
nfspool 124K 1.95G 32K /nfspool
nfspool/nfs 31K 1.95G 31K /nfspool/nfs
# df –kh
Filesystem Size Used Available Capacity Mounted on
...
nfspool 2.0G 32K 2.0G 1% /nfspool
nfspool/nfs 2.0G 31K 2.0G 1% /nfspool/nfs
...
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
nfspool/nfs 2.0G 31K 2.0G 1% /testnfs
...
6. Populate your file system with some simple files.
# cd /testnfs
# touch file1 file2 file3
# vi my_letter
ZFS is much better than that legacy stuff
# ls
file1 file2 file3 my_letter
# cd
As displayed here, the listsnapshots property is off by default. Set it on and verify
its status.
# zpool set listsnapshots=on nfspool
# zpool get listsnapshots nfspool
NAME PROPERTY VALUE SOURCE
nfspool listsnapshots on local
Now, when you display the descendent file systems of the nfspool pool, the
snapshots are included.
# zfs list -r nfspool
NAME USED AVAIL REFER MOUNTPOINT
nfspool 139K 1.95G 31K /nfspool
nfspool/nfs 31.5K 1.95G 31.5K /testnfs
nfspool/nfs@SAVEMYWORK 0 - 31.5K -
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
# ls
file1 file3 file4 my_letter
# vi my_letter
ZFS is much better than that legacy stuff
Here is more information about my class
# cd
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 49.8G 10.4G 39.4G 20% 1.00x ONLINE -
# zpool status
On the host terminal window of the clnode2 cluster node:
2. Assume the root role.
3. Import the nfspool pool.
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
rpool 49.8G 9.43G 40.3G 18% 1.00x ONLINE -
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
# zpool status
pool: nfspool
state: ONLINE
scan: none requested
config:
Oracle University and Global Academy For Training & Consulting use only
nfspool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c0t600144F0C96CB51800005382CDB50004d0 ONLINE 0 0 0
c0t600144F0C96CB51800005382CDCC0005d0 ONLINE 0 0 0
pool: rpool
state: ONLINE
scan: none requested
config:
# df –kh
...
nfspool 2.0G 31K 2.0G 1% /nfspool
nfspool/nfs 2.0G 32K 2.0G 1% /testnfs
...
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
file1 file2 file3 my_letter
5. Exit the root role.
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Chapter 7 - Page 7
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Chapter 7 - Page 8
Practices for Lesson 7: Configuring Volume Management with Oracle Solaris ZFS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 8:
Configuring Volume
Management with Solaris
Volume Manager
Chapter 8
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you configure Solaris Volume Manager for use with Oracle Solaris Cluster.
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you configure Solaris Volume Manager by performing the following tasks:
• Initialize the Solaris Volume Manager local metadb replicas.
Oracle University and Global Academy For Training & Consulting use only
• Select the Solaris Volume Manager demo volume disk drives.
• Configure Solaris Volume Manager disk sets and volumes for a web server.
• Create a cluster file system.
• Test cluster file systems.
• Manage disk sets.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_ Node_2, and Administrative Workstation VMs, in that
order. Wait for the VMs 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
Workstation (adminws) system to open a master console window and the host terminal
window for each cluster node.
At least one local disk on each cluster node must have a small unused slice that you can use for
the local metadb replicas. The examples in this practice use slice 6 of the boot disk, which must
be reserved ahead of time. During this practice, you create two data service disk sets, each of
which contains a single mirrored volume.
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
# prtvtoc /dev/rdsk/c1t0d0s0
* /dev/rdsk/c1t0d0s0 partition map
*
* Dimensions:
* 512 bytes/sector
* 63 sectors/track
* 255 tracks/cylinder
Oracle University and Global Academy For Training & Consulting use only
* 16065 sectors/cylinder
* 6526 cylinders
* 6524 accessible cylinders
*
* Flags:
* 1: unmountable
* 10: read-only
*
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 0 00 16065 104679540 104695604
2 5 01 0 104808060 104808059
6 0 00 104695605 112455 104808059
8 1 01 0 16065 16064
root@clnode1:~#
Task 2: Select the Solaris Volume Manager Demo Volume Disk Drives
Perform the following steps in the host terminal window of the clnode1 cluster node to select
the Solaris Volume Manager demo volume disk drives:
1. As the oracle1 user or root role, use the cldev list -v command to list all of the
available DID drives.
$ cldev list –v
$ clq status
Make note of the DID numbers of shared disks that are already in use. Make sure that you
do not use those shared disks in this practice.
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
2. Record the logical path and DID path numbers of the 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
Webds d100
Note
Oracle University and Global Academy For Training & Consulting use only
− 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.
− 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 d5 and d6 shared disks for the webds
disk set.
Task 3: Configure Solaris Volume Manager Disk Sets and Volumes for a Web
Server
Perform the following steps to create demonstration disk sets and volumes to use in later
practices:
1. Log in as the oracle1 user on the clnode1 cluster node, and assume the root role.
2. Create the webds disk set, and configure the nodes that are physically connected to it.
# metaset -s webds -a -h clnode1 clnode2
3. Add the same nodes as disk set mediators to each disk set.
# metaset -s webds -a -m clnode1 clnode2
4. Add the two disks chosen in Task 2 to the webds disk set.
# metaset -s webds -a /dev/did/rdsk/d5 /dev/did/rdsk/d6
Note: Here, add d5 and d6 to the webds disk set.
5. Verify the status of the new disk set.
# metaset -s webds
Set name = webds, Set number = 1
Host Owner
clnode1 Yes
clnode2
Driv Dbase
d5 Yes
d6 Yes
# medstat -s webds
Mediator Status Golden
clnode1 Ok No
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
clnode2 Ok No
# cldg status
=== Cluster Device Groups ===
Oracle University and Global Academy For Training & Consulting use only
Device Group Name Primary Secondary Status
----------------- ------- --------- ------
webds clnode1 clnode2 Online
6. Create a submirror on each of your disks in the webds disk set.
# metainit -s webds d0 1 1 /dev/did/rdsk/d5s0
webds/d0: Concat/Stripe is setup
# metainit -s webds d1 1 1 /dev/did/rdsk/d6s0
webds/d1: Concat/Stripe is setup
7. Create a mirror volume, d99, by using the d0 submirror.
# metainit -s webds d99 -m d0
webds/d99: Mirror is setup
8. Attach the second submirror, d1, to the mirror volume d99.
# metattach -s webds d99 d1
webds/d99: submirror webds/d1 is attached
9. 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
d100: Soft Partition is setup
10. Verify the status of the new volume.
# metastat -s webds
webds/d100: Soft Partition
Device: webds/d99
State: Okay
Size: 1024000 blocks (500 MB)
Extent Start Block Block count
0 1024 1024000
webds/d99: Mirror
Submirror 0: webds/d0
State: Okay
Submirror 1: webds/d1
State: Resyncing
Resync in progress: 12 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4173824 blocks (2.0 GB)
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
State: Resyncing
Size: 4173824 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
d6s0 0 No Okay Yes
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 7
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
2. On the clnode2 cluster node, move into the /global/web file system.
# cd /global/web
3. On the clnode1 cluster node, try to unmount the /global/web file system.
# umount /global/web
You should get an error that the file system is busy.
4. On the clnode2 cluster node, move out of the /global/web file system (cd /) and try to
unmount it again on the clnode1 cluster node.
5. On the clnode2 cluster node, mount the /global/web file system.
6. Try unmounting and mounting /global/web from all nodes.
Ensure that the /global/web cluster file system remains mounted on the clnode1
cluster node before you proceed to the next task.
Note: You can bring a device group online to a selected node as follows:
# cldg switch -n node_to_switch_to devgrpname
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 8
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Type: SVM
failback: false
Node List: clnode1, clnode2
preferenced: true
numsecondaries: 1
diskset name: webds
4. Reboot the clnode1 cluster node.
5. On the clnode2 cluster node, verify that the webds disk set has automatically migrated to
the clnode2 cluster node by using the cldg status command.
$ cldg status
6. After clnode1 reboots, the webds disk set should remain mastered by the clnode2
cluster node.
7. Use the cldg switch command from either node to migrate the webds disk set to the
clnode1 cluster node.
# cldg switch -n clnode1 webds
# cldg status
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Chapter 8 - Page 9
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Chapter 8 - Page 10
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 8: Configuring Volume Management with Solaris Volume Manager
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 9:
Managing the Public Network
with IPMP
Chapter 9
Practice Overview
In this practice, you configure and test IPMP.
Oracle University and Global Academy For Training & Consulting use only
Overview
In this practice, you verify the local-mac-address? variable, verify the adapters for the IPMP
group, and enter test addresses in the /etc/inet/hosts file. Next, you verify that IPMP is
configured and test IPMP failover and failback.
Oracle University and Global Academy For Training & Consulting use only
In this practice, you perform the following tasks:
• Verify the local-mac-address? variable.
• Verify the adapters for the IPMP group.
• Verify or enter test addresses in the /etc/inet/hosts file.
• Configure IPMP with public network adapters and test addresses.
• Verify that IPMP is configured.
• Verify 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 VMs, in that
order. Wait for the VMs 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
Workstation (adminws) system to open a master console window and the host terminal
window for each cluster node.
3. Your primary public network adapter must be the only one currently configured on the
public network.
$ ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
sc_ipmp0 ipmp ok yes net0
Oracle University and Global Academy For Training & Consulting use only
net0 ip ok yes --
net1 ip ok yes --
net3 ip ok yes --
clprivnet0 ip ok yes --
$ ipadm show-addr
4. You can verify your secondary public network adapter by:
• Making sure that it is not configured as a private transport
• Making sure that it can snoop public network broadcast traffic
Assume the root role and use the following commands:
# ipadm create-ip net2
# snoop -d net2
In another terminal window of the same cluster node or another 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: Configure 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
Oracle University and Global Academy For Training & Consulting use only
GROUP GROUPNAME STATE FDT INTERFACES
sc_ipmp0 sc_ipmp0 ok -- net0
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
# ipmpstat –g
GROUP GROUPNAME STATE FDT INTERFACES
sc_ipmp0 sc_ipmp0 ok -- net2 net0
4. Add a data address to the second public network adapter, net2.
# ipadm create-addr -T static -a 192.168.1.150/24 sc_ipmp0/v4add2
5. Add test addresses to the first and second public network adapters:
# ipadm create-addr -T static -a 192.168.1.151/24 net0/test
# ipadm create-addr -T static -a 192.168.1.152/24 net2/test
Similarly, perform steps 3 through 5 on the other cluster node. Ensure that you use the
correct second public network adapter, data address, and 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
Oracle University and Global Academy For Training & Consulting use only
2. Simulate the unplugging of the Ethernet cable from the network adapter that currently has
the physical interface of the cluster node on it.
Note: If you do not know to simulate the unplugging of ethernet cable, check with your
instructor.
3. Observe the cluster node messages in the console or in the /var/adm/messages file.
4. Observe the output of the clnode status -m command.
$ clnode status –m
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 10:
Managing Data Services,
Resource Groups, and HA-
NFS
Chapter 10
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you install and configure HA for NFS.
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you install and configure HA for NFS.
Preparation
Oracle University and Global Academy For Training & Consulting use only
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation VMs, in that
order. Wait for the VMs 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
Workstation (adminws) system to open the host terminal window for each cluster node and a
master console window.
Task 1: Install and Configure 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
2. Verify the grace_period property of the NFS protocol.
$ sharectl get -p grace_period nfs
grace_period=90
3. Lower the value of the grace_period property of the NFS protocol.
$ sharectl set -p grace_period=10 nfs
$ sharectl get -p grace_period nfs
grace_period=10
Note: Lowering the grace period speeds up switchovers and failovers of the HA for NFS
resource. Oracle Solaris 11.3 OS uses NFS Version 4 by default. This is a stateful protocol,
which intentionally delays resumption of NFS activity so that clients have a chance to
reclaim their state any time that the server is recovering, which includes any cluster
switchover or failover. The grace_period property controls the length of the delay.
4. 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-nfs.
$ cat /etc/inet/hosts | grep cluster1-nfs
192.168.1.120 cluster1-nfs
5. Identify the node that is currently importing the nfspool ZFS storage pool, which you
created in the lesson titled “Configuring Volume Management with ZFS.”
$ zpool status
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
6. On the node identified in step 5, 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
nfspool/nfs 2.0G 31K 2.0G 1% /global/nfs
Oracle University and Global Academy For Training & Consulting use only
In the host terminal window of the cluster node identified in step 5
7. Create a directory within the /global/nfs file system for the HA for NFS resource to
maintain administrative information.
# cd /global/nfs
# mkdir SUNW.nfs
8. 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
9. Create the directory specified in the dfstab.nfs-res file.
# cd /global/nfs
# mkdir data
# touch data/sample.file
# chmod 777 data
# cd
10. Exit the root role.
Note: You change the mode of the data directory only for the purpose of demonstration. In
this practice, you would be more specific about the share options in the dfstab.nfs-res
file.
Task 2: Register and Configure the Oracle 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
Resource Type Node List
------------- ---------
SUNW.LogicalHostname:5 <All>
SUNW.SharedAddress:3 <All>
SUNW.nfs:3.3 <All>
SUNW.HAStoragePlus:11 <All>
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
clrslh: Failed to retrieve netmask for the given hostname(s)/IP(s). Will try
again when the resource being brought online.
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
6. Create the SUNW.nfs resource and set the value of Resource_dependencies to nfs-
stor resource.
$ clrs create -t SUNW.nfs -g nfs-rg -p Resource_dependencies=nfs-stor nfs-res
7. Verify that the data service is online.
$ clrs list –v
Resource Name Resource Type Resource Group
------------- ------------- --------------
nfs-res SUNW.nfs:3.3 nfs-rg
nfs-stor SUNW.HAStoragePlus:11 nfs-rg
cluster1-nfs SUNW.LogicalHostname:5 nfs-rg
$ clrs status
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
oracle1@adminws:~$ ls /net/cluster1-nfs/global/nfs/data
sample.file
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
3. View the $HOME/test.nfs script content.
oracle1@adminws:~$ cat test.nfs
#!/bin/ksh
cd /net/cluster1-nfs/global/nfs/data
while :
do
date > date.out
cat date.out
rm date.out
sleep 1
done
oracle1@adminws:~$
Note: When you run the test.nfs script in the next task, it creates and writes a file
containing a timestamp to the NFS-mounted cluster file system. The script also displays 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 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
$ clrg switch -n dest-node nfs-rg
Substitute the name of your offline node for dest-node.
On the Administrative Workstation:
4. Observe the messages displayed by the test.nfs script.
For example:
oracle1@adminws:~$ ./test.nfs
Thursday, August 19, 2015 07:00:56 AM UTC
Thursday, August 19, 2015 07:00:57 AM UTC
Thursday, August 19, 2015 07:00:58 AM UTC
Thursday, August 19, 2015 07:00:59 AM UTC
Thursday, August 19, 2015 07:01:00 AM UTC
Thursday, August 19, 2015 07:01:01 AM UTC
Thursday, August 19, 2015 07:01:02 AM UTC
Thursday, August 19, 2015 07:01:03 AM UTC
Thursday, August 19, 2015 07:01:04 AM UTC
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 7
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Task 5: Generate Cluster Failures and Observe the Behavior of the NFS Failover
Oracle University and Global Academy For Training & Consulting use only
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.
• Simulate the multiple public network failure on a single 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
Task 6: Make a Customized Application Fail Over with a Generic Data Service
Resource
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 as the root role:
1. On each cluster node, create a daemon that represents your customized application.
# vi /var/tmp/myappdaemon
#!/bin/ksh
while :
do
sleep 10
done
2. Make sure that the file is executable on all nodes.
3. From any one cluster node, create a new failover resource group for your application.
# clrg create –n clnode1,clnode2 myapp-rg
4. From one cluster node, register the Generic Data Service resource type.
# clrt register SUNW.gds
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
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Chapter 10 - Page 8
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
# pfexec kill -9 pid
# ps –ef | grep myappdaemon
$ clrs status
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 9
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Chapter 10 - Page 10
Practices for Lesson 10: Managing Data Services, Resource Groups, and HA-NFS
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 11:
Configuring Scalable
Services and Advanced
Resource Group
Relationships
Chapter 11
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you install and configure Apache web server as a scalable data service on the
Oracle Solaris Cluster software.
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you install and configure Apache as a scalable service on the Oracle Solaris
Cluster software.
Oracle University and Global Academy For Training & Consulting use only
In this practice, you perform the following tasks:
• Prepare for Apache data service configuration.
• Configure the Apache environment.
• Test the server on each node before configuring the data service resources.
• Register and configure the Apache data service.
• Verify the Apache web server access.
• Observe cluster failures.
• Configure advanced resource group relationships.
Preparation
Before proceeding with the tasks in this practice, start the Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation VMs, in that
order. Wait for the VMs 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
Workstation (adminws) system to open a master console window and the host terminal
window for each cluster node.
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
you reboot. Letting this script create it resolves the problem. Just add the line in bold as
the second line of the file.
#!/bin/sh
mkdir -p /var/run/apache2
b. Locate the line:
HTTPD='/usr/apache2/2.2/bin/httpd'
And change it to:
HTTPD='/usr/apache2/2.2/bin/httpd -f /global/web/conf/httpd.conf'
3. Copy the sample /etc/apache2/2.2/httpd.conf example file to the
/global/web/conf/httpd.conf file.
# mkdir /global/web/conf
# cp /etc/apache2/2.2/httpd.conf /global/web/conf/httpd.conf
4. Edit the /global/web/conf/httpd.conf file, and change the entries as shown in the
following table:
Old Entry New Entry
Listen 80 Listen cluster1-web:80
ServerName 127.0.0.1 ServerName cluster1-web
DocumentRoot "/var/apache2/2.2/htdocs" DocumentRoot "/global/web/htdocs"
<Directory "/var/apache2/2.2/htdocs"> <Directory "/global/web/htdocs">
ScriptAlias /cgi-bin/ ScriptAlias /cgi-bin/ "/global/web/cgi-
"/var/apache2/2.2/cgi-bin/" bin/"
<Directory "/var/apache2/2.2/cgi-bin"> <Directory "/global/web/cgi-bin">
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
6. Copy the test-apache.cgi file from the classroom server to /global/web/cgi-bin.
# cp /opt/ora/lab/test-apache.cgi /global/web/cgi-bin/
You use the test-apache.cgi file to test the scalable service.
7. Make sure that test-apache.cgi can be executed by all users.
# chmod 755 /global/web/cgi-bin/test-apache.cgi
8. Exit the root role.
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Task 3: Test the Server on Each Node Before Configuring the Data Service
Resources
Perform the following steps on both the cluster nodes, 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
Oracle University and Global Academy For Training & Consulting use only
3. Start the server (on that node).
# /global/web/bin/apachectl start
4. Verify that the server is running.
clnode1:/# ps –ef | grep apache2
webservd 4604 4601 0 10:20:05 ? 0:00 /usr/apache2/2.2/bin/httpd
-f /global/web/conf/httpd.conf -k start
webservd 4603 4601 0 10:20:05 ? 0:00 /usr/apache2/2.2/bin/httpd
-f /global/web/conf/httpd.conf -k start
webservd 4605 4601 0 10:20:05 ? 0:00 /usr/apache2/2.2/bin/httpd
-f /global/web/conf/httpd.conf -k start
root 4601 1 0 10:20:04 ? 0:01 /usr/apache2/2.2/bin/httpd
-f /global/web/conf/httpd.conf -k start
webservd 4606 4601 0 10:20:05 ? 0:00 /usr/apache2/2.2/bin/httpd
-f /global/web/conf/httpd.conf -k start
webservd 4602 4601 0 10:20:05 ? 0:00 /usr/apache2/2.2/bin/httpd
-f /global/web/conf/httpd.conf -k start
5. Connect to the Apache web server from the web browser on your Administrative
Workstation by using the following URL:
http://cluster1-web/
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
4. Add the SharedAddress logical host name resource to the resource group.
$ clrssa create -g sa-rg cluster1-web
Oracle University and Global Academy For Training & Consulting use only
5. Bring the failover resource group online.
$ clrg online -M sa-rg
6. Create a scalable resource group to run on all nodes of the cluster. (The example assumes
two nodes.)
$ clrg create -S -n clnode1,clnode2 web-rg
7. Add a storage resource to the scalable group.
$ clrs create -g web-rg -t SUNW.HAStoragePlus \
-p FilesystemMountPoints=/global/web -p AffinityOn=true web-stor
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 \
apache-res
9. Bring the scalable resource group online.
$ clrg online -M web-rg
10. Verify that the data service is online.
$ clrg status
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
clnode2 Offline Offline
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 7
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
5. Switch myapp-rg to any cluster node where Apache is running. Observe what happens to
the Apache data service. Also, observe the console messages.
$ clrg status web-rg
$ clrg status
…
=== Cluster Resource Groups ===
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 8
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
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
(C258827) NOTICE: Resource group(s) {web-rg on node clnode2} were either
switched to different nodes or brought offline as a result of their strong
resource group affinities for resource group myapp-rg.
$ clrg status
Oracle University and Global Academy For Training & Consulting use only
=== Cluster Resource Groups ===
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
9. Print out the value of Nodelist for myapp-rg.
$ clrg show -p Nodelist myapp-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
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 9
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
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
Oracle University and Global Academy For Training & Consulting use only
online.
$ clrg status
$ clrg status
$ clrg status
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 10
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
16. Switch the target group nfs-rg. Note what happens.
$ clrg switch -n othernode nfs-rg
(C258827) NOTICE: Resource group(s) {myapp-rg on node clnode2} were either
switched to different nodes or brought offline as a result of their strong
resource group affinities for resource group nfs-rg.
$ clrg status
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Chapter 11 - Page 11
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Chapter 11 - Page 12
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 11: Configuring Scalable Services and Advanced Resource Group Relationships
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 12:
Configuring Oracle Solaris
Zones in Oracle Solaris
Cluster
Chapter 12
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you perform the following tasks:
• Create a zone cluster and recreate your scalable web application within the zone
cluster.
Oracle University and Global Academy For Training & Consulting use only
• Import an installed zone into an existing zone cluster.
• 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.
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you create a zone cluster and recreate your scalable web application within the
zone cluster.
Preparation
Oracle University and Global Academy For Training & Consulting use only
Before proceeding with the tasks in this practice, start Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation VMs, one after
the other. Wait for the VMs 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
Workstation (adminws) system to open the host terminal window for each cluster node and
the master console window.
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
clzc:myzc:node> end
clzc:myzc> commit
clzc:myzc> exit
3. Verify the zone cluster configuration.
# clzc verify myzc
Oracle University and Global Academy For Training & Consulting use only
Task 3: Install the Zone Cluster (On any one of the cluster nodes)
Perform the following steps on the specified cluster node to install a zone cluster:
1. Log in to any one cluster node as the root role.
2. Install the zone cluster myzc by using the clzc install command.
The -v option shows the output of the underlying zoneadm command on the console of
each cluster node:
# clzc status myzc
=== Zone Clusters ===
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode1 zcnode1 Offline Configured
clnode2 zcnode2 Offline Configured
// zoneadm output for installation appears on the physical node consoles only
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode1 zcnode1 Offline Installed
clnode2 zcnode2 Offline Installed
Note: The zone cluster installation could take anywhere from 30 to 45 minutes.
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode1 zcnode1 Offline Running
Oracle University and Global Academy For Training & Consulting use only
clnode2 zcnode2 Offline Running
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
# clrs status
# clrt list –v
6. Exit from the zone console by using the ~. or ~~. key combinations.
Task 6: Explore the Zone Cluster from the Global Zone Point of View
Perform the following steps on the global cluster node:
Oracle University and Global Academy For Training & Consulting use only
1. Ensure that you are logged as the oracle1 user on the global cluster node, not the zone
cluster node.
2. Explore various cluster resource and resource group status options:
$ clnode status
$ clnode status -Z myzc
$ clnode status -Z all
$ 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: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you import the installed zone (zone1) into an existing zone cluster (myzc).
Oracle University and Global Academy For Training & Consulting use only
Task 1: Removing a Zone from a Zone Cluster
Perform the following steps to remove the clnode1 cluster node from a zone cluster in an
organized fashion:
Perform the following steps on the specified cluster node to remove the zone cluster:
1. Assume the root role on the clnode1 cluster node.
2. Verify the status of the myzc zone cluster.
root@clnode1:~# clzc status myzc
=== Zone Clusters ===
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode1 zcnode1 Online Running
clnode2 zcnode2 Online Running
3. Shut down the zone-cluster node you want to remove by specifying the node and its zone
cluster.
root@clnode1:~# clzc halt -n clnode1 myzc
Waiting for zone halt commands to complete on all the nodes of the zone
cluster "myzc"...
root@clnode1:~# clzc status myzc
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode1 zcnode1 Offline Installed
clnode2 zcnode2 Online Running
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 7
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
--- Zone Cluster Status ---
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode1 zcnode1 Offline Configured
clnode2 zcnode2 Online Running
5. Remove the zone-cluster node from configuration and verify the status of the myzc zone
cluster.
root@clnode1:~# clzc configure myzc
clzc:myzc> remove node physical-host=clnode1
clzc:myzc> info
zonename: myzc
zonepath: /zones/myzc
autoboot: true
hostid:
brand: solaris
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
enable_priv_net: true
attr:
name: cluster
type: boolean
value: true
node:
physical-host: clnode2
hostname: zcnode2
net:
address: zcnode2
physical: sc_ipmp0
defrouter not specified
allowed-address not specified
configure-allowed-address not specified
clzc:myzc> exit
root@clnode1:~#
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 8
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
6. Verify that the node was removed from the zone cluster.
root@clnode1:~# clzc status myzc
=== Zone Clusters ===
Oracle University and Global Academy For Training & Consulting use only
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode2 zcnode2 Online Running
root@clnode1:~#
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 9
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
5. Verify that the zonepath of the zone and the zone cluster are the same.
a. Verify the zonepath of the zone1 zone.
clnode1:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 installed /zones/zone1 solaris shared
Oracle University and Global Academy For Training & Consulting use only
b. Verify the zonepath of the myzc zone cluster.
# clzc show -v myzc | grep zonepath
zonepath: /zones/myzc
or
# zonecfg –z myzc info | grep zonepath
zonepath: /zones/myzc
c. Move the zonepath of the zone1 zone if it is different from the myzc zone cluster.
From the above output, you can observe that the zonepath of zone1 and myzc are
different.
root@clnode1:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 installed /zones/zone1 solaris shared
root@clnode1:~# zoneadm -z zone1 move /zones/myzc
root@clnode1:~# zoneadm list -cv
ID NAME STATUS PATH BRAND IP
0 global running / solaris shared
- zone1 installed /zones/myzc solaris shared
root@clnode1:~#
6. Run the clzonecluster configure command on a configured zone cluster to import
the zone1 zone.
root@clnode1:~# clzc configure myzc
clzc:myzc> add node
clzc:myzc:node> set physical-host=clnode1
clzc:myzc:node> import-zone zonename=zone1
This operation renames the zone: zone1 to the zone-cluster's name: myzc. Do
you want to proceed ([y]/n)? y
Validating the resources and properties...
Extracting Zone Configuration data ...
Importing zone configuration into the zone cluster....
clzc:myzc:node> set hostname=zcnode1
clzc:myzc:node> add net
clzc:myzc:node:net> set address=zcnode1
clzc:myzc:node:net> set physical=sc_ipmp0
clzc:myzc:node:net> end
clzc:myzc:node> end
clzc:myzc> commit
Renaming the zone:zone1 to myzc...
clzc:myzc> exit
root@clnode1:~#
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 10
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode2 zcnode2 Online Running
Oracle University and Global Academy For Training & Consulting use only
clnode1 zcnode1 Offline Installed
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode2 zcnode2 online Running
clnode1 zcnode1 Offline Running
root@clnode1:~#
7. Install the cluster packages on zcnode1.
root@clnode1:~# clzc install-cluster -n clnode1 myzc
Installing the cluster packages in zone cluster "myzc" ...
root@clnode1:~# clzc status myzc
Name Brand Node Name Zone Host Name Status Zone Status
---- ----- --------- -------------- ------ -----------
myzc solaris clnode2 zcnode2 Online Running
clnode1 zcnode1 Online Running
root@clnode1:~#
Now, you have successfully imported the zone1 zone into an existing zone cluster
(myzc).
8. Change the hostname from zone1 to zcnode1.
Note: It is not required to change the hostname of zone1. However, you must change the
hostname so that other practices are functional.
root@clnode1# zlogin myzc
root@zone1# svccfg -s system/identity:node setprop config/nodename="zcnode1"
root@zone1# svccfg -s system/identity:node setprop config/loopback="zcnode1"
root@zone1# svccfg -s system/identity:node refresh
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 11
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
root@zone1# exit
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 12
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
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
Oracle University and Global Academy For Training & Consulting use only
Before proceeding with the tasks in this practice, start Sun_ZFS_Storage_7000,
Cluster_Node_1, Cluster_Node_2, and Administrative Workstation VMs, one after
the other. Wait for the VMs 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
Workstation (adminws) system to open the host terminal window for each cluster node and
the master console window.
Task 1: Delete the Scalable Apache Data Service from the Global Cluster
Perform the following steps on a global cluster node:
1. Ensure that you are logged in as the oracle1 user on the global cluster node.
2. From any node of the global cluster (logged into the physical node, not the zone), delete the
Apache resource groups and all their contained resources.
$ clrg delete -F web-rg
$ clrg delete -F sa-rg
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 13
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
hostid: <NULL>
bootargs: <NULL>
pool: <NULL>
limitpriv: <NULL>
scheduling-class: <NULL>
ip-type: shared
enable_priv_net: TRUE
resource_security: SECURE
Resource Name: fs
dir: /zonecfs/web-lofs
special: /global/web
raw:
type: lofs
options: []
cluster-control: false
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 14
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
3. Assume the root role and log in to the myzc zone.
# zlogin myzc
4. Create the /zonecfs/web-lofs directory on both the zone cluster nodes.
# mkdir –p /zonecfs/web-lofs
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: Configure 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
2. Edit the HTTPD entry in the /zonecfs/web-lofs/bin/apachectl script:
HTTPD='/usr/apache2/2.2/bin/httpd -f /global/web/conf/httpd.conf'
And change it to:
HTTPD='/usr/apache2/2.2/bin/httpd -f /zonecfs/web-lofs/conf/httpd.conf'
3. Edit the /zonecfs/web-lofs/conf/httpd.conf file, and change the entries as shown
in the following table:
Old Entry New Entry
Listen cluster1-web:80 Listen web-lofs-lh:80
ServerName cluster1-web ServerName web-lofs-lh
DocumentRoot "/global/web/htdocs" DocumentRoot "/zonecfs/web-lofs/htdocs"
<Directory "/global/web/htdocs"> <Directory "/zonecfs/web-lofs/htdocs">
ScriptAlias /cgi-bin/ /global/web/cgi- ScriptAlias /cgi-bin/ "/zonecfs/web-
bin/" [single line] lofs/cgi-bin/" [single line]
<Directory "/global/web/cgi-bin"> <Directory "/zonecfs/web-lofs/cgi-bin">
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 15
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Note: The changes mentioned in the preceding 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.
4. Exit the zone cluster node to return to the global cluster node.
5. Change the myzc zone cluster configuration to ensure that Oracle Solaris Cluster now
manages the loopback file system by setting the value of the cluster-control property
Oracle University and Global Academy For Training & Consulting use only
to true.
# clzc configure myzc
clzc:myzc> select fs dir=/zonecfs/web-lofs
clzc:myzc:fs> set cluster-control=true
clzc:myzc:fs> end
clzc:myzc> verify
clzc:myzc> commit
clzc:myzc> exit
# clzc show –v myzc
6. Reboot the myzc zone cluster.
# clzc reboot myzc
# clrt list -v
3. Create a scalable resource group containing the shared address.
# clrg create -n zcnode1,zcnode2 sa-rg
# clrssa create -g sa-rg web-lofs-lh
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 16
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
# clrs status
# clrs create -g web-rg -t SUNW.apache -p Bin_dir=/zonecfs/web-lofs/bin \
-p Scalable=true -p Resource_dependencies=web-lofs-lh,web-stor apache-res
# clrg status
# clrs status
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Chapter 12 - Page 17
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Chapter 12 - Page 18
Practices for Lesson 12: Configuring Oracle Solaris Zones in Oracle Solaris Cluster
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 13:
Exploring Oracle Solaris
Cluster Use Cases (Optional)
Chapter 13
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 1
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice Overview
In this practice, you perform the following tasks:
• Integrate Oracle Database 12c into Oracle Solaris Cluster software as a failover
application.
Oracle University and Global Academy For Training & Consulting use only
• Install and configure Oracle Solaris and Oracle Solaris Cluster software by using
Unified Archives (demonstration).
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 2
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Overview
In this practice, you integrate Oracle Database 12c into Oracle Solaris Cluster software as a
failover application.
Oracle University and Global Academy For Training & Consulting use only
In this practice, you complete the following tasks:
• Task 1: Create a logical IP entry in the /etc/inet/hosts file.
• Task 2: Create the oracle user and the required group accounts.
• Task 3: Set system parameters (on both nodes as the root role).
• Task 4: Create a shared storage file system (Solaris Volume Manager or ZFS pool).
• Task 5: Prepare the oracle user environment.
• Task 6: Copy the Oracle database files.
• Task 7: Install the required packages.
• Task 8: Disable Access Control of X Server on the Admin Workstation.
• Task 9: Run the runInstaller, netca, and dbca installation scripts.
• Task 10: Prepare an Oracle Instance for Cluster integration.
• Task 11: Register the resource types.
• Task 12: Create resources and resource groups for Oracle.
• Task 13: Verify that Oracle runs properly in the cluster.
Preparation
Oracle database installation is very time consuming and could take anywhere between 120 and
150 minutes. Therefore, to save time, you are given access to a new set of virtual machines
with preinstalled Oracle database using Oracle Solaris ZFS only (refer to Task 4 of this
practice).
Before proceeding with the tasks in this practice, perform the following steps:
1. Power off the following virtual machines:
• Administrative Workstation
• Sun_ZFS_Storage_7000
• Cluster_Node_1
• Cluster_Node_2
2. Reduce the memory of the Administrative Workstation VM.
a. Select the Administrative Workstation VM in VirtualBox Manager.
b. Click Settings->System.
c. Change the Base Memory to 1584 from 2560 MB.
d. Click OK.
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 3
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
3. Boot the following virtual machines in the given order, one after the other. Wait for the
virtual machines to boot properly until you see the login prompt.
• Administrative Workstation
• Sun_ZFS_Storage_7000_DB
• Cluster_Node_1_DB
•
Oracle University and Global Academy For Training & Consulting use only
Cluster_Node_2_DB
Task 1 to Task 9 of this practice are already performed for you to save time and to speed
up the practice. However, these tasks are documented here for your reference and you
just need to verify them before proceeding to the next step.
Note: You must verify the following steps:
• Task 4, Step 2c
• Task 8
You start integrating the Oracle database instance with the cluster from Task 10
onwards.
Task 2: Create the oracle user and the required group accounts
To create the oracle user and the dba and oinstall group accounts, perform the following
steps from within the master console window on the administrative workstation:
Note: This task is already performed for you.
4. Create the dba and oinstall accounts on both the cluster nodes.
# groupadd dba
# groupadd oinstall
5. Create the oracle user on both the cluster nodes.
# useradd -d /export/home/oracle -m -s /bin/bash -g dba \
-G oinstall oracle
80 blocks
6. Create the oracle user password on both the cluster nodes.
# passwd oracle
New Password: oracle1
Re-enter new Password: oracle1
passwd: password successfully changed for oracle
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 4
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
7. Provide administrative access to the oracle user by assuming the root role on both the
cluster nodes.
# usermod -R root oracle
# usermod -P +"System Administrator" oracle
8. Verify the administrative access provided for the oracle user on both the cluster nodes.
# su - oracle
Oracle University and Global Academy For Training & Consulting use only
Oracle Corporation SunOS 5.11 11.3 September 2015
oracle@clnode1:~$ roles
root
oracle@clnode1:~$ exit
Task 3: Set the system parameters (on both nodes as root role)
Perform the following steps from within the master console window on the administrative
workstation as the root role:
Note: This task is already performed for you.
1. Configure system kernel parameters for the oracle user.
# projmod -U oracle -K "project.max-shm-memory=(priv,6g,deny)" default
# projmod -sK "project.max-sem-nsems=(priv,512,deny)" default
# projmod -sK "project.max-sem-ids=(priv,128,deny)" default
# projmod -sK "project.max-shm-ids=(priv,128,deny)" default
2. Set the system swap space.
Oracle database installation requires swap space of up to 4 to 5 GB.
Increase the swap space to meet the Oracle database installation requirement:
# swap -lh
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 274,2 4K 1.0G 1.0G
# swap -d /dev/zvol/dsk/rpool/swap
# zfs volsize=5G rpool/swap
# swap -a /dev/zvol/dsk/rpool/swap
# swap -lh
swapfile dev swaplo blocks free
/dev/zvol/dsk/rpool/swap 274,2 4K 5.0G 5.0G
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 5
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
a. Verify that the metadb replicas are configured and operational on both the cluster
nodes.
root@clnode1:~# metadb
flags first blk block count
a u 16 8192 /dev/dsk/c1t0d0s6
a u 8208 8192 /dev/dsk/c1t0d0s6
Oracle University and Global Academy For Training & Consulting use only
a u 16400 8192 /dev/dsk/c1t0d0s6
root@clnode1:~#
b. Select a disk from shared storage. Make sure that you do not use any disks already in
use in existing device groups.
root@clnode1:~# cldev list -v
. . .
d7 clnode2:/dev/rdsk/c0t600144F0AE8319BA0000508E382B0010d0
d7 clnode1:/dev/rdsk/c0t600144F0AE8319BA0000508E382B0010d0
. . .
root@clnode1:~#
Note: For the purpose of this practice, select the d7 shared disk for the orads disk
set.
c. Create the orads disk set by using the shared disk identified in the previous step.
root@clnode1:~# metaset -s orads -a -h clnode1 clnode2
root@clnode1:~# metaset -s orads -a /dev/did/rdsk/d7
d. Create a soft partition (d200) of a mirror volume for Oracle. (Solaris Volume Manager
still calls it a mirror, although we only have one submirror. This gives us flexibility to
add the other half of the mirror at our leisure later.)
root@clnode1:~# metainit -s orads d21 1 1 /dev/did/rdsk/d7s0
orads/d21: Concat/Stripe is setup
root@clnode1:~# metainit -s orads d20 -m d21
orads/d20: Mirror is setup
root@clnode1:~# metainit -s orads d200 -p d20 9g
d200: Soft Partition is setup
e. Create a cluster file system.
root@clnode1:~# newfs /dev/md/orads/rdsk/d200
newfs: construct a new file system /dev/md/orads/rdsk/d100: (y/n)? y
…
f. Create a mount point and an entry in /etc/vfstab on all the nodes.
root@clnode1:~# mkdir /oracledb
root@clnode1:~# vi /etc/vfstab
. . .
/dev/md/orads/dsk/d200 /dev/md/orads/rdsk/d200 /oracledb ufs \
2 yes global
root@clnode1:~#
g. On the node on which you created the storage, mount the file system and modify its
ownership.
root@clnode1:~# mount /oracledb
root@clnode1:~# chown oracle:dba /oracledb
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 6
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
h. Verify that the file system is mounted and available on both the cluster nodes.
# mount | grep /oracledb
# ls /oracledb
lost+found
# df -kh | grep /oracledb
2. Create a shared storage file system for Oracle database files (ZFS).
Oracle University and Global Academy For Training & Consulting use only
Perform the following steps on any one node physically connected to the storage as root
role.
To simplify, we will create a ZFS storage pool with one disk. You can always add another
disk and mirror the existing disk later.
a. Select a disk from shared storage. Make sure that you do not use any disks already in
use in existing device groups.
# zpool status
# metaset
# cldev list -v
. . .
d7 clnode2:/dev/rdsk/c0t600144F0AE8319BA0000508E382B0010d0
d7 clnode1:/dev/rdsk/c0t600144F0AE8319BA0000508E382B0010d0
. . .
#
Note: For the purpose of this practice, select the d7 shared disk to create oraclepool.
b. Create a ZFS storage pool and a file system for Oracle. Verify that your file system is
mounted and change its permissions.
root@clnode1:~# zpool create oraclepool c0t600144F0AE8319BA0000508E382B0010d0
root@clnode1:~# zfs create -o mountpoint=/oracledb oraclepool/orafs
root@clnode1:~# df -h
root@clnode1:~# chown oracle:dba /oracledb
Note: You must perform this task.
c. Ensure that the status of oraclepool on clnode1 is online before you proceed to
Task 5.
root@clnode1:~# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
oraclepool 9.94G 6.69G 3.24G 67% 1.00x ONLINE -
rpool 44.8G 14.6G 30.2G 32% 1.00x ONLINE -
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 7
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Oracle Corporation SunOS 5.11 11.3 September 2015
oracle@clnode1:~$ pwd
/export/home/oracle
2. Edit the .profile file with the following entries:
oracle@clnode1:~$ vi .profile
...
export PATH=/usr/cluster/bin:/usr/cluster/man:/usr/bin:/usr/sbin
...
ORACLE_BASE=/oracledb
ORACLE_HOME=$ORACLE_BASE/12c/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
...
oracle@clnode1:~$ . .profile
oracle@clnode1:~$ exit
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 8
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
# pkg install SUNWmfrun
# pkg install xclock
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 9
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Username/Email Address Not Specified
dialog box.
b. Download Software Select Skip software updates and click
Updates Next.
c. Select Installation Option Select Install database software only
and click Next.
d. Grid Installation Option Select Single instance database
installation and click Next.
e. Product Languages Select English and click Next.
f. Database Edition Select Standard Edition One (5.8GB) and
click Next.
g. Installation Location Ensure Oracle Base is set as /oracledb.
Ensure Software Location is set as
/oracledb/12c/db_1 and click Next.
h. Create Inventory Change the inventory directory from
/oraInventory to
/oracledb/oraInventory by browsing and
click Next.
Click Yes to ignore the message in the [INS-
32055] The central Inventory is
located in the Oracle base dialog box,
and then click Next.
i. Operating System Groups Ensure dba is present in the Database
Administrator (OSDBA) Group and click Next.
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 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 10
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
m. Finish Click Close to complete the installation.
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 11
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Next.
10. Accept default values (Memory, Sizing, Character set, connection mode) and click
Next.
11. Select Create Database and click Next.
12. Verify Database summary on the Confirmation screen and click Finish.
13. Database Configuration Assistant (on clnode1) will start installation. After the
installation, click Close.
Note: Installation may take 30 to 45 minutes depending on the system configuration.
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 12
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
3. Test the new Oracle user account used by the fault monitor (as user oracle).
$ sqlplus sc_fm/sc_fm
SQL> select * from sys.v_$sysstat;
SQL> quit
4. Create a sample table. You can be creative about your data values.
$ sqlplus /nolog
Oracle University and Global Academy For Training & Consulting use only
SQL> connect / as sysdba
SQL> create table mytable (Name VARCHAR(20), age NUMBER(4));
SQL> insert into mytable values ('vincent', 14);
SQL> insert into mytable values ('theo', 24);
SQL> commit;
SQL> select * from mytable;
SQL> quit
Note: This sample table is created only for a quick verification that the database is running
properly.
5. Shut down the Oracle instance.
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 13
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
c. Modify the HOST variable to match the logical host name ora-lh.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-lh)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
Oracle University and Global Academy For Training & Consulting use only
)
)
8. Configure the tnsnames.ora file (as user oracle).
Modify the HOST variable to match the logical host name ora-lh of
$ORACLE_HOME/network/admin/tnsnames.ora.
oracle@clnode1:~$ vi /oracledb/12c/db_1/network/admin/tnsnames.ora
# tnsnames.ora Network Configuration File:
/oracledb/12c/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-lh)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora-lh)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
oracle@clnode1:~$
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 14
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
the step listed under the ZFS section.
For ZFS
# clrs create -g ora-rg -t HAStoragePlus -p Zpools=oraclepool ora-stor
For Solaris Volume Manager
# clrs create -g ora-rg -t HAStoragePlus \
-p FilesystemMountPoints=/oracledb \
-p AffinityOn=true ora-stor
4. Put the resource group online (required by the dependency specification in the next step).
# clrg online -M ora-rg
# clrg status ora-rg
5. Create an oracle_server resource.
# /usr/cluster/bin/clrs create -g ora-rg \
-t oracle_server \
-p Resource_dependencies=ora-stor \
-p ORACLE_SID=orcl -p ORACLE_HOME=/oracledb/12c/db_1 \
-p Alert_log_file=/oracledb/diag/rdbms/orcl/orcl/trace/alert_orcl.log \
-p Connect_string=sc_fm/sc_fm \
-p START_TIMEOUT=3600 \
ora-server-res
# clrs status ora-server-res
Note: This step might take up to 15 to 20 minutes. Ignore any validation errors/warning
messages that are displayed after performing this step.
6. Create an oracle_listener resource.
# clrs create -g ora-rg -t oracle_listener \
-p ORACLE_HOME=/oracledb/12c/db_1 \
-p Listener_name=LISTENER \
-p Resource_dependencies=ora-stor \
ora-listener-res
Note: Ignore any validation errors/warning messages displayed after performing this step.
7. Verify the application.
# clrg status
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 15
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
# clrs status
Oracle University and Global Academy For Training & Consulting use only
ora-listener-res clnode1 Online Online
clnode2 Offline Offline
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 16
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
root 4679 2507 0 04:44:00 ? 0:00 /usr/bin/ksh
/opt/SUNWscor/oracle_listener/bin/oracle_listener_monitor -R ora-l
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 17
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Practice 13-2: Install and Configure Oracle Solaris and Oracle Solaris
Cluster Software Using Unified Archives (Demonstration)
Overview
The Oracle Solaris Unified Archives support feature enables you to use the Automated Installer
(AI) server to install Oracle Solaris Cluster and Oracle Solaris on cluster nodes from Oracle
Oracle University and Global Academy For Training & Consulting use only
Solaris Unified Archives. Once an archive is created, you can store the archive as a file until it is
needed.
Note: Oracle Solaris Unified Archives are a new native archive type for Oracle Solaris. Unified
Archives allow multiple system instances to be archived in a single unified file format. Unified
Archives may contain one or more archived instances of Oracle Solaris OS from a single host.
An OS instance may be a global zone, a nonglobal zone, or a kernel zone. These individual
systems may be archived independently or bundled together.
In this demonstration, you will observe how to:
• Set up an Automated Installer (AI) server
• Create an Oracle Solaris unified archive file
• Start the scinstall utility to establish the cluster
• Register the client machines on AI server
• Deploy Oracle Solaris OS and Oracle Solaris Cluster to network clients
• Use the pconsole utility to display the Individual console screens
• Verify the cluster nodes
Assumptions
Adobe Flash Player is already installed on the host machine.
Task
Perform the following steps on your host machine:
1. On your host machine, open a terminal window.
2. Change to the /opt/ora/demo/UnifiedArchivesDemo directory.
# cd /opt/ora/demo/UnifiedArchivesDemo
# ls
UnifiedArchivesDemo.htm
UnifiedArchivesDemo.swf
standard.js
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 18
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Oracle University and Global Academy For Training & Consulting use only
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Chapter 13 - Page 19
THESE eKIT MATERIALS ARE FOR YOUR USE IN THIS CLASSROOM ONLY. COPYING eKIT MATERIALS FROM THIS COMPUTER IS STRICTLY PROHIBITED
Chapter 13 - Page 20
Practices for Lesson 13: Exploring Oracle Solaris Cluster Use Cases (Optional)
Copyright © 2016, Oracle and/or its affiliates. All rights reserved.
Oracle University and Global Academy For Training & Consulting use only