To manually create the heap dump partition, use the following steps:
- Edit HMS VM settings (it can be done while the VM is running) - enlarge second disk with 4GB from 13 to 17 GB.
- Open HMS VM and make sure that /dev/sdb partition is enlarged. This could not happen immediately but could take up to several minutes for the OS to detect the changes. To do so you can use /fdisk -l and look for /dev/sdb - the size should be the new one (17GB). If it is not just wait a bit and re-run the command until you see the new size.
- Once the OS has detected the physical disk size change and enlarges the partition (verified at step 3) we have to enlarge the physical volume using the command:
pvresize /dev/sdb
- Verify new physical volume size using the command:
pvs
You should see the new size in PSize and PFree should be the size of the extention space which is currently free on the physical volume.
- Verify the volume group support_vg is also enlarged along with the underlying physical volume with the command:
vgs
You should see the new size in VSize and VFre should be the size of the extention space which is currently free on the volume group.
If this is not the case try re-scanning the physical volume and volume groups by running the following commands:
pvscan
vgscan
Then run the vgs command again to verify the size of support_vg volume group as explained above.
- Create a new logical volume named heapdump with size 4GB:
lvcreate -L 4G -n heapdump support_vg
- Verify that logical volume is created using the following command:
lvscan
Verify heapdump volume is ACTIVE and verify its size. More info about the new logical volume can be seen. If you run the command:
lvdisplay
- Format the newly created logical volume:
mkfs.ext3 /dev/support_vg/heapdump
- Mount the newly created logical volume to the heapdump directory:
sudo mount /dev/support_vg/heapdump /opt/vmware/heapdump
- Update fstab file so that mounting the new partition will be done automatically after reboot:
- Backup file use the command:
cp /etc/fstab /etc/fstab.old
- Add the following line at the end in /etc/fstab:
/dev/support_vg/heapdump /opt/vmware/heapdump ext3 rw,nosuid,nodev,exec,auto,nouser,async 0 1