8

On a related question about SSDs and TRIM (see: Possible to get SSD TRIM (discard) working on ext4 + LVM + software RAID in Linux? ), it turns out that dmraid may now (or shortly) support TRIM on RAID-1.

Typically, we've used md (via mdadm) to create our RAID-1 volumes, then used LVM to create volume groups, then formatted with the file system of our choice (ext4 lately). We've been doing this for years, and Google & ServerFault searches seem to confirm this is the most common way of doing software RAID with volume management.

Google searches seem to suggest that dmraid is use for so-called 'fakeRAID' configurations where there's some level of hardware 'help' in the form of RAID BIOS in the controller, which we don't have (and don't want to use - we'd like a fully software solution).

Since we'd like to use TRIM on our SSDs, and since md doesn't seem to (yet?) support TRIM, I'm wondering if it's possible to use dmraid instead of md to create RAID-1 (and RAID-1+0) volumes in software, with no hardware support (ie, just plugged into a dumb SATA/SAS bus)?

Don MacAskill
  • 1,808
  • 3
  • 16
  • 22

1 Answers1

1

You don't want to use dmraid unless you have specific motherboard or controller and understand the ramifications of the so-called fakeRAID.

It appears you are thinking about lvm mirrors (which, of course can use device mapper--and thus the potential for confusion with dmraid--something else entirely).

The problem with using lvm mirrors is you are mirroring entire physical extents--typically sized in megabytes--nowhere near the block-level mirroring done with md.

That said, I've done it. But only on short-term back-end migration scenarios. And recovery from a failure is a bit more tricky as it's not as magically automatic as proper md raid1.

Curtis Doty
  • 476
  • 1
  • 5
  • 6