From Wiki-UX.info

Wiki-UX / Logical Volume Manager / How to recover LVM volume group configuration after a SAN topology change
Jump to: navigation, search

How to recover LVM volume group configuration after a SAN topology change

Abstract

The following article describes a general procedure to recover the LVM volume group configuration after a SAN topology change.

Contents


On HP-UX 11i v1, 11i v2 and HP-UX 11i v3 using legacy addressing, changes in the physical topology of the SAN, for example, changes on the zoning, SAN equipment firmware upgrades, moving the Fibre Channel Host Bus Adaptor cabling to a new switch or SAN initiator; will produce changes in the Legacy H/W Path Addressing and a new set of device special files (dsf) will be created.

This problem does not affect HP-UX 11i v3 LVM volume groups that use Persistent Addressing (Agile).

This method assumes that the server boot disk is directly attached and the server is bootable. SAN boot deployments will require additional steps to be executed in LVM maintenance mode (ISL> hpux -lm).

Identify the Problem

This situation is normally easy to identify because the System Administrators will be aware of the physical topology change. Nonetheless, an ioscan output will normally show that that one or more FCP domains are not longer accessible and the whole device branch up to the disk will display NO_H/W State.

For example:

$ strings /etc/lvmtab | grep dev
/dev/vg00
/dev/dsk/c1t6d0
/dev/dsk/c2t6d0
/dev/vgdb
/dev/dsk/c3t0d1
/dev/dsk/c5t0d1
/dev/vgdmp
/dev/dsk/c3t0d3
/dev/dsk/c5t0d3
/dev/vg01
/dev/dsk/c3t0d5
/dev/vglog
/dev/dsk/c3t0d4
/dev/dsk/c5t0d4
/dev/vgov
/dev/dsk/c3t0d2
/dev/dsk/c5t0d2
$ ioscan -fn
Class       I  H/W Path        Driver    S/W State   H/W Type     Description
==============================================================================
root        0                  root      CLAIMED     BUS_NEXUS    
ioa         0  0               sba       CLAIMED     BUS_NEXUS    System Bus Adapter (803)
ba          0  0/0             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
lan         0  0/0/0/0         btlan     CLAIMED     INTERFACE    HP PCI 10/100Base-TX Core
ext_bus     0  0/0/1/0         c8xx      CLAIMED     INTERFACE    SCSI C895 Fast Wide Single-Ended
target      4  0/0/1/0.1       tgt       CLAIMED     DEVICE       
disk        2  0/0/1/0.1.0     sdisk     CLAIMED     DEVICE       HP      DVD-ROM 304
                              /dev/dsk/c0t1d0   /dev/rdsk/c0t1d0
target      9  0/0/1/0.3       tgt       CLAIMED     DEVICE       
tape        0  0/0/1/0.3.0     stape     CLAIMED     DEVICE       HP      C1537A
                              /dev/rmt/0m            /dev/rmt/c0t3d0BEST    /dev/rmt/c0t3d0DDS   
                              /dev/rmt/0mb           /dev/rmt/c0t3d0BESTb   /dev/rmt/c0t3d0DDSb  
                              /dev/rmt/0mn           /dev/rmt/c0t3d0BESTn   /dev/rmt/c0t3d0DDSn  
                              /dev/rmt/0mnb          /dev/rmt/c0t3d0BESTnb  /dev/rmt/c0t3d0DDSnb 
target     10  0/0/1/0.7       tgt       CLAIMED     DEVICE       
ctl         2  0/0/1/0.7.0     sctl      CLAIMED     DEVICE       Initiator
                              /dev/rscsi/c0t7d0
ext_bus     1  0/0/2/0         c8xx      CLAIMED     INTERFACE    SCSI C87x Ultra Wide Single-Ended
target      0  0/0/2/0.6       tgt       CLAIMED     DEVICE       
disk        0  0/0/2/0.6.0     sdisk     CLAIMED     DEVICE       SEAGATE ST318203LC
                              /dev/dsk/c1t6d0   /dev/rdsk/c1t6d0
