From Wiki-UX.info

Wiki-UX / How to remove a HP-UX 11i VxVM 4.1 or 5.0.1 mirror boot disk
Jump to: navigation, search

How to remove a HP-UX 11i VxVM 4.1 or 5.0.1 mirror boot disk

Abstract

The following article demostrates how to remove a Veritas Volume Manager boot mirror using either VxVM version 4.1 or 5.0.1.

Additional, the usage of vxbrk_bootmir script to split the alternate boot mirror into an independent boot disk is also explained.

This article is useful to aid engineers handling the task for the first time to complement the examples provided by the corresponding Administration Guides.

Check current VxVM boot mirror configuration

# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c0t0d0s2     auto:hpdisk     rootdisk01   rootdg       online
c0t1d0s2     auto:hpdisk     rootdisk02   rootdg       online
 
# vxprint -g rootdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdg       rootdg       -        -        -        -        -       -
 
dm rootdisk01   c0t0d0s2     -        24240032 -        -        -       -
dm rootdisk02   c0t1d0s2     -        24241056 -        -        -       -
 
v  optvol       fsgen        ENABLED  6291456  -        ACTIVE   -       -
pl optvol-01    optvol       ENABLED  6291456  -        ACTIVE   -       -
sd rootdisk01-04 optvol-01   ENABLED  6291456  0        -        -       -
pl optvol-02    optvol       ENABLED  6291456  -        ACTIVE   -       -
sd rootdisk02-04 optvol-02   ENABLED  6291456  0        -        -       -
 
v  rootvol      root         ENABLED  850944   -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  850944   -        ACTIVE   -       -
sd rootdisk01-03 rootvol-01  ENABLED  850944   0        -        -       -
pl rootvol-02   rootvol      ENABLED  850944   -        ACTIVE   -       -
sd rootdisk02-03 rootvol-02  ENABLED  850944   0        -        -       -
 
v  standvol     fsgen        ENABLED  516096   -        ACTIVE   -       -
pl standvol-01  standvol     ENABLED  516096   -        ACTIVE   -       -
sd rootdisk01-01 standvol-01 ENABLED  516096   0        -        -       -
pl standvol-02  standvol     ENABLED  516096   -        ACTIVE   -       -
sd rootdisk02-01 standvol-02 ENABLED  516096   0        -        -       -
 
v  swapvol      swap         ENABLED  4194304  -        ACTIVE   -       -
pl swapvol-01   swapvol      ENABLED  4194304  -        ACTIVE   -       -
sd rootdisk01-02 swapvol-01  ENABLED  4194304  0        -        -       -
pl swapvol-02   swapvol      ENABLED  4194304  -        ACTIVE   -       -
sd rootdisk02-02 swapvol-02  ENABLED  4194304  0        -        -       -
 
v  tmpvol       fsgen        ENABLED  1048576  -        ACTIVE   -       -
pl tmpvol-01    tmpvol       ENABLED  1048576  -        ACTIVE   -       -
sd rootdisk01-05 tmpvol-01   ENABLED  1048576  0        -        -       -
pl tmpvol-02    tmpvol       ENABLED  1048576  -        ACTIVE   -       -
sd rootdisk02-05 tmpvol-02   ENABLED  1048576  0        -        -       -
 
v  usrvol       fsgen        ENABLED  3670016  -        ACTIVE   -       -
pl usrvol-01    usrvol       ENABLED  3670016  -        ACTIVE   -       -
sd rootdisk01-06 usrvol-01   ENABLED  3670016  0        -        -       -
pl usrvol-02    usrvol       ENABLED  3670016  -        ACTIVE   -       -
sd rootdisk02-06 usrvol-02   ENABLED  3670016  0        -        -       -
 
v  varcrashvol  fsgen        ENABLED  843776   -        ACTIVE   -       -
pl varcrashvol-01 varcrashvol ENABLED 843776   -        ACTIVE   -       -
sd rootdisk01-08 varcrashvol-01 ENABLED 843776 0        -        -       -
pl varcrashvol-02 varcrashvol ENABLED 843776   -        ACTIVE   -       -
sd rootdisk02-08 varcrashvol-02 ENABLED 843776 0        -        -       -
 
v  varoptvol    fsgen        ENABLED  843776   -        ACTIVE   -       -
pl varoptvol-01 varoptvol    ENABLED  843776   -        ACTIVE   -       -
sd rootdisk01-09 varoptvol-01 ENABLED 843776   0        -        -       -
pl varoptvol-02 varoptvol    ENABLED  843776   -        ACTIVE   -       -
sd rootdisk02-09 varoptvol-02 ENABLED 843776   0        -        -       -
 
v  varvol       fsgen        ENABLED  2764800  -        ACTIVE   -       -
pl varvol-01    varvol       ENABLED  2764800  -        ACTIVE   -       -
sd rootdisk01-07 varvol-01   ENABLED  2764800  0        -        -       -
pl varvol-02    varvol       ENABLED  2764800  -        ACTIVE   -       -
sd rootdisk02-07 varvol-02   ENABLED  2764800  0        -        -       -

Note that both disks /dev/dsk/c0t0d0 and /dev/dsk/c0t1d0 and their corresponding EFI partitions are constitute the VxVM rootdg diskgroup.

Manually removing the VxVM boot mirror

Removing the VxVM boot mirror requires to disassociate the mirror plexes from the rootdg diskgroup volumes and removing the additional disk from the diskgroup when all plexes are disassociated.

1. The vxplex command is use to remove the mirror plex from each volume. The sintax is similar to:

# vxplex -g rootdg -o rm dis <plex>

To find which plexes contains the mirror image of the volume group, the vxprint command can be use to gather information of each volume. For example, to gather the rootvol information use:

