You are on page 1of 1

Expanding HDD for VM

I Adding new HDD:


1. Press Edit Virtual Machine Settings
2. Press ADD...
3. Choose Hard Disk and Next>
4. Leave it as it is SCSI then Next>
5. Leave it as it is Create a new virtual disk then Next>
6. Specify Max disk size you need and choose Store virtual disk as a single file then Next>
7. Specify name of a virtual disk and press finish.
8. Leave virtual machine settings by pressing OK.

II Power on machine
III Connect to UNL using Putty or SCP
1. Check letter which assigned for new disk
fdisk -l | grep “contain a valid partition table”
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/mapper/rootvg-rootvol doesn't contain a valid partition table
Disk /dev/mapper/rootvg-swapvol doesn't contain a valid partition table
The letter is “b”, so the new added disk is /dev/sdb

2. Let's configure it for VM and expand the volume group


echo -e “n\np\n1\n\n\n\t\n8e\nw\n” | fdisk /dev/sdb > /dev/null

3. Creating a new disk


pvcreate /dev/sdb1

4. Extending volume group and resizing


vgextend rootvg /dev/null
lvextend -L +100G /dev/rootvg/rootvol
resize2fs /dev/rootvg/rootvol

5. Verify
df -h

Notice: If step 2 and 3 won't work in Putty or SCP use VM terminal window

You might also like