1

Below is how I created lvm software raid10.

Create Physical Volumes
pvcreate /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1

Create Volume Group
vgcreate my_vol_grp /dev/nvme0n1 /dev/nvme1n1 /dev/nvme2n1 /dev/nvme3n1

Create a logical volume with RAID10 from the already created volume group
lvcreate --type raid10 -m 1 -i 2 -l 100%FREE -n lvm_raid10 my_vol_grp

Create ext4 filesystem on the logical volume that you have created
mkfs.ext4 /dev/my_vol_grp/lvm_raid10

Now the question is, how do I recover and re-establish raid10 after 1 drive failure on lvm raid10 configuration. I can find a lot of information online about how to create lvm raid10. However, I can not find much information about how to recover in case the drive fails.

Also my server supports hot-swap. Thanks in advance.

2

Add the new disk to the VG. Your VG and disk names will vary.

vgextend vg /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi-disk-1

Based on the lvmraid manual, regarding Replacing Devices, unavailable PVs call for a repair operation.

lvconvert --repair vg/lv
  • Ty for the answer. Just checked the documentation. Clarifies the process. – fcukinyahoo Mar 27 '19 at 19:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.