cvubrugier
cvubrugier on Hacker News
Synology SHR is btrfs (or ext4) on top of LVM and MD. MD is used for redundancy. LVM is used to aggregate multiple MD arrays into a volume group and to allow creating one or move volumes from that volume group.
Synology SHR is btrfs (or ext4) on top of LVM and MD. MD is used for redundancy. LVM is used to aggregate multiple MD arrays into a volume group and to allow creating one or move volumes from that volume group.
> How does it work if you then later add a fifth 4TB drive?
If you later add a fifth 4 TB drive, two partitions (1 TB each) are created on it. The remaining 2 TB will be unused: a slice with a single element cannot be replicated.
The first slice is expanded from "4 x 1 TB, RAID5" to "5 x 1 TB, RAID5", so the logical capacity of that slice is now 4 TB.
The second slice is migrated from "2 x 1 TB, RAID1" to "3 x 1 TB, RAID5". MD is able to change the RAID level (aka the "personality") of a RAID array, which is pretty cool.
Then the LVM layer is made aware of the increased capacity of the MD layer with `pvresize`.
The solution of using "LVM over MD" suffers from its complexity because you have to manage two distinct layers. For instance, you have to run LVM / mdadm commands in the right sequence to replace a failed drive.
Exactly! Suppose you have four HDDs: two 1 TB HDDs and two 2 TB HDDs. A single 1 TB partition is created on the 1 TB HDDs. Two partitions (1 TB each) are created on the 2 TB HDDs. A first RAID array (what you may call a slice) is created using the first partition of all four drives (4 x 1 TB, RAID5 = 3 TB). A second RAID array is created using the second partition of the 2 TB drives (2 x 1 TB, RAID 1 = 1 TB). Then the two RAID arrays are assembled with LVM (= 4 TB). SHR is basically LVM over MD.
For those living in or visiting Paris, you can see this application letter (or a replica?) at the Pinacothèque de Paris until the end of the month.