partitioning using 2 hard disks (SSD and non-SSD) in linux
On a hybrid solid-state and spinning disk system (like the one I'm typing this), you have two to three aims:
- Speed up your system: as much commonly used data as possible stays on the SSD.
- Keep volatile data off the SSD to reduce wear.
- Optional: have some level of redundancy by using an
md(4)
(‘software RAID’) setup across the SSD and HDD(s).
If you're just meeting the first two goals, it's a simple task of coming up with a scheme somewhat like this (depending on which of these filesystems you use):
- Solid state:
/
(root filesystem),/usr
,/usr/local
,/opt
- Spinning disk:
/var
,/home
,/tmp
, swap
Since you have two disks, though, you can read the Multi HDD/SSD article on the Debian wiki. It'll walk you through setting up md(4)
devices with your SSD as a ‘mostly-read’ device (fast reads, fewer writes), your HDD as a ‘mostly-write’ device (no-wear writes, fewer reads). The filesystems that would normally go on the SSD alone can now go on this md
device. The kernel will read mostly from the SSD (with occasional, brief forays into the HDD to increase read throughput even more). It'll write to the HDD, but handle SSD writes with care to avoid wearing out the device. You get the best of both worlds (almost), and you don't have to worry about SSD wear rendering your data useless.
My laptop is running on a similar layout where /
, /usr
and /usr/local
are on a RAID-1 device across a 64 GB SSD and a 64 GB partition on the 1TB HDD, and the rest of the filesystems are on the rest of the HDD. The rest of the HDD is one of two members of a RAID-1 setup, with one disk usually missing. When I'm at home, I plug in the second disk and let the md
device synchronise. It's an added level of redundancy and an extra 1–7 day backup¹).
You should also have a look at the basic SSD optimisation guide for Debian (and friends).
Oh, and it's not guaranteed you'll be able to do this all via the installer. You may have to boot a rescue disk prior to installation, prepare (at least) the md(4)
devices (I do the LVM PVs, VGs and LVs too because it's easier on the CLI), then boot the installer and just point out the volumes to it.
¹ RAID ≠ backup policy. I also have proper backups.