Advertisements

HP-UX: Disk added to Volume Group but showing different Total PE and Free PE than expected

After I added a disk to LVM

root@hpux:~ # pvcreate /dev/rdisk/disk670
Physical volume “/dev/rdisk/disk670” has been successfully created.

Disk added but it shows wrong total and free PE

root@hpux:~ # vgextend -g pvgLP0data vgLP0data /dev/disk/disk670
Volume group “vgLP0data” has been successfully extended.
Volume Group configuration for /dev/vgLP0data has been saved in /etc/lvmconf/vgLP0data.conf
vlunx045:/root# vgdisplay -v vgLP0data
— Volume groups —
VG Name /dev/vgLP0data
VG Write Access read/write
VG Status available, exclusive
Max LV 2047
Cur LV 8
Open LV 8
Cur Snapshot LV 0
Max PV 2048
Cur PV 8
Act PV 8
Max PE per PV 447994
VGDA 16
PE Size (Mbytes) 32
Unshare unit size (Kbytes) 1024
Total PE 447994
Alloc PE 447986
Current pre-allocated PE 0
Free PE 8
Total PVG 1
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.2
VG Max Size 14335819m
VG Max Extents 447994
Cur Snapshot Capacity 0p
Max Snapshot Capacity 14335819m

— Logical volumes —
LV Name /dev/vgLP0data/lvsapdata1
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata2
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata3
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata4
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata5
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata6
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata7
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata8
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0

— Physical volumes —
PV Name /dev/disk/disk949
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk950
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk951
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk952
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk953
PV Status available
Total PE 63999
Free PE 2
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk954
PV Status available
Total PE 63999
Free PE 2
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk955
PV Status available
Total PE 63999
Free PE 3
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk670
PV Status available
Total PE 1
Free PE 1
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

— Physical volume groups —
PVG Name pvgLP0data
PV Name /dev/disk/disk949
PV Name /dev/disk/disk950
PV Name /dev/disk/disk951
PV Name /dev/disk/disk952
PV Name /dev/disk/disk953
PV Name /dev/disk/disk954
PV Name /dev/disk/disk955
PV Name /dev/disk/disk670

We need to change VG Max Size. But first, let’s remove the disk from the volume group

root@hpux:~ # vgreduce vgLP0data /dev/disk/disk670
Physical volume “/dev/disk/disk670” has been successfully deleted from
physical volume group “pvgLP0data”.
Volume group “vgLP0data” has been successfully reduced.
Volume Group configuration for /dev/vgLP0data has been saved in /etc/lvmconf/vgLP0data.conf

Then run vgmodify to change the VG Max Size for the volume group. This volume group version is 2.2 so we use the following options:

root@hpux:~ # vgmodify -r -a -S 20t vgLP0data
Reconfiguration of physical volume “/dev/disk/disk949” for the
requested maximum volume group size 20971520 MB succeeded.
Previous number of extents: 63999
Number of extents after reconfiguration: 63999
Physical volume “/dev/disk/disk949” was changed.

Volume Group configuration for /dev/vgLP0data has been saved.

Reconfiguration of physical volume “/dev/disk/disk950” for the
requested maximum volume group size 20971520 MB succeeded.
Previous number of extents: 63999
Number of extents after reconfiguration: 63999
Physical volume “/dev/disk/disk950” was changed.

Volume Group configuration for /dev/vgLP0data has been saved.

Reconfiguration of physical volume “/dev/disk/disk951” for the
requested maximum volume group size 20971520 MB succeeded.
Previous number of extents: 63999
Number of extents after reconfiguration: 63999
Physical volume “/dev/disk/disk951” was changed.

Volume Group configuration for /dev/vgLP0data has been saved.

Reconfiguration of physical volume “/dev/disk/disk952” for the
requested maximum volume group size 20971520 MB succeeded.
Previous number of extents: 63999
Number of extents after reconfiguration: 63999
Physical volume “/dev/disk/disk952” was changed.

Volume Group configuration for /dev/vgLP0data has been saved.

Reconfiguration of physical volume “/dev/disk/disk953” for the
requested maximum volume group size 20971520 MB succeeded.
Previous number of extents: 63999
Number of extents after reconfiguration: 63999
Physical volume “/dev/disk/disk953” was changed.

Volume Group configuration for /dev/vgLP0data has been saved.

Reconfiguration of physical volume “/dev/disk/disk954” for the
requested maximum volume group size 20971520 MB succeeded.
Previous number of extents: 63999
Number of extents after reconfiguration: 63999
Physical volume “/dev/disk/disk954” was changed.

Volume Group configuration for /dev/vgLP0data has been saved.

Add the disk back and it will show the correct Total PE and Free PE

root@hpux:~ # vgextend -g pvgLP0data vgLP0data /dev/disk/disk670
Volume group “vgLP0data” has been successfully extended.
Physical volume group “pvgLP0data” has been successfully extended.
Volume Group configuration for /dev/vgLP0data has been saved in /etc/lvmconf/vgLP0data.conf

root@hpux:~ # vgdisplay -v vgLP0data
— Volume groups —
VG Name /dev/vgLP0data
VG Write Access read/write
VG Status available, exclusive
Max LV 2047
Cur LV 8
Open LV 8
Cur Snapshot LV 0
Max PV 2048
Cur PV 8
Act PV 8
Max PE per PV 524288
VGDA 16
PE Size (Mbytes) 32
Unshare unit size (Kbytes) 1024
Total PE 511992
Alloc PE 447986
Current pre-allocated PE 0
Free PE 64006
Total PVG 1
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.2
VG Max Size 20t
VG Max Extents 655360
Cur Snapshot Capacity 0p
Max Snapshot Capacity 20t

— Logical volumes —
LV Name /dev/vgLP0data/lvsapdata1
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata2
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata3
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata4
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata5
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata6
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata7
LV Status available/syncd
LV Size (Mbytes) 2047936
Current LE 63998
Allocated PE 63998
Used PV 7

LV Name /dev/vgLP0data/lvsapdata8
LV Status available/syncd
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Used PV 0

— Physical volumes —
PV Name /dev/disk/disk949
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk950
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk951
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk952
PV Status available
Total PE 63999
Free PE 0
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk953
PV Status available
Total PE 63999
Free PE 2
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk954
PV Status available
Total PE 63999
Free PE 2
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk955
PV Status available
Total PE 63999
Free PE 3
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

PV Name /dev/disk/disk670
PV Status available
Total PE 63999
Free PE 63999
Current pre-allocated PE 0
Autoswitch On
Proactive Polling On

— Physical volume groups —
PVG Name pvgLP0data
PV Name /dev/disk/disk949
PV Name /dev/disk/disk950
PV Name /dev/disk/disk951
PV Name /dev/disk/disk952
PV Name /dev/disk/disk953
PV Name /dev/disk/disk954
PV Name /dev/disk/disk955
PV Name /dev/disk/disk670

Advertisements
%d bloggers like this: