First, if you used the whole 250GB disk for your current installation, you'll need to shrink it to fit the 120GB disk. You can only shrink an ext4 filesystem while it's unmounted, so you'll need to boot off an Ubuntu live system (CD or USB), or a specialized maintenance live system such as GParted live. You can use
resize2fs or GParted to resize the existing filesystem.
Once you've shrunk the filesystem(s) of your existing installation to fit on the new disk, you can do the rest of the move with the filesystem mounted if you like. If the existing filesystem fits on the new disk, you can do the transfer without unmounting anything or rebooting.
In the following description, I'll show how to move from the physical volume
/dev/sdb1 to the physical volume
/dev/sda1, with an existing volume group called
oldvg. Be sure to adjust the disk letters and partition numbers to match your system.
To do a live transfer:
- Partition the new disk, using the partitioning tool of your choice (
parted, …). See e.g. How do I add an additional hard drive?
- Create a physical volume on the new disk:
- Add this physical volume to the existing volume group containing the logical volume(s) you want to move:
vgextend oldvg /dev/sda1
- Move the logical volumes from one physical volume to another:
pvmove /dev/sdb1 /dev/sda1
- Split the existing volume group in two:
vgsplit oldvg newvg /dev/sda1
Another method is to make the existing logical volume(s) a mirror volume with
lvconvert --mirror, set up a mirror on the new disk, then split the mirrors with
lvconvert --splitmirrors. This way, you end up with two copies of your data, and after the split each copy leads its own life.
After you've done the copy, you'll need to make the new disk bootable. Mount the filesystem for this. Assuming it's mounted on
/mnt, run these commands as root:
# if the name of the volume group has changed, edit /etc/fstab
Alternatively, you might be able to use Clonezilla. This is a powerful disk manipulation and cloning tool, and I think it covers your situation, but I have no experience with it.