Using High Availability Monitors (June 2003)
Monitoring Disk Resources
Rules for Using the HA Disk Monitor with ServiceGuard
Chapter 2 41
# mkdir /dev/vgdatabase
2. 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: 0x
hh
0000
where
hh
must be unique to the volume group you are creating. Use
an appropriate hexadecimal number that is available on your
system, after the volume groups are already configured. On a single
system, this might be the next hexadecimal number. On a cluster,
this number must be assigned cluster-wide, so it should be one of the
hexadecimal numbers used in the cluster. 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 the LVM (logical volume manager) as
a physical volume.
# pvcreate /dev/dsk/c0t15d0
It is only necessary to do this with one of the device file names for the
LUN.
4. Use the following commands to create the volume group itself with
the first link assigned to a physical volume group called bus1and the
second link assigned to a physical volume group called bus2:
# vgcreate -g bus1 /dev/vgdatabase /dev/dsk/c0t15d0
# vgextend -g bus2 /dev/vgdatabase /dev/dsk/c0t3d0
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.
Creating Logical Volumes
Use the following command to create logical volumes (the example is for
/dev/vgdatabase):
# lvcreate -L 120 -m 1 -s g /dev/vgdatabase
If you are using disk arrays in RAID 1 or RAID 5 mode, omit the -m 1
option.