Creating a new partition

/sbin/fdisk /dev/hda

In fdisk, to create a new partition, type n and follow the prompts, use the w command to write the changes to the partition table when complete.

Restart the virtual machine & create a file system on the new partition:

/sbin/mkfs -t ext3 /dev/hda3
mkdir /mnt/data
mount /dev/hda3 /mnt/data

Edit: /etc/fstab:

/dev/hda3 /mnt/data ext3 defaults 0 0

Source: download.parrallels.com

Moving a directory into a new partition

mkdir /mnt/newhome
mount -t ext3 /dev/hda5 /mnt/newhome
cd /home/
find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/
umount /mnt/newhome
mv /home /old_home
mkdir /home
mount /dev/hda5 /home

Source: embraceubuntu.com

 

Expand the filesystem

lvextend -L +2G /dev/basevg/opt
resize2fs /dev/basevg/opt
df -m