Ubuntu – Optimize small SSD for ubuntu

hard drivemountpartitioningssd

The issue is basically this – where should I mount SSD and where should I mount the HDD if what I want is the system to be installed on the SSD, but new software installed through apt-get and such will be installed on the HDD.

Assuming this setup is possible of course.

This answer suggests moving parts to the HDD is possible but does not specify how.

My specific case is I've installed ubuntu on a multiboot machine, mounting a 10GB ssd partition on root(may be a bit too small in retrospect), and HDD on /home. But it seems I'm filling up the ssd partition quicker than I wanted as everything seems to be installed there.

This question is on the same topic but does not mention where applications are typically installed and does not suggest where to mount HDD for new applications to be installed there.

Best Answer

When you set up your Ubuntu installation, you mentioned that you placed the root directory (/) on the SSD, and the home directory (/home) on the HDD. This is a good start. I actually recommend placing root on your SSD, as well as home, and then create a directory such as /mnt/data which is where you would put all of the data you wanted on your HDD. With this setup, I can easily symlink stuff on the HDD to my SSD, such as video games and movies, while keeping my system as fast as possible.

I'm not quite sure why you want what you're asking for, as I'd personally want system stuff to be on the SSD to increase speed, while putting my less-important stuff on the HDD, however you can accomplish this much like how you set up your installation in the first place.

Instead of placing the home directory on the HDD, you could mount /usr/bin or even /usr. This is the typical place you'd find apt installing binaries.

Before you take the time to do this, I'd highly recommend using baobab or something like it to figure out 100% where you're losing space.

If you'd like to separate both /home and /usr, you'd just have to split the HDD into two separate partitions.

Other Ideas

As Barafu Albino added:

  • Use apt-get clean regularly to remove unneeded packages and apt downloads
  • Think about using BTRFS with high compression as your filesystem
  • Refrain from multilib and debug (dbg) packages

Edit

10GB is probably very small for a desktop computer. The only time I've seen something that small is when someone really breaks out all of the other mount points onto HDDs and stuff (maybe 20 ys ago) or on an embeded machine or something like a raspberry pi.