Tag Archives: azure

Resize HortonWorks Sandbox Disk Size

Hortonworks

I’ve created a HortonWorks HDP Sandbox on Azure for testing.

The initial OS disk size is about 48GB, which is too small to hold my files in HDFS for testing.

I find out a way to extend the OS disk to simply increase the HDFS capacity.

References:

1: https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1006371

2: https://community.hortonworks.com/content/kbentry/1620/how-to-increase-sandbox-disk-space-virtualbox.html

Steps:

Basically it’s create a new LVM partition then add this partition to existing LVM  OS logic volume group.

  1. Attache a disk in Azure portal to the HDP virtual machine.
  2. Create new partition (/dev/sdc1) on that disk (/dev/sdc) and assign partition id ‘8e’, which is LVM partition.
  3. Use ‘vgdisplay’ to find volume group name, it’s ;vg_sandbox’ on HortonWorks sandbox.
  4. Use ‘vgextend’ to extend ‘vg_sandbox’ with the newly created ‘/dev/sda3’.
  5. Use ‘lvdisplay’ to find logical volume name, it’s “lv_root”, path is ‘/dev/vg_sandbox/lv_root’.
  6. Use ‘lvextend –L +xxxG /dev/vg_sandbox/lv_root’ to extend size of the logical volume. xxxG is the free space in volumn group ‘vg_sandbox’, which can be find using vgdisplay.
  7. Use ‘resize2fs /dev/vg_sandbox/lv_root’ to resize the partition online, this step takes some time.