Description:
The task here is simply to raise the zize of a data volume attached to a VMWare virtual machine.
Steps:
1. Stop the instance that is attached to the volume to be expanded.
2. Create a snapshot of the volume.
3. Create a new volume from the snapshot. There you have the possibility to raise the size of the volume.
4. Detach the old volume.
5. Attach the expanded volume.
6. Restart the VM instance.
7. Use the resize2fs command to resize the file system to the new size of the volume
If the data volume is already of LVM type then the following steps apply:
1. Expand Volume in VMWare interface
2. Restart VM instance
3. Create new partition with cfdisk as lvm (8e) -> cfdisk /dev/sdb (choose available Space and as Typ 8E LVM)
4. Add Partition to Volumegroup with vgextend -> vgextend {VGROUPNAME]} /dev/sdb1 (you can list all VGROUPs with vgdisplay)
5. Set new Size of mount with lvextend -> lvextend -L10GB /dev/{VGROUPNAME}/{VOLUME} (-L10G is the target size, list all Logical volumes with lvdisplay
6. Use the resize2fs command to resize the file system to the new size of the volume -> resize2fs /dev/{VGROUPNAME}/{VOLUME}