target      2  0/0/2/0.7       tgt       CLAIMED     DEVICE       
ctl         0  0/0/2/0.7.0     sctl      CLAIMED     DEVICE       Initiator
                              /dev/rscsi/c1t7d0
ext_bus     2  0/0/2/1         c8xx      CLAIMED     INTERFACE    SCSI C87x Ultra Wide Single-Ended
target      1  0/0/2/1.6       tgt       CLAIMED     DEVICE       
disk        1  0/0/2/1.6.0     sdisk     CLAIMED     DEVICE       SEAGATE ST318203LC
                              /dev/dsk/c2t6d0   /dev/rdsk/c2t6d0
target      3  0/0/2/1.7       tgt       CLAIMED     DEVICE       
ctl         1  0/0/2/1.7.0     sctl      CLAIMED     DEVICE       Initiator
                              /dev/rscsi/c2t7d0
tty         0  0/0/4/0         asio0     CLAIMED     INTERFACE    PCI Serial (103c1048)
                              /dev/GSPdiag1   /dev/mux0       /dev/tty0p1   
                              /dev/diag/mux0  /dev/tty0p0     /dev/tty0p2   
tty         1  0/0/5/0         asio0     CLAIMED     INTERFACE    PCI Serial (103c1048)
                              /dev/GSPdiag2   /dev/diag/mux1  /dev/mux1       /dev/tty1p1   
ba          1  0/1             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba          2  0/2             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba          3  0/4             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba          4  0/4/0/0         PCItoPCI  CLAIMED     BUS_NEXUS    PCItoPCI Bridge
lan         1  0/4/0/0/4/0     btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan         2  0/4/0/0/5/0     btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan         3  0/4/0/0/6/0     btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan         4  0/4/0/0/7/0     btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
ba          5  0/5             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
unknown    -1  0/5/0/0                   UNCLAIMED   UNKNOWN      PCI SCSI (1000000f)
ba          6  0/8             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
fc          2  0/8/0/0         td        CLAIMED     INTERFACE    HP Tachyon XL2 Fibre Channel Mass Storage Adapter
                              /dev/td2
fcp         2  0/8/0/0.1       fcp       NO_HW       INTERFACE    FCP Domain
ext_bus     3  0/8/0/0.1.249.1.0         fcparray  NO_HW       INTERFACE    FCP Array Interface
target      6  0/8/0/0.1.249.1.0.0       tgt       NO_HW       DEVICE       
ctl         3  0/8/0/0.1.249.1.0.0.0     sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c3t0d0
disk        3  0/8/0/0.1.249.1.0.0.1     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c3t0d1   /dev/rdsk/c3t0d1
disk        5  0/8/0/0.1.249.1.0.0.2     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c3t0d2   /dev/rdsk/c3t0d2
disk        6  0/8/0/0.1.249.1.0.0.3     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c3t0d3   /dev/rdsk/c3t0d3
disk        7  0/8/0/0.1.249.1.0.0.4     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c3t0d4   /dev/rdsk/c3t0d4
disk        8  0/8/0/0.1.249.1.0.0.5     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c3t0d5   /dev/rdsk/c3t0d5
ext_bus     4  0/8/0/0.1.249.255.0       fcpdev    NO_HW       INTERFACE    FCP Device Interface
target      5  0/8/0/0.1.249.255.0.1     tgt       NO_HW       DEVICE       
ctl         4  0/8/0/0.1.249.255.0.1.0   sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c4t1d0
ext_bus     5  0/8/0/0.1.250.1.0         fcparray  NO_HW       INTERFACE    FCP Array Interface
target      8  0/8/0/0.1.250.1.0.0       tgt       NO_HW       DEVICE       
ctl         5  0/8/0/0.1.250.1.0.0.0     sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c5t0d0
disk        4  0/8/0/0.1.250.1.0.0.1     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c5t0d1   /dev/rdsk/c5t0d1
disk        9  0/8/0/0.1.250.1.0.0.2     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c5t0d2   /dev/rdsk/c5t0d2
disk       10  0/8/0/0.1.250.1.0.0.3     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c5t0d3   /dev/rdsk/c5t0d3
disk       11  0/8/0/0.1.250.1.0.0.4     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c5t0d4   /dev/rdsk/c5t0d4
disk       12  0/8/0/0.1.250.1.0.0.5     sdisk     NO_HW       DEVICE       HP      HSV300
                              /dev/dsk/c5t0d5   /dev/rdsk/c5t0d5
