[GLLUG] Link two RAIDs in one LVM?

James Courtier-Dutton james.dutton at gmail.com
Sun May 10 07:53:57 UTC 2020


On Sat, 9 May 2020 at 12:03, Dr. Axel Stammler
<axst at users.sourceforge.net> wrote:
>
> Hi,
>
> Thank you for your detailed look at possible setups. I remembered my old setup incorrectly, though, so that I am not sure everything is applicable. My original (2016) setup included two hard disk drives of not 4 TB but 8 TB capacity in a RAID-1 that has reached 92 per cent capacity.
>

Ah, so the original disk drives are 8TB and not 4TB.
So, going from:
A: 8TB (current)
B: 8TB (current)
C: 8TB (new)
D: 8TB (new)

Some things to consider.
1) 8TB does not equal 8TB.  Although the drives might say they are
8TB, the exact amount of sectors on the disk might differ between disk
models.

I would therefore chop the disk into 500GB partitions so that you can
move them around at a later point if you wish.
You RAID the 500GB partitions.
You then put LVM (Logical Volume Management) on top, using LVM to join
all the RAID 500GB volumes into a single LVM Volume group.
You can then use LVM to expand/reduce filesystems as you need to.

You did not say whether your existing disks used LVM or not. If not,
build the new disks with LVM on top of RAID.  (LVM on top of RAID is
better than RAID on top of LVM)

Extensibility:
It would probably be a good time to think about extensibility in
future. I.e What happens when you add more disks.
The reasoning behind the RAID 500GB, is so you could migrate in 500GB
chunks, were you to need to change the RAID method later, or such
like.
You can make the chunks even smaller if you wish, you just end up with
more of them. It gives you a sort of tiled RAID.

Solution:
So, there is a solution that uses tiled RAID. LVM has a "mirror" option.
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/cluster_logical_volume_manager/mirrored_volumes
If you used that, you would not need a RAID layer at all.
You would create all the disks as a LVM volume group, and then create
LVM partitions using the LVM mirror option.
An LVM mirror divides the device being copied into regions that are
typically 512KB in size, so a big improvement over the 500GB chunks
suggestion above.
This would also give flexibility, you could choose some of your data
to be "mirror" and some not.
LVM "mirror" also lets you migrate data while it is still mounted.
You have the original LVM volume, mirror it onto a new disk, remove
the original copy.

So, I think moving to an "LVM mirror" solution is your best bet for
future extensibility.

There are also other options like RAID 5 and RAID 6, but they have the
associated "extensibility" problems.

Kind Regards

James



More information about the GLLUG mailing list