From Wiki-UX.info

Wiki-UX / How to migrate HP-UX 11i v3 LVM bootable disk to VxVM 5.0.1
Jump to: navigation, search

How to migrate HP-UX 11i v3 LVM bootable disk to VxVM 5.0.1

Abstract

The following article describes a procedure to migrate a HP-UX 11i v3 LVM bootable disk to VxVM 5.01. The procedure requires a spare disk to clone the LVM bootable disk.

Prior to VxVM Version 4.0, the creation of rootdg disk group was mandatory. The standard practice on HP-UX 11i systems is to use rootdg to identify the bootable VxVM volume.

In the following example the LVM /dev/vg00 volume group will migrate to the VxVM /dev/vx/dsk/rootdg diskgroup.

The HP-UX 11i v3 LVM boot disk system uses Agile Addressing on the internal /dev/disk/disk0 disk. The internal /dev/disk/disk1 disk will hold the new VxVM diskgroup.

Check current system status

# uname -a
HP-UX tifa B.11.31 U ia64 2471828210 unlimited-user license
# strings /etc/lvmtab
/dev/vg00
/dev/disk/disk0_p2
# vgdisplay -v /dev/vg00
--- Volume groups ---
VG Name                     /dev/vg00
VG Write Access             read/write
VG Status                   available
Max LV                      255
Cur LV                      7
Open LV                     7
Max PV                      16
Cur PV                      1
Act PV                      1
Max PE per PV               4280
VGDA                        2
PE Size (Mbytes)            8
Total PE                    2959
Alloc PE                    2912
Free PE                     47
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  1.0
VG Max Size                 535g
VG Max Extents              68480
 
   --- Logical volumes ---
   LV Name                     /dev/vg00/lvol1
   LV Status                   available/syncd
   LV Size (Mbytes)            1792
   Current LE                  224
   Allocated PE                224
   Used PV                     1
 
   LV Name                     /dev/vg00/lvol2
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1
 
   LV Name                     /dev/vg00/lvol3
   LV Status                   available/syncd
   LV Size (Mbytes)            1024
   Current LE                  128
   Allocated PE                128
   Used PV                     1
 
   LV Name                     /dev/vg00/lvol4
   LV Status                   available/syncd
   LV Size (Mbytes)            1024
   Current LE                  128
   Allocated PE                128
   Used PV                     1
 
   LV Name                     /dev/vg00/lvol6
   LV Status                   available/syncd
   LV Size (Mbytes)            7168
   Current LE                  896
   Allocated PE                896
   Used PV                     1
 
   LV Name                     /dev/vg00/lvol7
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1
 
   LV Name                     /dev/vg00/lvol8
   LV Status                   available/syncd
   LV Size (Mbytes)            4096
   Current LE                  512
   Allocated PE                512
   Used PV                     1
 
 
   --- Physical volumes ---
   PV Name                     /dev/disk/disk0_p2
   PV Status                   available
   Total PE                    2959
   Free PE                     47
   Autoswitch                  On
   Proactive Polling           On
# swlist Base-VxVM-50
# Initializing...
# Contacting target "tifa"...
#
# Target:  tifa:/
#
 
# Base-VxVM-50                  B.05.00.01     Base VERITAS Volume Manager Bundle 5.0 for HP-UX
  Base-VxVM-50.VRTSvlic         3.02.24.0      Symantec License Utilities
  Base-VxVM-50.AVXVM            B.05.00.01     VXVM Integration Product
  Base-VxVM-50.VRTSvmdoc        5.0.31.0       Documentation for Veritas Volume Manager by Symantec
  Base-VxVM-50.VRTSvxvm         5.0.31.1       Veritas Volume Manager by Symantec
# ioscan -NfnkC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      0  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk0      /dev/rdisk/disk0
                      /dev/disk/disk0_p1   /dev/rdisk/disk0_p1
                      /dev/disk/disk0_p2   /dev/rdisk/disk0_p2
                      /dev/disk/disk0_p3   /dev/rdisk/disk0_p3
disk      1  64000/0xfa00/0x4  esdisk   CLAIMED     DEVICE       HP      Virtual LvDisk
                      /dev/disk/disk1   /dev/rdisk/disk1

Migrate LVM boot disk to VxVM

The conversion of the root volume group from LVM to VxVM is acomplished using the vxcp_lvmroot script.

The commands on this this script do not convert the existing volume group to VxVM, but they use a spare drive to initializate VxVM and clone the data to the new diskgroup rootdg.

  • vxcp_lvmroot(1M):
