 |
» |
|
|
 |
After installing software components, it is necessary to create
the appropriate logical volume infrastructure to support the use
of shared files within OPS. This is done by issuing Logical Volume
Manager commands. The procedure described in this section assumes
that you are using RAID-protected disk arrays and LVM's
physical volume links (PV links) to define redundant data paths
from each node in the cluster to every logical unit on the array. Creating Mirrors of Root Logical Volumes |  |
It is highly recommended that you use mirrored root volumes
on all cluster nodes. If you are using a disk array for your root
logical volumes, skip ahead to the section, "“Creating OPS Volume Groups on Disk
Arrays ”." If you are using a standalone root disk,
it should be mirrored as shown here. The following procedure assumes that you are using separate
boot and root volumes; you create a mirror of the boot volume (/dev/vg00/lvol1), root
volume (/dev/vg00/lvol3), and primary swap (/dev/vg00/lvol2). The procedure
cannot be carried out with SAM. In this example and in the following
commands, /dev/dsk/c4t5d0 is the primary disk and /dev/dsk/c4t6d0
is the mirror; be sure to use the correct device file names for
the root disks on your system. Create a bootable LVM disk to be used for the mirror. # pvcreate -B /dev/rdsk/c4t6d0 |
Add this disk to the current root volume group. # vgextend /dev/vg00 /dev/dsk/c4t6d0 |
Make the new disk a boot disk. # mkboot /dev/rdsk/c4t6d0 |
Copy the correct AUTO file into the new LIF area. # mkboot -a "hpux -l q (;0)/vmunix" /dev/rdsk/c4t6d0 |
Mirror the boot, root and primary swap logical volumes
to the new bootable disk. Ensure that all devices in vg00, such
as /usr, /swap, etc., are mirrored.  |  |  |  |  | NOTE: The boot logical volume (/dev/vg00/lvol1 by default) must be done first to ensure that it occupies the first
contiguous set of extents on the new disk. |  |  |  |  |
The following is an example of mirroring the boot logical
volume: # lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c4t6d0 |
The following is an example of mirroring the root logical
volume: # lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c4t6d0 |
The following is an example of mirroring the primary swap
logical volume: # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c4t6d0 |
Update the boot information contained in the BDRA
for the mirror copies of boot, root and primary swap. # /usr/sbin/lvlnboot -b /dev/vg00/lvol1
# /usr/sbin/lvlnboot -v -r /dev/vg00/lvol3
# /usr/sbin/lvlnboot -s /dev/vg00/lvol2
|
Check if the BDRA is correct. # /usr/sbin/lvlnboot -R /dev/vg00 |
Verify that the mirrors were properly created. The output of this command is shown in a display like the
following: Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c4t5d0 (10/0.5.0) Boot Disk
/dev/dsk/c4t6d0 (10/0.6.0) Boot Disk
Boot: lvol1 on: /dev/dsk/c4t5d0
/dev/dsk/c4t6d0
Root: lvol3 on: /dev/dsk/c4t5d0
/dev/dsk/c4t6d0
Swap: lvol2 on: /dev/dsk/c4t5d0
/dev/dsk/c4t6d0
Dump: lvol2 on: /dev/dsk/c4t6d0, 0
|
Creating OPS Volume Groups on Disk
Arrays |  |
On your disk arrays, you should use redundant I/O channels
from each node, connecting them to separate controllers on the array.
Then you can define alternate links to the LUNs or logical disks
you have defined on the array. If you are using SAM, choose the
type of disk array you wish to configure, and follow the menus to
define alternate links. If you are using LVM commands, specify the
links on the command line. The following example shows how to configure alternate links
using LVM commands. The following disk configuration is assumed:  |
8/0.15.0 /dev/dsk/c0t15d0 /* I/O Channel 0 (8/0) SCSI address 15 LUN 0 */
8/0.15.1 /dev/dsk/c0t15d1 /* I/O Channel 0 (8/0) SCSI address 15 LUN 1 */
8/0.15.2 /dev/dsk/c0t15d2 /* I/O Channel 0 (8/0) SCSI address 15 LUN 2 */
8/0.15.3 /dev/dsk/c0t15d3 /* I/O Channel 0 (8/0) SCSI address 15 LUN 3 */
8/0.15.4 /dev/dsk/c0t15d4 /* I/O Channel 0 (8/0) SCSI address 15 LUN 4 */
8/0.15.5 /dev/dsk/c0t15d5 /* I/O Channel 0 (8/0) SCSI address 15 LUN 5 */
10/0.3.0 /dev/dsk/c1t3d0 /* I/O Channel 1 (10/0) SCSI address 3 LUN 0 */
10/0.3.1 /dev/dsk/c1t3d1 /* I/O Channel 1 (10/0) SCSI address 3 LUN 1 */
10/0.3.2 /dev/dsk/c1t3d2 /* I/O Channel 1 (10/0) SCSI address 3 LUN 2 */
10/0.3.3 /dev/dsk/c1t3d3 /* I/O Channel 1 (10/0) SCSI address 3 LUN 3 */
10/0.3.4 /dev/dsk/c1t3d4 /* I/O Channel 1 (10/0) SCSI address 3 LUN 4 */
10/0.3.5 /dev/dsk/c1t3d5 /* I/O Channel 1 (10/0) SCSI address 3 LUN 5 */
|
 |