# vxprint -g rootdg rootvol
v  rootvol      root         ENABLED  850944   -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  850944   -        ACTIVE   -       -
sd rootdisk01-03 rootvol-01  ENABLED  850944   0        -        -       -
pl rootvol-02   rootvol      ENABLED  850944   -        ACTIVE   -       -
sd rootdisk02-03 rootvol-02  ENABLED  850944   0        -        -       -

To disassociate the rootvol-02 mirror plex from the volume, the required command is:

# vxplex -g rootdg -o rm dis rootvol-02

The following script can be used to create a list of all the vxplex commands required to disassociate the plexes.

vxprint -g rootdg | grep ^pl | grep -F "02" |\
awk '{printf "vxplex -g rootdg -o rm dis %s\n", $2}' > /tmp/rmplex.sh

Review the generate vxplex command list.

# cat /tmp/rmplex.sh
vxplex -g rootdg -o rm dis optvol-02
vxplex -g rootdg -o rm dis rootvol-02
vxplex -g rootdg -o rm dis standvol-02
vxplex -g rootdg -o rm dis swapvol-02
vxplex -g rootdg -o rm dis tmpvol-02
vxplex -g rootdg -o rm dis usrvol-02
vxplex -g rootdg -o rm dis varcrashvol-02
vxplex -g rootdg -o rm dis varoptvol-02
vxplex -g rootdg -o rm dis varvol-02

Execute the generate vxplex command list.

# sh /tmp/rmplex.sh

2. The vxdg command is use to remove the alternate disk from the rootdg diskgroup.

# vxdg -g rootdg rmdisk <disk_access_name>

For example:

# vxdg -g rootdg rmdisk rootdisk02

3. Check the rootdg configuration after completing the previous tasks using the vxprint command.

# vxprint -g rootdg
TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0
dg rootdg       rootdg       -        -        -        -        -       -
 
dm rootdisk01   c0t0d0s2     -        24240032 -        -        -       -
 
v  optvol       fsgen        ENABLED  6291456  -        ACTIVE   -       -
pl optvol-01    optvol       ENABLED  6291456  -        ACTIVE   -       -
sd rootdisk01-04 optvol-01   ENABLED  6291456  0        -        -       -
 
v  rootvol      root         ENABLED  850944   -        ACTIVE   -       -
pl rootvol-01   rootvol      ENABLED  850944   -        ACTIVE   -       -
sd rootdisk01-03 rootvol-01  ENABLED  850944   0        -        -       -
 
v  standvol     fsgen        ENABLED  516096   -        ACTIVE   -       -
pl standvol-01  standvol     ENABLED  516096   -        ACTIVE   -       -
sd rootdisk01-01 standvol-01 ENABLED  516096   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-05 tmpvol-01   ENABLED  1048576  0        -        -       -
 
v  usrvol       fsgen        ENABLED  3670016  -        ACTIVE   -       -
pl usrvol-01    usrvol       ENABLED  3670016  -        ACTIVE   -       -
sd rootdisk01-06 usrvol-01   ENABLED  3670016  0        -        -       -
 
v  varcrashvol  fsgen        ENABLED  843776   -        ACTIVE   -       -
pl varcrashvol-01 varcrashvol ENABLED 843776   -        ACTIVE   -       -
sd rootdisk01-08 varcrashvol-01 ENABLED 843776 0        -        -       -
 
v  varoptvol    fsgen        ENABLED  843776   -        ACTIVE   -       -
pl varoptvol-01 varoptvol    ENABLED  843776   -        ACTIVE   -       -
sd rootdisk01-09 varoptvol-01 ENABLED 843776   0        -        -       -
 
v  varvol       fsgen        ENABLED  2764800  -        ACTIVE   -       -
pl varvol-01    varvol       ENABLED  2764800  -        ACTIVE   -       -
sd rootdisk01-07 varvol-01   ENABLED  2764800  0        -        -       -

Splitting the VxVM boot mirror using vxbrk_bootmir script

The vxbrk_bootmir script can be used to automatically split the VxVM boot mirror and convert it to an independent diskgroup.

For example:

# /etc/vx/bin/vxbrk_rootmir -g test_rootdg -vb c0t1d0
VxVM vxbrk_rootmir INFO V-5-2-4023 13:35: Checking specified disk(s) for presence and type
VxVM vxbrk_rootmir INFO V-5-2-4052 13:52: Saving configuration data for later restoration
VxVM vxbrk_rootmir INFO V-5-2-4022 13:52: Breaking off root mirror on DA c0t1d0s2
VxVM vxbrk_rootmir INFO V-5-2-4054 13:52: Setting broken off mirror on c0t1d0s2 as unique root disk
VxVM vxbrk_rootmir INFO V-5-2-2566 13:52: Preparing disk c0t1d0s2 as a VxVM root disk
VxVM vxbrk_rootmir INFO V-5-2-4046 13:52: Patching devnodes, fstab and volboot file in new Root FS
VxVM vxbrk_rootmir INFO V-5-2-4045 13:52: Patching /stand/bootconf file to contain new root disk
VxVM vxbrk_rootmir INFO V-5-2-2462 13:52: Current setboot values:
VxVM vxbrk_rootmir INFO V-5-2-4048 13:52: Primary: 0/0/2/0.0.0
VxVM vxbrk_rootmir INFO V-5-2-4010 13:52: Alternate: 0/0/2/0.1.0
VxVM vxbrk_rootmir INFO V-5-2-4042 13:52: Making c0t1d0s2 (0/0/2/0.1.0) the alternate boot disk
VxVM vxbrk_rootmir INFO V-5-2-4028 13:52: Disk c0t1d0s2 is now a broken off root disk

Reference

Authors

This page was last modified on 8 March 2010, at 21:09. This page has been accessed 1,387 times.