ext_bus     6  0/8/0/0.1.250.255.0       fcpdev    NO_HW       INTERFACE    FCP Device Interface
target      7  0/8/0/0.1.250.255.0.1     tgt       NO_HW       DEVICE       
ctl         6  0/8/0/0.1.250.255.0.1.0   sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c6t1d0
fcp         0  0/8/0/0.31      fcp       CLAIMED     INTERFACE    FCP Domain
ext_bus    11  0/8/0/0.31.185.0.0        fcparray  CLAIMED     INTERFACE    FCP Array Interface
target     18  0/8/0/0.31.185.0.0.0      tgt       CLAIMED     DEVICE       
ctl        13  0/8/0/0.31.185.0.0.0.0    sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c11t0d0
disk       14  0/8/0/0.31.185.0.0.0.1    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c11t0d1   /dev/rdsk/c11t0d1
disk       16  0/8/0/0.31.185.0.0.0.2    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c11t0d2   /dev/rdsk/c11t0d2
disk       18  0/8/0/0.31.185.0.0.0.3    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c11t0d3   /dev/rdsk/c11t0d3
disk       20  0/8/0/0.31.185.0.0.0.4    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c11t0d4   /dev/rdsk/c11t0d4
disk       22  0/8/0/0.31.185.0.0.0.5    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c11t0d5   /dev/rdsk/c11t0d5
ext_bus    12  0/8/0/0.31.185.255.0      fcpdev    CLAIMED     INTERFACE    FCP Device Interface
target     16  0/8/0/0.31.185.255.0.0    tgt       CLAIMED     DEVICE       
ctl        11  0/8/0/0.31.185.255.0.0.0  sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c12t0d0
ext_bus    13  0/8/0/0.31.215.0.0        fcparray  CLAIMED     INTERFACE    FCP Array Interface
target     15  0/8/0/0.31.215.0.0.0      tgt       CLAIMED     DEVICE       
ctl        12  0/8/0/0.31.215.0.0.0.0    sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c13t0d0
disk       13  0/8/0/0.31.215.0.0.0.1    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c13t0d1   /dev/rdsk/c13t0d1
disk       15  0/8/0/0.31.215.0.0.0.2    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c13t0d2   /dev/rdsk/c13t0d2
disk       17  0/8/0/0.31.215.0.0.0.3    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c13t0d3   /dev/rdsk/c13t0d3
disk       19  0/8/0/0.31.215.0.0.0.4    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c13t0d4   /dev/rdsk/c13t0d4
disk       21  0/8/0/0.31.215.0.0.0.5    sdisk     CLAIMED     DEVICE       HP      HSV300
                              /dev/dsk/c13t0d5   /dev/rdsk/c13t0d5
ext_bus    14  0/8/0/0.31.215.255.0      fcpdev    CLAIMED     INTERFACE    FCP Device Interface
target     17  0/8/0/0.31.215.255.0.0    tgt       CLAIMED     DEVICE       
ctl        15  0/8/0/0.31.215.255.0.0.0  sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c14t0d0
ba          7  0/10            lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba          8  0/12            lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ioa         1  1               sba       CLAIMED     BUS_NEXUS    System Bus Adapter (803)
ba          9  1/0             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba         10  1/2             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
fc          3  1/2/0/0         td        CLAIMED     INTERFACE    HP Tachyon XL2 Fibre Channel Mass Storage Adapter
                              /dev/td3
