6.11. Converting an LVM RAID1 logical volume to an LVM linear logical volume
You can convert an existing RAID1 LVM logical volume to an LVM linear logical volume. To perform this operation, use the lvconvert command and specify the -m0 argument. This removes all the RAID data subvolumes and all the RAID metadata subvolumes that make up the RAID array, leaving the top-level RAID1 image as the linear logical volume.
Procédure
Display an existing LVM RAID1 logical volume:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Convert an existing RAID1 LVM logical volume to an LVM linear logical volume. The following command converts the LVM RAID1 logical volume my_vg/my_lv to an LVM linear device:
lvconvert -m0 my_vg/my_lv
# lvconvert -m0 my_vg/my_lv Are you sure you want to convert raid1 LV my_vg/my_lv to type linear losing all resilience? [y/n]: y Logical volume my_vg/my_lv successfully converted.Copy to Clipboard Copied! Toggle word wrap Toggle overflow When you convert an LVM RAID1 logical volume to an LVM linear volume, you can also specify which physical volumes to remove. In the following example, the
lvconvertcommand specifies that you want to remove /dev/sde1, leaving /dev/sdf1 as the physical volume that makes up the linear device:lvconvert -m0 my_vg/my_lv /dev/sde1
# lvconvert -m0 my_vg/my_lv /dev/sde1Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Vérification
Verify if the RAID1 logical volume was converted to an LVM linear device:
lvs -a -o name,copy_percent,devices my_vg
# lvs -a -o name,copy_percent,devices my_vg LV Copy% Devices my_lv /dev/sdf1(1)Copy to Clipboard Copied! Toggle word wrap Toggle overflow