[Swlug] using lvm for mirror
Ben Tullis
tullis at hypothetical.co.uk
Wed Dec 1 21:18:53 UTC 2021
Hi bascule,
This is why I would use LVM on top of MD raid.
Let's say you have two 1TB drives in your host system.
Take 10 GB from each to mirror /boot. (That's very generous). Let's call this /dev/md0
Take another 10 GB to mirror swap. (That's probably over-generous and
assumes you can hot-swap. You could use RAID 0 and get 20 GB of faster swap instead, but that's not important right now. Let's call this /dev/md1
Then you have 980 GB to mirror the remainder of the drive. Let's call this device /dev/md2
Do a pvcreate /dev/md2
Create a volume group using /dev/md2 - Let's call this volume group vg-mirror
Create a logical volume on this volume group for your Windows VM. Give it 100 GB or whatever. Let's call this logical volume vg-mirror/lv-windows
You still have 880 GB on your vg-mirror volume group, in which you can create other mirrored logical volumes. You can use this for lv-root, lv-home and so on.
Hope that makes sense. I'm not near a computer at the moment, or I'd copy and paste some LVM commands to demonstrate.
You can't do what you originally suggested, but you might be making it more complicated than it needs to be.
Kind regards,
Ben
On 1 December 2021 20:48:26 GMT, bascule via Swlug <swlug at mailman.lug.org.uk> wrote:
>thanks Matt and Ben, the usage would be to house an ntfs volume for my win10
>vm, i wouldn't want to use a whole drive, just two partitions each on a
>separate drive, would this be ok using mdraid?
>
>bascule
>
>
>
>
>--
>Swlug mailing list
>Swlug at mailman.lug.org.uk
>https://mailman.lug.org.uk/mailman/listinfo/swlug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/swlug/attachments/20211201/c1e86ecd/attachment-0001.html>
More information about the Swlug
mailing list