fcp         3  1/2/0/0.1       fcp       NO_HW       INTERFACE    FCP Domain
ext_bus     7  1/2/0/0.1.248.1.0         fcparray  NO_HW       INTERFACE    FCP Array Interface
target     12  1/2/0/0.1.248.1.0.0       tgt       NO_HW       DEVICE       
ctl         9  1/2/0/0.1.248.1.0.0.0     sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c7t0d0
ext_bus     8  1/2/0/0.1.248.255.0       fcpdev    NO_HW       INTERFACE    FCP Device Interface
target     11  1/2/0/0.1.248.255.0.1     tgt       NO_HW       DEVICE       
ctl        10  1/2/0/0.1.248.255.0.1.0   sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c8t1d0
ext_bus     9  1/2/0/0.1.249.1.0         fcparray  NO_HW       INTERFACE    FCP Array Interface
target     14  1/2/0/0.1.249.1.0.0       tgt       NO_HW       DEVICE       
ctl         7  1/2/0/0.1.249.1.0.0.0     sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c9t0d0
ext_bus    10  1/2/0/0.1.249.255.0       fcpdev    NO_HW       INTERFACE    FCP Device Interface
target     13  1/2/0/0.1.249.255.0.1     tgt       NO_HW       DEVICE       
ctl         8  1/2/0/0.1.249.255.0.1.0   sctl      NO_HW       DEVICE       HP      HSV300
                              /dev/rscsi/c10t1d0
fcp         1  1/2/0/0.31      fcp       CLAIMED     INTERFACE    FCP Domain
ext_bus    15  1/2/0/0.31.185.0.0        fcparray  CLAIMED     INTERFACE    FCP Array Interface
target     21  1/2/0/0.31.185.0.0.0      tgt       CLAIMED     DEVICE       
ctl        17  1/2/0/0.31.185.0.0.0.0    sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c15t0d0
ext_bus    16  1/2/0/0.31.185.255.0      fcpdev    CLAIMED     INTERFACE    FCP Device Interface
target     20  1/2/0/0.31.185.255.0.0    tgt       CLAIMED     DEVICE       
ctl        16  1/2/0/0.31.185.255.0.0.0  sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c16t0d0
ext_bus    17  1/2/0/0.31.215.0.0        fcparray  CLAIMED     INTERFACE    FCP Array Interface
target     22  1/2/0/0.31.215.0.0.0      tgt       CLAIMED     DEVICE       
ctl        18  1/2/0/0.31.215.0.0.0.0    sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c17t0d0
ext_bus    18  1/2/0/0.31.215.255.0      fcpdev    CLAIMED     INTERFACE    FCP Device Interface
target     19  1/2/0/0.31.215.255.0.0    tgt       CLAIMED     DEVICE       
ctl        14  1/2/0/0.31.215.255.0.0.0  sctl      CLAIMED     DEVICE       HP      HSV300
                              /dev/rscsi/c18t0d0
ba         11  1/4             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba         12  1/8             lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba         13  1/10            lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba         14  1/10/0/0        PCItoPCI  CLAIMED     BUS_NEXUS    PCItoPCI Bridge
lan         5  1/10/0/0/4/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan         6  1/10/0/0/5/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan         7  1/10/0/0/6/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan         8  1/10/0/0/7/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
ba         15  1/12            lba       CLAIMED     BUS_NEXUS    Local PCI Bus Adapter (782)
ba         16  1/12/0/0        PCItoPCI  CLAIMED     BUS_NEXUS    PCItoPCI Bridge
lan         9  1/12/0/0/4/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan        10  1/12/0/0/5/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan        11  1/12/0/0/6/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
lan        12  1/12/0/0/7/0    btlan     CLAIMED     INTERFACE    HP A5506A PCI 10/100Base-TX 4 Port
pbc         0  32              pbc       CLAIMED     BUS_NEXUS    Bus Converter
processor   0  33              processor CLAIMED     PROCESSOR    Processor
pbc         1  36              pbc       CLAIMED     BUS_NEXUS    Bus Converter
processor   1  37              processor CLAIMED     PROCESSOR    Processor
pbc         2  40              pbc       CLAIMED     BUS_NEXUS    Bus Converter
processor   2  41              processor CLAIMED     PROCESSOR    Processor
pbc         3  44              pbc       CLAIMED     BUS_NEXUS    Bus Converter
processor   3  45              processor CLAIMED     PROCESSOR    Processor
pbc         4  100             pbc       CLAIMED     BUS_NEXUS    Bus Converter
processor   4  101             processor CLAIMED     PROCESSOR    Processor
pbc         5  108             pbc       CLAIMED     BUS_NEXUS    Bus Converter
processor   5  109             processor CLAIMED     PROCESSOR    Processor
memory      0  192             memory    CLAIMED     MEMORY       Memory

