What is the difference between dm (dmsetup) and md (mdadm) modules in Linux kernel ? [both seems to be a logical volume manager] oh yeah and there is lvm (lvm) also. What are the difference between all this ?
md is multiple devices. It's a RAID implementation in Linux kernel available since kernel release 2.0. It allows you to create RAID level 0, 10, 4, 5 and 6. It has various optimizations like utilizing SSE and MMX instructions. It's a standart software RAID in Linux.
dm is device mapper. It's Linux kernel framework that allows you to, well, map one device on another devices (one or many). This works as creating virtual device (mapped device) that you can access in /dev/mapper directory. All I/O to that device will be mapped to other devices. Reasons for device mapper is that there are many cases where you need to map devices, but you would like to reuse code.
There are several drivers (called dm targets) utilizing device mapper, for example:
Difference between dm-stripe and md RAID level 0 is not that big - it's just different implementations, but I believe that md RAID has better performance.
And finally, lvm is userspace toolset that provide logical volume management facilities on linux. It uses device mapper to map volume groups and logical volumes to physical devices.
And there is a special confusing case - dm-raid
, you can read about it here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With