Ubuntu – Setting up lvm with HDD and SSD

hard drivelvmpartitioningssd

My current hard drive is just about full and rather than just toss it and get a new one (since it works fine), I want to get a new drive and set them both up using lvm. While I'm at it, I also want to get an SSD to install the OS and applications on. This is my plan:

  • Put / on the SSD (one partition)
  • Put /tmp on a ram disk
  • Put /var on a partition on my new drive
  • Put /home on the rest of the new drive and my current drive using lvm.

My goals are:

  • Speed up boot time and application launch
  • Minimize unnecessary writes to the SSD
  • Never have to worry about which disk/partition to store my files on. I want the OS & lvm to take care of that

Does this make sense? I'm fairly experienced with Ubuntu but I've never dealt with lvm before.

Best Answer

I think your plan is OK but while you are at it, why don't you put the /var on a Logical Volume too instead of a separate partiton on your new drive? I find lvm a lot more flexible than regular partitions. My main machine is all using lvm, including / without any problem and very quick to resize/reconfigure Logical Volumes.

To use your current HD with lvm, you'll need to empty and format it. One way to do that is to put the new drive as a device in the Volume Group, move your current home to it, format the current HD and add it to the VG.