vxcp_lvmroot(1M)               VxVM 5.0.31.1               vxcp_lvmroot(1M)
                                 24 Mar 2008
 
 NAME
      vxcp_lvmroot - copy LVM root disk onto new Veritas Volume Manager root
      disk
 
 SYNOPSIS
      /etc/vx/bin/vxcp_lvmroot [-g diskgroup] [-m mirror_root_da_name]
          [-r rootvol_size] [-s standvol_size] [-S swapvol_size]
          [-R percent] [-v] [-b] [-D] [-n] new_root_da_name
 
      /etc/vx/bin/vxcp_lvmroot [-g diskgroup] [-m mirror_root_da_name]
          [-r rootvol_size] [-s standvol_size] [-S swapvol_size]
          [-p Pool_1,Pool_2,Pool_3,Pool_4,...]
          [-v] [-b] [-D] new_root_da_name
...

1. Migrate the LVM disk to VxVM using vxcp_lvmroot command.

# /etc/vx/bin/vxcp_lvmroot -v disk1
VxVM vxcp_lvmroot INFO V-5-2-4668 09:11: Bootdisk is configured with new-style DSF
VxVM vxcp_lvmroot INFO V-5-2-2499 09:11: Gathering information on LVM root volume group vg00
VxVM vxcp_lvmroot INFO V-5-2-2441 09:11: Checking specified disk(s) for usability
VxVM vxcp_lvmroot INFO V-5-2-4679 09:11: Using new-style DSF names
VxVM vxcp_lvmroot INFO V-5-2-1669 09:11: Starting up VxVM
V-5-1-0 vxvm:vxconfigd: NOTICE: Generating /etc/vx/array.info
VxVM vxcp_lvmroot INFO V-5-2-2566 09:11: Preparing disk disk1 as a VxVM root disk
VxVM vxcp_lvmroot INFO V-5-2-3767 09:11: Disk disk1 is now EFI partitioned disk disk1_p2
VxVM vxcp_lvmroot INFO V-5-2-2537 09:11: Initializing DG rootdg with disk disk1_p2 as DM rootdisk01
VxVM vxcp_lvmroot INFO V-5-2-1606 09:11: Copying /dev/vg00/lvol1 (vxfs) to /dev/vx/dsk/rootdg/standvol
VxVM vxcp_lvmroot INFO V-5-2-1604 09:11: Cloning /dev/vg00/lvol2 (swap) to /dev/vx/dsk/rootdg/swapvol
VxVM vxcp_lvmroot INFO V-5-2-1606 09:11: Copying /dev/vg00/lvol3 (vxfs) to /dev/vx/dsk/rootdg/rootvol
VxVM vxcp_lvmroot INFO V-5-2-1606 09:12: Copying /dev/vg00/lvol4 (vxfs) to /dev/vx/dsk/rootdg/tmpvol
VxVM vxcp_lvmroot INFO V-5-2-1606 09:12: Copying /dev/vg00/lvol6 (vxfs) to /dev/vx/dsk/rootdg/optvol
VxVM vxcp_lvmroot INFO V-5-2-1606 09:22: Copying /dev/vg00/lvol7 (vxfs) to /dev/vx/dsk/rootdg/usrvol
VxVM vxcp_lvmroot INFO V-5-2-1606 09:28: Copying /dev/vg00/lvol8 (vxfs) to /dev/vx/dsk/rootdg/varvol
VxVM vxcp_lvmroot INFO V-5-2-4678 09:30: Setting up disk disk1_p2 as a boot disk
VxVM vxcp_lvmroot INFO V-5-2-1638 09:31: Installing fstab and fixing dev nodes on new root FS
rm: /tmpmnt.5090.30615//etc/vx/darecs non-existent
VxVM vxcp_lvmroot INFO V-5-2-2538 09:31: Installing bootconf & rootconf files in new stand FS
VxVM vxcp_lvmroot INFO V-5-2-4671 09:31: Disk disk1_p2 is now a VxVM rootable boot disk

2. Change the default boot disk to the new VxVM disk.

# setboot
Primary bootpath : 0/0/2/0.0x0.0x0 (/dev/rdisk/disk0)
HA Alternate bootpath :
Alternate bootpath :
 
Autoboot is ON (enabled)
# setboot -a 0/0/2/0.0x0.0x0
# setboot -h 0/0/2/0.0x0.0x0
# setboot -p /dev/disk/disk1
Primary boot path set to 0/0/2/0.0x1.0x0 (/dev/disk/disk1)
# setboot
Primary bootpath : 0/0/2/0.0x1.0x0 (/dev/rdisk/disk1)
HA Alternate bootpath : 0/0/2/0.0x0.0x0 (/dev/rdisk/disk0)
Alternate bootpath : 0/0/2/0.0x0.0x0 (/dev/rdisk/disk0)
 
