[Swlug] using lvm for mirror
Ben Tullis
tullis at hypothetical.co.uk
Wed Dec 1 20:37:19 UTC 2021
I generally prefer to use software RAID 1 for the physical devices. This creates a device such as /dev/md0
Then create a physical volume for LVM from /dev/md0
If you're using two identical drives in a server you can put /boot on /dev/md0, swap on /dev/md1 and then give everyone else to /dev/md2 and make that the LVM physical volume.
Hope that helps,
Ben
On 1 December 2021 19:44:25 GMT, bascule via Swlug <swlug at mailman.lug.org.uk> wrote:
>i've just had my first ever sudden total failuer of a hard drive in decades,
>in the past I always had some warning:)
>since this drive was a 1tb partition full of stuff, it wasn't really backed
>up, on account of that taking forever!
>so,pending new drive arriving I thought i'd look at having my new drive
>partition mirrored on a partition on another drive, the backup not being for
>accidental deletion protection but device failure.
>i thought that lvm might help and indeed there are tutorials on how to do
>this, but none of them make clear or otherwise that each separate partition is
>a moirror of the other.
>all that is guaranteed is that there are two copies of the filesystem
>somewhere in the logical volume.
>
>assuming that i add two new identical physical volumes to a volume group and
>make a logical volume using the -m 1 option, will each partition be a copy of
>the other such that i can recover the data if one partition disappears due to
>its device dying?
>
>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/d2d40751/attachment.html>
More information about the Swlug
mailing list