msgbartop
Tips and Tricks site for advanced HP-UX Engineers
msgbarbottom

27 Jan 14 Fixing an inconsistent volume group with no downtime

I recently encountered a volume group that was part legacy devices, part dsf agile.
root@protterdbsvr1:/root/shuffle> vgdisplay -v vgprotter
--- Volume groups ---
VG Name                     /dev/vgprotter
VG Write Access             read/write
VG Status                   available
Max LV                      2047
Cur LV                      15
Open LV                     15
Cur Snapshot LV             0
Max PV                      2048
Cur PV                      11
Act PV                      11
Max PE per PV               65536
VGDA                        22
PE Size (Mbytes)            16
Unshare unit size (Kbytes)  1024
Total PE                    48004
Alloc PE                    46765
Current pre-allocated PE    0
Free PE                     1239
Total PVG                   0
Total Spare PVs             0
Total Spare PVs in use      0
VG Version                  2.2
VG Max Size                 1t
VG Max Extents              65536
Cur Snapshot Capacity       0p
Max Snapshot Capacity       1t
   --- Logical volumes ---
   LV Name                     /dev/vgprotter/sqlbin
   LV Status                   available/syncd
   LV Size (Mbytes)            20000
   Current LE                  1250
   Allocated PE                1250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqladmin
   LV Status                   available/syncd
   LV Size (Mbytes)            4000
   Current LE                  250
   Allocated PE                250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlctrl1
   LV Status                   available/syncd
   LV Size (Mbytes)            512
   Current LE                  32
   Allocated PE                32
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlctrl2
   LV Status                   available/syncd
   LV Size (Mbytes)            512
   Current LE                  32
   Allocated PE                32
   Used PV                     1
   LV Name                     /dev/vgprotter/sqldata1
   LV Status                   available/syncd
   LV Size (Mbytes)            550000
   Current LE                  34375
   Allocated PE                34375
   Used PV                     10
   LV Name                     /dev/vgprotter/sqldiag
   LV Status                   available/syncd
   LV Size (Mbytes)            4000
   Current LE                  250
   Allocated PE                250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlexport
   LV Status                   available/syncd
   LV Size (Mbytes)            70000
   Current LE                  4375
   Allocated PE                4375
   Used PV                     5
   LV Name                     /dev/vgprotter/sqlindex1
   LV Status                   available/syncd
   LV Size (Mbytes)            30000
   Current LE                  1875
   Allocated PE                1875
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlredo1
   LV Status                   available/syncd
   LV Size (Mbytes)            10000
   Current LE                  625
   Allocated PE                625
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlredo2
   LV Status                   available/syncd
   LV Size (Mbytes)            10000
   Current LE                  625
   Allocated PE                625
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlsystem
   LV Status                   available/syncd
   LV Size (Mbytes)            7200
   Current LE                  450
   Allocated PE                450
   Used PV                     1
   LV Name                     /dev/vgprotter/sqltemp
   LV Status                   available/syncd
   LV Size (Mbytes)            20000
   Current LE                  1250
   Allocated PE                1250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqltools
   LV Status                   available/syncd
   LV Size (Mbytes)            1008
   Current LE                  63
   Allocated PE                63
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlundo
   LV Status                   available/syncd
   LV Size (Mbytes)            20000
   Current LE                  1250
   Allocated PE                1250
   Used PV                     1
   LV Name                     /dev/vgprotter/sqlusers
   LV Status                   available/syncd
   LV Size (Mbytes)            1008
   Current LE                  63
   Allocated PE                63
   Used PV                     1
 
   --- Physical volumes ---
   PV Name                     /dev/dsk/c3t1d6
   PV Name                     /dev/dsk/c5t1d6  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t1d7
   PV Name                     /dev/dsk/c5t1d7  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t2d0
   PV Name                     /dev/dsk/c5t2d0  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t2d1
   PV Name                     /dev/dsk/c5t2d1  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/dsk/c3t2d2
   PV Name                     /dev/dsk/c5t2d2  Alternate Link
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk220
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk221
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk222
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk223
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk224
   PV Status                   available
   Total PE                    4364
   Free PE                     0
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On
   PV Name                     /dev/disk/disk225
   PV Status                   available
   Total PE                    4364
   Free PE                     1239
   Current pre-allocated PE    0
   Autoswitch                  On
   Proactive Polling           On