Autoboot is ON (enabled)

3. Reboot the system

During system reboot from the VxVM cloned disk, the following notification message will appear:

Starting vxconfigd in boot mode (pre_init_rc).
NOTICE: VxVM vxdmp V-5-0-34 added disk array DISKS, datype = Disk
 
NOTICE: VxVM vxdmp V-5-3-1700 dmpnode 5/0x0 has migrated from enclosure FAKE_ENCLR_SNO to enclosure DISKS

According to the VxVM 4.1 Release Notes (valid for VxVM 5.01 systems):

Initially, the boot disk is marked as FAKE array type. If the boot disk was not excluded
from VxVM then the boot disk will migrate to the correct enclosure type depending on
discovery and the FAKE array type is deleted from it. In the case where boot disk is
excluded from VxVM, the disk does not migrate. The FAKE array still has a disk, it can
not be deleted and so the FAKE_ARRAY enclosure type status is still visible to the user.
This is by design.

4. Check VxVM system status after reboot

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vx/dsk/rootdg/rootvol
                   1048576  391707  615929   39% /
/dev/vx/dsk/rootdg/standvol
                   1835008  343312 1398531   20% /stand
/dev/vx/dsk/rootdg/varvol
                   4194304 1344016 2672223   33% /var
/dev/vx/dsk/rootdg/usrvol
                   4194304 3053502 1069524   74% /usr
/dev/vx/dsk/rootdg/tmpvol
                   1048576   17407  966851    2% /tmp
/dev/vx/dsk/rootdg/optvol
                   7340032 5760146 1481201   80% /opt
# vxprint -g rootdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdg       rootdg       -        -        -        -        -       -
 
dm rootdisk01   disk1_p2     -        24241056 -        -        -       -
 
v  optvol       fsgen        ENABLED  7340032  -        ACTIVE   -       -
pl optvol-01    optvol       ENABLED  7340032  -        ACTIVE   -       -
sd rootdisk01-05 optvol-01   ENABLED  7340032  0        -        -       -
 
v  rootvol      root         ENABLED  1048576  -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  1048576  -        ACTIVE   -       -
sd rootdisk01-03 rootvol-01  ENABLED  1048576  0        -        -       -
 
v  standvol     fsgen        ENABLED  1835008  -        ACTIVE   -       -
pl standvol-01  standvol     ENABLED  1835008  -        ACTIVE   -       -
sd rootdisk01-01 standvol-01 ENABLED  1835008  0        -        -       -
 
v  swapvol      swap         ENABLED  4194304  -        ACTIVE   -       -
pl swapvol-01   swapvol      ENABLED  4194304  -        ACTIVE   -       -
sd rootdisk01-02 swapvol-01  ENABLED  4194304  0        -        -       -
 
v  tmpvol       fsgen        ENABLED  1048576  -        ACTIVE   -       -
pl tmpvol-01    tmpvol       ENABLED  1048576  -        ACTIVE   -       -
sd rootdisk01-04 tmpvol-01   ENABLED  1048576  0        -        -       -
 
v  usrvol       fsgen        ENABLED  4194304  -        ACTIVE   -       -
pl usrvol-01    usrvol       ENABLED  4194304  -        ACTIVE   -       -
sd rootdisk01-06 usrvol-01   ENABLED  4194304  0        -        -       -
 
v  varvol       fsgen        ENABLED  4194304  -        ACTIVE   -       -
pl varvol-01    varvol       ENABLED  4194304  -        ACTIVE   -       -
sd rootdisk01-07 varvol-01   ENABLED  4194304  0        -        -       -

5. Ensure that system disk naming scheme uses the new device special files as the default output.

# vxddladm set namingscheme=osn mode=new
# vxddladm get namingscheme
NAMING_SCHEME       PERSISTENCE         MODE
===============================================
OS Native           Yes                 New
# vxdmpadm listenclosure all
ENCLR_NAME        ENCLR_TYPE     ENCLR_SNO      STATUS       ARRAY_TYPE
============================================================================
Disk              Disk           DISKS                CONNECTED    Disk
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
disk0_p2     auto:LVM        -            -            LVM
disk1_p2     auto:hpdisk     rootdisk01   rootdg       online

Reference

Authors

This page was last modified on 5 March 2010, at 10:39. This page has been accessed 1,684 times.