combining SSD and hard disk in software RAID1?

Does it make sense to build a Linux software RAID-1 (mirroring) using an SSD and a normal hard disk? I want to combine the advantages of SSD (fast transfer rates, fast access times) with the advantages of hard disks (cheap, different fault model) and get a very fast yet reliable RAID...

  • does this actually make sense?
  • is the SSD performance actually available in such a mixed setup? I.e. does Linux mainly use SSD for reading, or will it use the slow disk equally much?

Solution 1:

Looks like this setup is quite ok. The basic rule is to use mdadm with --write-mostly parameter so that writes go to HDD. Reading will still be done from fast SSD. Also, the --write-behind parameter is said to improve write performance.

Support for TRIM command in such a setup appears to be a problem, though.

Further keywords for searching:

  • linux ssd raid hybrid
  • mdadm "--write-mostly" ssd

Further links:

  • http://www.tansi.org/hybrid/ ("Hybrid HDD + SSD RAID1")
  • http://linuxwiki.de/SSD (overview, hints; in German)
  • http://marc.info/?l=linux-raid&m=126496930530289&w=2 ("SSD & mechanical disc in RAID 1")

Solution 2:

The raid software will likely distribute the reads across the disks*. Given the read speed on the SSD is likely to be more than twice as fast as the slow disk, I would assume that you'd actually lose performance.

By your comment on fault model, I assume that you're concerned about the "wear out" rates of SSDs. Modern controllers use sophisticated wear levelling, so as long as you have a fair amount of free space on the drive mass amounts of writing isn't going to kill the drive any time soon.

*Edit: According to the answer at What advantages and disadvantages have Hybrid SSD/HDD RAIDs, it seems there are raid controllers/software that will intelligently bias the reads towards the SSD, so you won't lose performance by raiding it.