combining SSD and hard disk in software RAID1?

26

3

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?

oliver

Posted 2011-06-05T10:36:47.810

Reputation: 430

Possible duplicate of Use the speed of an SSD + two HDD in RAID 1

– phuclv – 2018-08-17T16:39:43.877

see also; http://superuser.com/questions/242812/hybrid-ssd-hdd-raid

– RJFalconer – 2011-06-05T10:59:21.550

Answers

15

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:

oliver

Posted 2011-06-05T10:36:47.810

Reputation: 430

2+1. But remember that --write-behind is not safe, and because it needs a write-intent bitmap file external to the array it complicates setup and I wouldn't recommend it. --write-mostly is fine. – Tometzky – 2013-11-09T11:47:50.260

4

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.

RJFalconer

Posted 2011-06-05T10:36:47.810

Reputation: 9 791

1Thanks for the link. Also, "hybrid" is exactly the keyword whuch turns up more information in google - thanks a lot! – oliver – 2011-06-05T12:49:09.843

2Regarding wear leveling: It's true that it's unlikely to lose data on SSD due to "wear out" of flash blocks. However the controller and wear-leveling data itself is a single point of failure. Just assume your SSD controller board dies; you will likely be unable to recover any data even if it's physically still there. So SSD wear-leveling does not replace real mirroring. – SkyBeam – 2011-06-05T13:22:47.030