The issue is that two different technologies, alternate link and native multipathing are in use in the same volume group.

The volume group was working but might have maintenance issues down the road. Plus I personally found it darn confusing.
  PV Name                     /dev/dsk/c3t2d2
   PV Name                     /dev/dsk/c5t2d2  Alternate Link
 
The fix:
vgextend vgprotter /dev/disk/disk53
echo $?
0
vgreduce vgprotter /dev/dsk/c3t2d2
echo $?
0
vgreduce vgprotter /dev/dsk/c5t2d2
echo $?
0
We check the return code to make sure the operation was a success. Repeat for each legacy device.
No downtime though for prodcution systems I recommend working with a change request under your organizations policy.

What id looks like after we are done:

root@
protterdbsvr1:/root> vgdisplay -v vgprotter
--- Volume groups ---
VG Name /dev/vgprotter
VG Write Access read/write
VG Status available
Max LV 2047
Cur LV 15
Open LV 15
Cur Snapshot LV 0
Max PV 2048
Cur PV 11
Act PV 11
Max PE per PV 65536
VGDA 22
PE Size (Mbytes) 16
Unshare unit size (Kbytes) 1024
Total PE 48004
Alloc PE 46765
Current pre-allocated PE 0
Free PE 1239
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.2
VG Max Size 1t
VG Max Extents 65536
Cur Snapshot Capacity 0p
Max Snapshot Capacity 1t
--- Logical volumes ---
LV Name /dev/vgprotter/sqlbin
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 1250
Allocated PE 1250
Used PV 1
LV Name /dev/vgprotter/sqladmin
LV Status available/syncd
LV Size (Mbytes) 4000
Current LE 250
Allocated PE 250
Used PV 1
LV Name /dev/vgprotter/sqlctrl1
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 32
Used PV 1
LV Name /dev/vgprotter/sqlctrl2
LV Status available/syncd
LV Size (Mbytes) 512
Current LE 32
Allocated PE 32
Used PV 1
LV Name /dev/vgprotter/sqldata1
LV Status available/syncd
LV Size (Mbytes) 550000
Current LE 34375
Allocated PE 34375
Used PV 10
LV Name /dev/vgprotter/sqldiag
LV Status available/syncd
LV Size (Mbytes) 4000
Current LE 250
Allocated PE 250
Used PV 1
LV Name /dev/vgprotter/sqlexport
LV Status available/syncd
LV Size (Mbytes) 70000
Current LE 4375
Allocated PE 4375
Used PV 5
LV Name /dev/vgprotter/sqlindex1
LV Status available/syncd
LV Size (Mbytes) 30000
Current LE 1875
Allocated PE 1875
Used PV 1
LV Name /dev/vgprotter/sqlredo1
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 625
Used PV 1
LV Name /dev/vgprotter/sqlredo2
LV Status available/syncd
LV Size (Mbytes) 10000
Current LE 625
Allocated PE 625
Used PV 1
LV Name /dev/vgprotter/sqlsystem
LV Status available/syncd
LV Size (Mbytes) 7200
Current LE 450
Allocated PE 450
Used PV 1
LV Name /dev/vgprotter/sqltemp
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 1250
Allocated PE 1250
Used PV 1
LV Name /dev/vgprotter/sqltools
LV Status available/syncd
LV Size (Mbytes) 1008
Current LE 63
Allocated PE 63
Used PV 1
LV Name /dev/vgprotter/sqlundo
LV Status available/syncd
LV Size (Mbytes) 20000
Current LE 1250
Allocated PE 1250
Used PV 1
LV Name /dev/vgprotter/sqlusers
LV Status available/syncd
LV Size (Mbytes) 1008
Current LE 63
Allocated PE 63
Used PV 1
 
--- Physical volumes ---
PV Name /dev/disk/disk220
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk221
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk222
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk223
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk224
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk225
PV Status available
Total PE 4364
Free PE 1239
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk57
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk56
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk55
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk54
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On
PV Name /dev/disk/disk53
PV Status available
Total PE 4364
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

Tags: , , , , ,

sidebarbottom
sidebartop
sidebarbottom
WhatsApp chat