1). After adding the Block Storage and assigning it to your VM in the Cloud Panel login to the server with SSH.
2). From here run fdisk -l to ensure the new drive shows (it should be sdb), if not reboot the server.
3). Run pvs to show your current volume group:
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a– <159.00g 0
4). Using the volume group name from the previous step run: vgdisplay centos | grep “PE Size”
PE Size 4.00 MiB
5). Run the command: pvcreate /dev/sdb
6). In referencing step 4, Run the command: vgcreate -s 4 new /dev/sdb
7). Run the command: vgmerge centos new
After running this pvs should now show the merged volumes:
PV VG Fmt Attr PSize PFree
/dev/sda2 centos lvm2 a– <499.47g 0
/dev/sdb centos lvm2 a– <499.97g <499.97g
8). You can now use: lvextend -L and resize2fs (ext4) or xfs_growfs (xfs) to resize your partitions.
I am so happy to read this. This is the type of manual that needs to be given and not the random misinformation that is at the other blogs. Appreciate your sharing this greatest doc.