HOW TO INCREASE SPACE IN A VOLUME GROUP AND LOGICAL VOLUME
1.-)If you are using multipath, you can run the command below in order to know what are the devices mapped
#multipath -ll
mpathd (360060e80139cfc0050209cfc00000802) dm-2 STORAGE
size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:2 sdd 8:48 active ready running
`- 12:0:0:2 sdg 8:96 active ready running
mpathc (360060e80139cfc0050209cfc00000801) dm-4 STORAGE
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:1 sdc 8:32 active ready running
`- 12:0:0:1 sdf 8:80 active ready running
mpathb (360060e80139cfc0050209cfc00000800) dm-3 STORAGE
size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:0 sdb 8:16 active ready running
`- 12:0:0:0 sde 8:64 active ready running
As you see, you can check with this command, what devices are being used, in our case mpathb,mpathc and mpathd
2) Now you can rescan the controllers in order to detect new or news devices allocated in the server
#/usr/bin/rescan-scsi-bus.sh
2 new or changed device(s) found. (Why because you are using multipathing and it is detected by two paths)
In our case we added one LUN to the server to increase a VG01
3) Now you can validate that you have a new devices allocated in the server after rescaning
#multipath -ll
mpathe (360060e80139cfc0050209cfc000009cf) dm-15 STORAGE
size=200G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:3 sdh 8:112 active ready running
`- 12:0:0:3 sdi 8:128 active ready running
mpathd (360060e80139cfc0050209cfc00000802) dm-2 STORAGE
size=650G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:2 sdd 8:48 active ready running
`- 12:0:0:2 sdg 8:96 active ready running
mpathc (360060e80139cfc0050209cfc00000801) dm-4 STORAGE
size=500G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:1 sdc 8:32 active ready running
`- 12:0:0:1 sdf 8:80 active ready running
mpathb (360060e80139cfc0050209cfc00000800) dm-3 STORAGE
size=400G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 11:0:0:0 sdb 8:16 active ready running
`- 12:0:0:0 sde 8:64 active ready running
As you see, you have a new device from 200 GB
4) Create a Physical Volume
#pvcreate /dev/mapper/mpathe
5) Increase the Volume Group in our case vg01
#vgextend vg01 /dev/mapper/mpathe
Validate with vgdisplay the extends free
#vgdisplay vg01
.
.
.
Total PE 217598
Alloc PE / Size 217598 / 849.99 GiB
Free PE / Size 54270 / 200 GiB
You have 54270 physical extends Free
Now you can increase the logical volume without use the resizefs in our case home directory
#lvextend -l +54270 -r /dev/mapper/vg01-home
-l = Extends Free
-r = Resize
Confirm that space was increased
#df -h
Comments