How to set-up Logical Volume Manager (LVM)VolumeGroup/LVMLogicalVolume resources in VERITAS Cluster Server (VCS) for HP-UX.

Article:TECH15920  |  Created: 2002-01-01  |  Updated: 2002-01-01  |  Article URL http://www.symantec.com/docs/TECH15920
Article Type
Technical Solution

Product(s)

Environment

Issue



How to set-up Logical Volume Manager (LVM)VolumeGroup/LVMLogicalVolume resources in VERITAS Cluster Server (VCS) for HP-UX.

Solution



1. Create or use an existing HP-UX  logical volume group

1.1  Make a new directory which will serve to store the volume device nodes:

#mkdir /dev/vg01

1.2 Make a "group" file:

#mknod /dev/vg01/group c 64 0x0n0000
(64 is the major number. Use lsdev to obtain this. 0x0n0000 is an available minor number and has to be unique)

1.3 Use the pvcreate command to make an LVM physical volume:

#pvcreate [-f] /dev/rdsk/c0t15d0

1.4 Use the vgcreate command to make an LVM volume group using the vg01 directory and group file created before:

#vgcreate /dev/vg01 /dev/dsk/c0t15d0


2. Creating logical volumes

2.1 Use the lvcreate command to make an LVM logical volume for the volume group created before:

#lvcreate -L 200 /dev/vg01 [-n lvol_name]

2.2 Make a new Journaling File System (JFS) file system on the volume created before:

#newfs -F vxfs /dev/vg01/rlvol1

2.3 Create a mount point for the new file system if needed:

#mkdir /application

NOTE: For more information about creating LVM objects consult the product documentation and lvm (1M)


3. Modify the /etc/VRTSvcs/conf/config/main.cf file


Example

Include types.cf

c
luster vcs (
       CounterInterval = 5
       Factor = { runque = 5, memory = 1, disk = 10, cpu = 25,
                network = 5 }
       MaxFactor = { runque = 100, memory = 10, disk = 100, cpu = 100,
                network = 100 }
       )

system hpvvr1

system hpvvr2

snmp vcs (
       TrapList = { 1 = "A new system has joined the VCS Cluster",
                2 = "An existing system has changed its state",
                3 = "A service group has changed its state",
                4 = "One or more heartbeat links has gone down",
                5 = "An HA service has done a manual restart",
                6 = "An HA service has been manually idled",
                7 = "An HA service has been successfully started" }
       )
group vg_group (
       SystemList = { hpvvr1, hpvvr2 }
       AutoStartList = { hpvvr2 }
       )

       LVMLogicalVolume lvol_lvol1 (
               LogicalVolume = lvol1
               VolumeGroup = vg01
               )

       LVMVolumeGroup vg_vg01 (
               VolumeGroup = vg01
               )

       Mount vg_mount (
               MountPoint = "/application"
               BlockDevice = "/dev/vg01/lvol1"
               FSType = vxfs
               MountOpt = rw
               )

       lvol_lvol1 requires vg_vg01
       vg_mount requires vg_lvol1


4. vxexport -p -m /vg01.map /dev/vg01

This performs an export of the volume group, but in preview mode and stores the information to the map file vg01.map. If using the standard HP-UX LVM naming conventions [lvolX] then this is not necessary. If using /dev/vg01/oracle_lvol then this needs to be done or else the import will rename them back to the standard naming conventions.

contents of the map file:
1 lvol1  


NOTE: Every time a logical volume is created within the volume group that belongs to the cluster, it has to be populated to other nodes using the vgexport/vgimport [mapfile] commands or else it will not be seen. Thus, it will not be able to be mounted on the other nodes. It is possible to check this by looking in the /dev/vg01 directory on all the nodes.

IMPORTANT NOTE: To avoid a 'split brain' scenario, it is necessary to make sure that the volumes under VCS control are not started at boot up and that all nodes in the cluster have been changed in the /etc/lvmrc file:

Set AUTO_VG_ACTIVATE=0 in this file and modify the custom_vg_activation() routine





Legacy ID



239812


Article URL http://www.symantec.com/docs/TECH15920


Terms of use for this information are found in Legal Notices