Support of Oracle RAC ASM with SGeRAC, January 2008

HP Availability Clusters Solutions Lab 1/25/2008 Page 14
Sample Command Sequence for Configuring SLVM Volume Groups
In this section, we provide an example of a command sequence that can be used to prepare SLVM
Logical Volumes for use by ASM. The example below demonstrates how volume group is created
using new DSF format. HP-UX will automatically use the redundant path for the volume group in the
background.
The scenario for our example is that we are preparing a new volume group named vgora_asm. The
physical path for the first PV is /dev/rdisk/disk1 and the second PV is /dev/rdisk/disk2.
1. Create the volume group with the two PVs (choosing hh to be the next hexadecimal number that is
available on the system, after the volume groups that are already configured):
# pvcreate -f /dev/rdisk/disk1
# pvcreate -f /dev/rdisk/disk2
# mkdir /dev/vgora_asm
# mknod /dev/vgora_asm/group c 64 0xhh0000
# vgcreate /dev/vgora_asm /dev/disk/disk1
# vgextend /dev/vgora_asm /dev/disk/disk2
2. For each of the two PVs, create a corresponding LV
Create an LV of zero length
Mark the LV as contiguous
Extend each LV to the maximum size possible on that PV (the number of extents
available in a PV can be determined via vgdisplay -v <vgname>)
Configure LV timeouts, based on the PV timeout and number of physical paths, as
described in the previous section. If a PV timeout has been explicitly set, its value can
be displayed via pvdisplay -v. If not, pvdisplay will show a value of default, indicating
that the timeout is determined by the underlying disk driver. For SCSI, in HP-UX 11i v3,
the default timeout is 30 seconds.
Null out the initial part of each LV to ensure ASM accepts the LV as an ASM disk group
member.
5
Note that we are zeroing out the LV data area, not its metadata. It is the
ASM metadata that is being cleared.
# lvcreate -n lvol1 vgora_asm
# lvcreate -n lvol2 vgora_asm
# lvchange -C y /dev/vgora_asm/lvol1
# lvchange -C y /dev/vgora_asm/lvol2
# Assume vgdisplay shows each PV has 2900 extents in our example
# lvextend -l 2900 /dev/vgora_asm/lvol1 /dev/disk/disk1
# lvextend -l 2900 /dev/vgora_asm/lvol2 /dev/disk/disk2
# Assume a PV timeout of 30 seconds.
# There are 2 paths to each PV, so the LV timeout value is 60 seconds
# lvchange -t 60 /dev/vgora_asm/lvol1
# lvchange -t 60 /dev/vgora_asm/lvol2
# dd if=/dev/zero of=/dev/vgora_asm/rlvol1 bs=8192 count=12800
# dd if=/dev/zero of=/dev/vgora_asm/rlvol1 bs=8192 count=12800