In 2014 I reinstalled Linux on my solid state drive, but kept the old installation. Around 80 GB of the 120 GB drive were being used to just to keep this old installation around. The new installation used around 15 GB for / and around 18 GB for /home. This caused problems with my day to day use, as /home filled up very quickly. The quick solution was to use a hodgepodge of symlinks and config changes to move things to a hard drive. Still, I was constantly having to deal with low disk space notifications and occasionally failed downloads.
This weekend, I finally decided to fix this the proper way, by first making an archive image of the old installation, then deleting that 80 GB partition and moving my /home partition to the 80 GB space on the drive.
First, I used dd
to make an image of the old installation partition.
Then, with gparted
, I deleted the old installation partition.
My first plan was to simply create an ext4 partition to replace the old one, but then I realized I could use LVM for this. So I fired up a Linux Mint live usb, created an ~80 GB lvm partition (using gparted
), created a new logical volume on an ssd volume group (using lvcreate
), then copied the /home filesystem to the new logical volume (using dd
). At first I had been worried about moving the /home partition since each home directory is encrypted, and I wasn’t sure what mechanism was used to decrypt it. However, looking at /etc/fstab
there didn’t seem to be anything fancy going on. All I had to do was comment out the old line mounting /home and add:
/dev/lynx-ssd/home /home ext4 defaults 0 2
I rebooted the machine and everything worked flawlessly. Now I could delete the old /home partition and extend the / partition to take its place.