Assume that the disk array has been configured, and that both
the following device files appear for the same LUN (logical disk)
when you run the ioscan command: /dev/dsk/c0t15d0
/dev/dsk/c1t3d0 |
Use the following procedure to configure a volume group for
this logical disk: First, set up the group directory for vg_ops: Next, create a control file named group in the directory /dev/vg_ops, as follows: # mknod /dev/vg_ops/group c 64 0xhh0000 |
The major number is always 64, and the hexadecimal minor number has
the form where hh must be unique to the volume group you are creating.
Use the next hexadecimal number that is available on your system,
after the volume groups that are already configured. Use the following command
to display a list of existing volume groups: Use the pvcreate command on one of the device files associated
with the LUN to define the LUN to LVM as a physical volume. # pvcreate -f /dev/rdsk/c0t15d0 |
It is only necessary to do this with one of the device file names for the LUN. The -f option is only necessary if the physical volume
was previously used in some other volume group. Use the following command to create the volume group
itself with the two links: # vgcreate /dev/vg_ops /dev/dsk/c0t15d0 /dev/dsk c1t3d0 |
LVM will now recognize the I/O channel represented by /dev/dsk/c0t15d0 as
the primary link to the disk; if the primary link fails, LVM will automatically
switch to the alternate I/O channel represented by /dev/dsk/c1t3d0.
Use the vgextend command to add additional disks to the volume
group, specifying the appropriate physical volume name for each
PV link. Repeat the entire procedure for each distinct volume group
you wish to create. For ease of system administration, you may wish
to use different volume groups to separate logs from data and control
files.  |  |  |  |  | NOTE: The default maximum number of volume groups in HP-UX
is 10. If you intend to create enough new volume groups that the
total exceeds ten, you must increase the maxvgs system parameter and then re-build the HP-UX kernel.
In SAM, select the Kernel Configuration Area, then choose "Configurable
Parameters." Maxvgs appears on the list. |  |  |  |  |
Creating Logical Volumes for OPS |  |
After you create volume groups and add PV links to them, you
define logical volumes for data, logs, and control files. The following
are some examples: # lvcreate -n ops1log1.log -L 4 /dev/vg_ops
# lvcreate -n opsctl1.ctl -L 4 /dev/vg_ops
# lvcreate -n system.dbf -L 28 /dev/vg_ops
# lvcreate -n opsdata1.dbf -L 1000 /dev/vg_ops |
Oracle Demo Database Files |  |
The following set of files is required for the Oracle demo
database which you can create during the installation process. Table 5-1 Required Oracle File Names for Demo Database Logical Volume Name | LV Size (MB) | Raw Logical Volume Path Name | Oracle File Size (MB)* |
|---|
opsctl1.ctl | 4 | /dev/vg_ops/ropsctl1.ctl | 1 | opsctl2.ctl | 4 | /dev/vg_ops/ropsctl2.ctl | 1 | opsctl3.ctl | 4 | /dev/vg_ops/ropsctl3.ctl | 1 | system.dbf | 80 | /dev/vg_ops/rsystem.dbf | 25 | ops1log1.log | 4 | /dev/vg_ops/rops1log1.log | 1 | ops1log2.log | 4 | /dev/vg_ops/rops1log2.log | 1 | ops1log3.log | 4 | /dev/vg_ops/rops1log3.log | 1 | rollback.dbf | 15 | /dev/vg_ops/rrollback.dbf | 4 | temp.dbf | 4 | /dev/vg_ops/rtemp.dbf | 1 | users.dbf | 4 | /dev/vg_ops/rusers.dbf | 1 | tools.dbf | 25 | /dev/vg_ops/rtools.dbf | 15 | ops2log1.log | 4 | /dev/vg_ops/rops2log1.log | 1 | ops2log2.log | 4 | /dev/vg_ops/rops2log2.log | 1 | ops2log3.log | 4 | /dev/vg_ops/rops2log3.log | 1 | ops3log1.log | 4 | /dev/vg_ops/rops2log1.log | 1 | ops3log2.log | 4 | /dev/vg_ops/rops2log2.log | 1 | ops3log3.log | 4 | /dev/vg_ops/rops2log3.log | 1 | opsdata1.dbf | | /dev/vg_ops/ropsdata1.dbf | | opsdata2.dbf | | /dev/vg_ops/ropsdata2.dbf | | opsdata3.dbf | | /dev/vg_ops/ropsdata3.dbf | |
* The size of the logical volume
is larger than the Oracle file size because Oracle needs extra space
to allocate a header in addition to the file's actual data capacity. Create these files if you wish to build the demo database.
The three logical volumes at the bottom of the table are included
as additional data files, which you can create as needed, supplying
the appropriate sizes. If your naming conventions require, you can
include the Oracle SID and/or the database name to distinguish files
for different instances and different databases. If you are using
the ORACLE_BASE directory structure, create symbolic links to
the ORACLE_BASE files from the appropriate directory. Example: # ln -s /dev/vg_ops/ropsctl1.ctl /u01/ORACLE/db001/ctrl01_1.ctl |
(For more information about Oracle directories, refer to the Oracle
Server for HP 9000 Installation and Configuration Guide.) After creating these files, set the owner to oracle and the group to dba with a file mode of 660. The logical volumes are
now available on the primary node, and the raw logical volume names
can now be used by the Oracle DBA. Displaying the Logical Volume Infrastructure |  |
To display the volume group, use the vgdisplay command: # vgdisplay -v /dev/vg_ops |
Exporting the Logical Volume Infrastructure |  |
Before the OPS volume groups can be shared, their configuration
data must be exported to other nodes in the cluster. This is done
either in SAM or by using HP-UX commands, as shown in the following
sections.  |  |  |  |  | NOTE: A volume group using an HP High Availability Disk Array
cannot be designated as a cluster lock volume group. You will need
to use another volume group containing an independent disk for the
cluster lock. |  |  |  |  |
Exporting with LVM Commands Use the following commands to set up the same volume group
on another cluster node. In this example, the commands set up a
new volume group on a system known as ftsys10. This volume group will hold the same physical
volume that was created on a configuration node known as ftsys9. To set up the volume group on ftsys10 (and other nodes), use the following steps: On ftsys9, copy the mapping of the volume group to a specified
file. # vgexport -s -p -m /tmp/vg_ops.map /dev/vg_ops |
Still on ftsys9, copy the map file to ftsys10 (and
to additional nodes as necessary.) # rcp /tmp/vg_ops.map ftsys10:/tmp/vg_ops.map |
On ftsys10 (and other nodes, as necessary), create
the volume group directory and the control file named group: # mkdir /dev/vg_ops
# mknod /dev/vg_ops/group c 64 0xhh0000 |
For the group file, the major number is always 64, and the hexadecimal
minor number has the form where hh must be unique to the volume group you are creating.
If possible, use the same number as on ftsys9. Use the following command
to display a list of existing volume groups: Import the volume group data using the map file
from node ftsys9. On node ftsys10 (and other nodes, as necessary),
enter: # vgimport -s -m /tmp/vg_ops.map /dev/vg_ops \
/dev/dsk/c3t12d0 /dev/dsk/c4t3d0
|
 |  |  |  |  | CAUTION: Special care should be used when importing volume
