Crazy idea: booting off of md-raid mirror, but it's NVMe + USB 2.0 flash (maybe USB 3)

Gidday, mates!

I might’ve had a few too many glasses of funny juice, tonight. However, i think those got my creative mojos going.

WHAT IF? I’d install a Linux server (let’s say Ubuntu 20.04 LTS) on an md-mirror, but the physical member devices are an intel DC P3700 NVMe SSD, and a USB 2.0 stick. Two very dissimilar devices, with orders of magnitudes of throughput capability between them.

Quick reminder: USB 2.0 is 480 MegaBIT/s without the protocol overhead - and i don’t see many (any, really) being advertised with UASP support. That fancy P3700 does at least 1 GigaBYTE/s in either direction.

I don’t want to focus too much on my current hardware, but a DC P3700 (400gig) is what i’d use for such a scenario. 32gig are plenty for /boot, /boot/EFI, and root. The remainder of the NVMe would be partitioned for ZFS caching.

  1. How could this possibly fail?
  2. Who’s tested such a scenario?
  3. Would the mirror/array de-sync, because of the orders of magnitudes of difference in throughput?
  4. Do Linux MD mirrors actually de-sync, requiring a full resilver - like, ALL THE TIME?

I’m afraid of the de-syncing issue, because i didn’t test Linux md-RAID with very dissimilar array members, yet. However, one of my previous (overly cost-conscious) micro-managing employers didn’t want to listen to the skill he paid me for, so i’ve got to learn that (old IDE/PATA [highpoint?]) hardware RAID controllers would de-sync and resilver - like, ALL THE TIME. :sweat_smile: OOF

In regards, to desyncing, MD-RAID and hardware RAID have a fundamental difference that may explain this - hardware RAID has a big, fat battery backed cache. In the case of a single SYNC write an MD-RAID mirror must wait for both drives to finish writing, but a hardware RAID can simply shove it in cache, yell “done” to the OS, and secretly write it to the disks in the background.

This background writing behaviour assumes that all disks in the RAID are of a similar performance class, and will actively kick out disks that are slow or not responding - since this is a sign of disk failure.

I don’t think MD-RAID would kick out a drive for simply being slow, it would take a device not responding for a certain time.

I have to say though, USB flash drives are horrendous. They are cursed objects that will fail at the least opportune time. You’d be much better off finding a USB enclosure for 2.5" SATA drives, and sticking a cheap SSD inside. Alternatively have a cron job running once a day copying data onto the USB, not bootable but it makes recovery possible.

2 Likes