System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Volume group can't extend a lun

rescuehp17
Frequent Advisor

Volume group can't extend a lun

Hello, I am trying to extend a lun on a volume group but don't see the added space after extending. Current volume group size is 29Tb and I am trying to add 5.6TB. Volume group max size is set to 28T.

Before adding 5.6Tb lun:

(root) @/> vgdisplay -v vgtest
--- Volume groups ---
VG Name /dev/vgtest
VG Write Access read/write
VG Status available
Max LV 2047
Cur LV 1
Open LV 1
Cur Snapshot LV 0
Max PV 2048
Cur PV 4
Act PV 4
Max PE per PV 65536
VGDA 8
PE Size (Mbytes) 256
Unshare unit size (Kbytes) 1024
Total PE 114684
Alloc PE 114684
Current pre-allocated PE 0
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.2
VG Max Size 28t
VG Max Extents 114688
Cur Snapshot Capacity 0p
Max Snapshot Capacity 28t

--- Logical volumes ---
LV Name /dev/vgtest/lvtest
LV Status available/syncd
LV Size (Mbytes) 29359104
Current LE 114684
Allocated PE 114684
Used PV 4

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

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

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

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

(root) @/> diskinfo /dev/rdisk/disk323
SCSI describe of /dev/rdisk/disk323:
vendor: DGC
product id: CX4-120WDR5
type: direct access
size: 5662310400 Kbytes
bytes per sector: 512
(root) @/>

(root) @/> vgextend vgtest /dev/disk/disk323
Volume group "vgtest" has been successfully extended.
Volume Group configuration for /dev/vgtest has been saved in /etc/lvmconf/vgtest.conf
(root) @/>

(root) @/> vgdisplay -v vgtest
--- Volume groups ---
VG Name /dev/vgtest
VG Write Access read/write
VG Status available
Max LV 2047
Cur LV 1
Open LV 1
Cur Snapshot LV 0
Max PV 2048
Cur PV 5
Act PV 5
Max PE per PV 65536
VGDA 10
PE Size (Mbytes) 256
Unshare unit size (Kbytes) 1024
Total PE 114688
Alloc PE 114684
Current pre-allocated PE 0
Free PE 4
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.2
VG Max Size 28t
VG Max Extents 114688
Cur Snapshot Capacity 0p
Max Snapshot Capacity 28t

--- Logical volumes ---
LV Name /dev/vgtest/lvtest
LV Status available/syncd
LV Size (Mbytes) 29359104
Current LE 114684
Allocated PE 114684
Used PV 4

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

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

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

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

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

 (root) @/>

I don't see the size increased after I extended volume group. Any help is really appreciated.

Thank you!

3 REPLIES
Bill Hassell
Honored Contributor

Re: Volume group can't extend a lun

The size of the new LUN is only 4 extents:

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

Check with diskinfo, but it appears that it haasn't been setup correctly on the array.



Bill Hassell, sysadmin
Matti_Kurkela
Honored Contributor

Re: Volume group can't extend a lun

Before extension:

VG Max Size 28t
[...]
LV Name /dev/vgtest/lvtest
LV Status available/syncd
LV Size (Mbytes) 29359104

29359104 MiB = 28671 GiB = 27.999 TiB.

Also, before extension the total number of physical extents in the VG was 114684. After the extension:

Total PE 114688
VG Max Extents 114688

 You are definitely hitting the maximum size of the VG.

You even said it yourself:

> Current volume group size is 29Tb and I am trying to add 5.6TB. Volume group max size is set to 28T.

MK
Patrick Wallek
Honored Contributor

Re: Volume group can't extend a lun

You might be able to increase the maximum size of the VG with the vgmodify command.

 

To see if it will allow you to increase the size to 40 TB, which should be enough for your additional allocation, run:

# vgmodify -a -r -S 40t /dev/vgtest

 

If that command is successful and will allow you to increase the size, then run it again, but without the '-r' option:

# vgmodify -a -S 40t /dev/vgtest

 

(edited to include the VG name on the vgmodify command line.)