Tag: hdd

  • How to increase HDD size for a VM

    Quick step by step guide on how to increase HDD size for a VM

    Steps required are,
    1. To increase the hard drive space, first increase the hard drive size in VMWare.
    2. Execute below commands to first recognize the partition
    # /sbin/fdisk /dev/sda
    p
    n, p, enter # select partition number
    enter
    p # to verify new partition
    w
    # reboot

    3. Add the new partition to total partition to increase the disk space
    # /sbin/pvcreate /dev/sda3 # Modify sda3 to the last sda
    # /sbin/vgdisplay | /usr/bin/head # Check the VG Name, and LV Name which we are going to extend
    # /sbin/vgextend vg_centos /dev/sda3 # Modify sda3 to the last sdan
    # /sbin/lvdisplay
    # /sbin/lvextend /dev/vg_centos/lv_root /dev/sda3 # Modify sda3 to the last sdan
    # /sbin/resize2fs /dev/vg_centos/lv_root
    # reboot

    4. You should now see increased disk space
    # df -h

    Steps have been adapted from
    http://www.bluhm-de.com/increase-centos-6.2-hard-drive-space-/-partition