When you run out of disk space, you can either clean up your harddrive or migrate to a bigger one. On a physical machine, you'll have to buy a bigger harddrive. On a virtual machine, you can create a new virtual disk and migrate to that.

The migration Edit

Insert new disk Edit

The first step is to insert the new disk you want to migrate to, whether it's a physical or virtual disk.

Migrate data Edit

This can be done fairly easily regardless of OS on the disk. You do this on e.g. an Ubuntu or Finnix live CD. First you need to know which devices to copy from and to:

fdisk -l

Then to copy the data:

dd if=/dev/sda of=/dev/sdb

After the migration the partition will be the same size as on the original disk, since it's an exact copy. So we need to expand it.

Expand the partition Edit

Ubuntu live CD Edit

If you're on the Ubuntu live CD, you can use gparted, which can expand ext3, ext4 and NTFS filesystems among others. Just open gparted, choose the right disk, right-click the partition and choose resize.