Using Serviceguard Extension for RAC, 7th Edition, September 2008
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:
1. First, set up the group directory for vg_ops:
# mkdir /dev/vg_ops
2. 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
0xhh0000
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:
# ls -l /dev/*/group
3. 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.
4. Use the following to create the volume group 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. Use SAM and select the Kernel Configuration
area, then choose Configurable Parameters. Maxvgs appears on the list.
Creating Logical Volumes for RAC on Disk Arrays
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 can be created during
the installation process.
Creating a Storage Infrastructure with LVM 47