groups that use PV links with the A3231A (Model 10) and A3232A (Model
20) disk arrays. On these arrays, each disk device file name represents
a link to a disk through a separate controller, and all primary
links must use the same controller. Even though the device file
names may be different on different nodes, it is very important
to specify the PV links in the vgimport command in the same controller order on all nodes that they were specified in creating the volume group
on the configuration node. Failure to do this with PV links will
result in poor performance. |  |  |  |  |
Creating Volume Groups for Packages |  |
If you are creating packages, you must configure separate
volume groups that can be activated each time the package starts
up on a particular node. Packages activate volume groups in exclusive
mode rather than shared mode, which is used for OPS volume groups.
Another difference is that with package volume groups, you can define
file systems that are mounted when the package starts up. By contrast,
OPS data is stored on raw logical volumes, which do not use mounted
file systems. Creating Package Volume Groups on Disk ArraysYou create volume groups for packages in the same way you
create volume groups for use by OPS, using the same LVM commands.
The following example creates a volume group that uses PV links /dev/dsk/c5t2d0
and /dev/dsk/c6t2d0 representing a LUN on a disk array for use by
a package. The example shows all the commands, including the commands
to create a file system to be mounted on /mnt1: On the configuration node, create physical volumes from the
disks: # pvcreate -f /dev/rdsk/c5t2d0
|
You only need to use the pvcreate command on one PV link. Use the following commands to create a volume group
called vg_pkg1: # mkdir /dev/vg_pkg1
# mknod /dev/vg_pkg1/group c 64 0xhh0000 |
Replace the minor number hh with the next available hexadecimal minor group number
available on your system. Create the volume group with two PV links for the
disk: # vgcreate /dev/vg_pkg1 /dev/dsk/c5t2d0 /dev/dsk/c6t2d0
|
Repeat this procedure for additional volume groups. Create a logical volume named lvol1 with 12 MB: # lvcreate -L 12 /dev/vg_pkg1 |
To display the volume group, use the vgdisplay command: # vgdisplay -v /dev/vg_pkg1 |
Create a file system on the logical volume and mount
it on /mnt1. # mkdir /mnt1
# newfs -F vxfs /dev/vg_pkg1/rlvol1
# mount /dev/vg_pkg1/lvol1 /mnt1 |
Repeat this process for any other volume groups
you need to create. Before setting up the volume group for use on other
nodes, you must first unmount any file systems that reside on the
volume group, then deactivate it. At run time, volume group activation
and file system mounting are done through the package control script. # umount /mnt1
# vgchange -a n /dev/vg_pkg1 |
Creating Package Volume Groups with Mirrored Individual
Data Disks |  |  |  |  | NOTE: The procedure described in this section is for use only
with application packages, not with OPS instances
and not with OPS data. Software mirroring is
not supported for OPS data. |  |  |  |  |
Using SAM to Create Volume Groups and Logical VolumesYou can use SAM to prepare the volume group and logical volume
structure needed for HA packages. In SAM, choose the "Disks
and File Systems Area." Then use the following procedure
for each volume group and file system you are using with the package: Select the Volume Groups subarea. From the Actions menu, choose Create or Extend. Choose the first physical disk you wish to use in
the volume group by selecting it from the list of available disks. Enter the volume group name, e.g., vgdatabase. Choose Create or Extend Volume Group. Choose Add New Logical Volumes. Specify the file system that is to be mounted on
the volume group, for example, /mnt1. Repeat the procedure for additional volume groups,
logical volumes, and file systems.
Skip ahead to the section "“Distributing the Package Volume Group
to Other Nodes”". Using LVM Commands to Create Volume Groups and Logical Volumes You can use LVM commands to create volume groups for packages
on mirrored disks. Use the procedures in this section. Selecting Disks for the Volume GroupObtain a list of the disks on both nodes and identify which
device files are used for the same disk on both. Use the following
command on each node to list available disks as they are known to
each system: In the following examples, we use /dev/rdsk/c1t2d0 and /dev/rdsk/c0t2d0,
which happen to be the device names for the same disks on both ftsys9 and ftsys10. In the event that the device file names are different
on the different nodes, make a careful note of the correspondences. Creating Physical VolumesOn the configuration node (ftsys9), use the pvcreate command to define disks as physical volumes. This
only needs to be done on the configuration node. Use the following
commands to create two physical volumes for the sample configuration: # pvcreate -f /dev/rdsk/c1t2d0
# pvcreate -f /dev/rdsk/c0t2d0 |
Use the following steps to build a volume group on the configuration
node (ftsys9). Later, the same volume group will be created on other
nodes. First, set up the group directory for vgdatabase: Next, create a control file named group in the directory /dev/vgdatabase, as follows: # mknod /dev/vgdatabase/group c 64 0xhh0000 |
The major number is always 64, and the hexadecimal minor number
has the form where hh must be unique to the volume group you are creating.
Use the next hexadecimal number that is available on your system,
after the volume groups that are already configured. Use the following
command to display a list of existing volume groups: Create the volume group and add physical volumes
to it with the following commands: # vgcreate /dev/vgdatabase /dev/dsk/c1t2d0
# vgextend /dev/vgdatabase /dev/dsk/c0t2d0 |
The first command creates the volume group and adds a physical
volume to it. The second command adds the second physical volume
to the volume group. Repeat this procedure for additional volume groups.
If your installation uses file systems, create them next.
Use the following commands to create a file system for mounting
on the logical volume just created: Create the file system on the newly created logical volume: # newfs -F vxfs /dev/vgdatabase/rlvol1 |
Note the use of the raw device file for the logical volume. Create a directory to mount the disk: Mount the disk to verify your work: # mount /dev/vgdatabase/lvol1 /mnt1 |
Note the mount command uses the block device file for the logical volume. Verify the configuration: # vgdisplay -v /dev/vgdatabase |
Distributing the Package Volume Group
to Other NodesAfter creating volume groups for cluster data, you must make
them available to any cluster node that will need to activate the
volume group. Distributing the Package Volume Group to Other Cluster
Nodes with SAMIn SAM, choose the Disks and File Systems area, then choose
Volume Groups. Select the volume group that is to be distributed to
one or more additional nodes. Enter the name of each node that is
to receive the volume group and select "Add." When
the list is complete, press OK. SAM automatically configures the
volume group for use on the other nodes. After distributing the volume groups, check the /etc/lvmpvg
files on each node to ensure that each physical volume group contains
the correct physical volume names for that node. Distributing the Package Volume Group to Other Cluster
Nodes with LVM CommandsUse the following commands to set up the same volume group
on another cluster node. In this example, the commands set up a
new volume group on ftsys10 which will hold the same physical volume that was
available on ftsys9. You must carry out the same procedure separately
for each node on which the volume group's package can run. To set up the volume group on ftsys10, use the following steps: On ftsys9, copy the mapping of the volume group to a specified
file. # vgexport -p -s -m /tmp/vgdatabase.map /dev/vgdatabase |
Still on ftsys9, copy the map file to ftsys10: # rcp /tmp/vgdatabase.map ftsys10:/tmp/vgdatabase.map |
On ftsys10, create the volume group directory: Still on ftsys10, create a control file named group in the directory /dev/vgdatabase, as follows: # mknod /dev/vgdatabase/group c 64 0xhh0000 |
The major number is always 64, and the hexadecimal minor number has
the form where hh must be unique to the volume group you are creating.
If possible, use the same number as on ftsys9. Use the following command to display a list of existing
volume groups: Import the volume group data using the map file
from node ftsys9. On node fsys10, enter: # vgimport -s -m /tmp/vgdatabase.map /dev/vgdatabase |
Note that the disk device names on ftsys10 may be different
from their names on ftsys9. You should check to ensure that the
physical volume names are correct throughout the cluster. Enable the volume group on ftsys10: # vgchange -a y /dev/vgdatabase |
Create a directory to mount the disk: Mount and verify the volume group on ftsys10: # mount /dev/vgdatabase/lvol1 /mnt1 |
Unmount the volume group on ftsys10: Deactivate the volume group on ftsys10: # vgchange -a n /dev/vgdatabase |
Creating Additional Volume Groups The preceding sections show in general how to create volume
groups and logical volumes for use with MC/LockManager. Repeat the procedure
for as many volume groups as you need to create, substituting other
volume group names, logical volume names, and physical volume names.
|