Note that in the previous ioscan output, the whole device branch beginning at the FCP Domain 2 and 3 shows NO_H/W State

These situation may produce that the LVM Volume Groups become partial or complete unavailable, depending on the number of Physical Volumes and Physical Volumes Links (PV Links) that were affected.

Example:

In the following example, the volume groups were enable with low quorum (vgchange -a y -q n <vgname>) but the PV status is marked as unavailable because one of the physical volumes alternate links were affected. Other common circumstance is that all physical volume device special files change, and quorum cannot be satisfied in any way, the volume group would not activate.

VG Name                     /dev/vgdb
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      1      
Open LV                     1      
Max PV                      16     
Cur PV                      1      
Act PV                      1      
Max PE per PV               7679         
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    7678    
Alloc PE                    5000    
Free PE                     2678    
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vgdb/lvol1
   LV Status                   available/syncd           
   LV Size (Mbytes)            20000           
   Current LE                  5000      
   Allocated PE                5000        
   Used PV                     1       


   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d1
   PV Name                     /dev/dsk/c3t0d1  Alternate Link
   PV Status                   unavailable              
   Total PE                    7678    
   Free PE                     2678    
   Autoswitch                  On        
   Proactive Polling           On               
VG Name                     /dev/vgdmp
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      1      
Open LV                     1      
Max PV                      16     
Cur PV                      1      
Act PV                      1      
Max PE per PV               6399         
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    6398    
Alloc PE                    6250    
Free PE                     148     
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vgdmp/lvovdump
   LV Status                   available/syncd           
   LV Size (Mbytes)            25000           
   Current LE                  6250      
   Allocated PE                6250        
   Used PV                     1       


   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d3
   PV Name                     /dev/dsk/c3t0d3  Alternate Link
   PV Status                   unavailable              
   Total PE                    6398    
   Free PE                     148     
   Autoswitch                  On        
   Proactive Polling           On
VG Name                     /dev/vg01
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      1      
Open LV                     1      
Max PV                      16     
Cur PV                      1      
Act PV                      1      
Max PE per PV               2047         
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    2047    
Alloc PE                    2000    
Free PE                     47      
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vg01/lvol1
   LV Status                   available/syncd           
   LV Size (Mbytes)            8000            
   Current LE                  2000      
   Allocated PE                2000        
   Used PV                     1       


   --- Physical volumes ---
   PV Name                     /dev/dsk/c3t0d5
   PV Status                   unavailable              
   Total PE                    2047    
   Free PE                     47      
   Autoswitch                  On        
   Proactive Polling           On
VG Name                     /dev/vglog
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      1      
Open LV                     1      
Max PV                      16     
Cur PV                      1      
Act PV                      1      
Max PE per PV               2559         
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    2559    
Alloc PE                    2500    
Free PE                     59      
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vglog/lvol1
   LV Status                   available/syncd           
   LV Size (Mbytes)            10000           
   Current LE                  2500      
   Allocated PE                2500        
   Used PV                     1       


   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d4
   PV Name                     /dev/dsk/c3t0d4  Alternate Link
   PV Status                   unavailable              
   Total PE                    2559    
   Free PE                     59      
   Autoswitch                  On        
   Proactive Polling           On              
