Increase Disk Size And Volume In VMware Linux Server
APPLIES TO : Linux VM running in VMware virtualization platform
ISSUE : Linux volume running our of space.
GOAL : Increase the disk size and increase the volume size in Linux without adding new disk to VG
SOLUTION : Increase the disk size in VMware settings, scan the disk and resize the volume.
Prerequisites : NA
The server is having 35GB disk in VG01.
In Linux OS the disk size:
[root@test ~]# fdisk -l|grep -i "/dev/sd"
[root@test ~]# pvdisplay
Increase the disk size in VMware settings:Scan the disk:
[root@test ~]# ls /sys/class/scsi_disk/
0:0:0:0 0:0:1:0
[root@test ~]#
[root@test ~]# echo "1" > /sys/class/scsi_disk/0:0:1:0/device/rescan
The disk size is increased:
[root@test ~]# fdisk -l|grep -i "/dev/sd"
pvresize command will bring the disk space in VG:
[root@test ~]# pvresize /dev/sdb
[root@test ~]# pvdisplay
Free space is available in VG and you can increase the volume size:
[root@test ~]# lvextend -r -L+10GB /dev/mapper/vg01-test
[root@test ~]# df -h /test
OR
lvextend -r -l +4608(Free PE) /dev/mapper/vg01-test - This will extend the complete free space to volume