VG Name                     /dev/vgov
VG Write Access             read/write     
VG Status                   available                 
Max LV                      255    
Cur LV                      2      
Open LV                     2      
Max PV                      16     
Cur PV                      1      
Act PV                      1      
Max PE per PV               5119         
VGDA                        2   
PE Size (Mbytes)            4               
Total PE                    5119    
Alloc PE                    3000    
Free PE                     2119    
Total PVG                   0        
Total Spare PVs             0              
Total Spare PVs in use      0                     

   --- Logical volumes ---
   LV Name                     /dev/vgov/lvovvar
   LV Status                   available/syncd           
   LV Size (Mbytes)            10000           
   Current LE                  2500      
   Allocated PE                2500        
   Used PV                     1       

   LV Name                     /dev/vgov/lvovetc
   LV Status                   available/syncd           
   LV Size (Mbytes)            2000            
   Current LE                  500       
   Allocated PE                500         
   Used PV                     1       


   --- Physical volumes ---
   PV Name                     /dev/dsk/c5t0d2
   PV Name                     /dev/dsk/c3t0d2  Alternate Link
   PV Status                   unavailable              
   Total PE                    5119    
   Free PE                     2119    
   Autoswitch                  On        
   Proactive Polling           On

Solution

The following procedure assumes that no other LVM actions has been performed and the current Volume Group configuration is a faithful reflection of the LVM state previous to the SAN physical topology change.

1. Disable LVM Volume Groups Boot-Time activation.

There is a text control file called /etc/lvmrc in which there is a variable called AUTO_VG_ACTIVATE, it must be change to 0 and the server reboted. This disable activation of volume groups, except /dev/vg00.

Reboot the system. When the system comes back, only /dev/vg00 will be enabled.

2. Create current volume group mapfiles and export the volume group.

You must use -s option in the vgexport command, to be sure that the VGID is incorporated into the mapfiles.

The following procedure examples how to perform the task. Here is an example for /dev/vgdb:

A. Create the mapfile using vgexport in preview mode.

# vgexport -p -s -m /vgdb.map /dev/vgdb

B. Verify that both VGID and logical volumes names are in the mapfile.

# cat /vgdb.map

C. Export the volume group.

# vgexport /dev/vgdb

Note that following the previous procedure creates the mapfile in preview mode, without exporting the volume group. Also verify that the mapfiles contains the VGID and the logical volume names and if it does, export the volume group. That must be done for each volume group.

3. Clean up the old device special files from /dev/*dsk/. You may use:

# ls -l /dev/*dsk/*

Check the device creation dates. All the new device special files will have the same date, the old ones, will have older dates.

4. Import the volume groups.

When all the old device special files are removed, use the standard import procedure to add the previously exported volume groups.

A. Create the volume group directory and set permissions.

# mkdir -m 755 /dev/<vgname>                                         

B. Create the group file with appropriate major and minor number. Remember that the minor number is a HEX number, volume group higher than 9 uses letters, as in 10 = 0A, 11=0B, etc.).

# mknod /dev/<vgname>/group c 64 0x[##]0000

C. Import the volume group using its respective mapfile.

 # vgimport -s -m /dev/<vgname>.map </dev/<vgname>

D. Enable volume group

# vgchange -a y <vgname>

E. If the volume group starts without problems, backup the volume group file to update its corresponding /etc/lvmconf/<vgname>.conf file.

# vgcfgbackup <vgname>

Repeat this procedure for each exported volume group.

5. Enable LVM Volume Groups Boot-Time activation

When all the volume groups are enabled, please edit back /etc/lvmrc text control file and set the AUTO_VG_ACTIVATE back to 1 and reboot. The boot script /sbin/bcheckrc will run fsck against all the file systems that don't have the clean umount flag during next system boot.

6. Remove stale (NO_HW) device tree.

After the volume groups contains the new physical volumes device special files, remove the NO_HW entries from the I/O Tree. They can be removed starting at the FCP branch, that will erase all the child entries of the branch. Use the rmsf -H command. To find the entries, I used:

# grep NO_HW ioscan.out | grep ^fcp | awk '{printf "rmsf -H %s\n", $3}'
rmsf -H 0/8/0/0.1
rmsf -H 1/2/0/0.1

This will ask if all the entries bellow should be removed to, they should answer yes.

Reference

Authors

This page was last modified on 3 August 2011, at 19:43. This page has been accessed 6,846 times.