Search

5.4.16.4. Converting a Mirrored LVM Device to a RAID1 Device

download PDF
You can convert an existing mirrored LVM device to a RAID1 LVM device with the lvconvert command by specifying the --type raid1 argument. This renames the mirror subvolumes (*_mimage_*) to RAID subvolumes (*_rimage_*). In addition, the mirror log is removed and metadata subvolumes (*_rmeta_*) are created for the data subvolumes on the same physical volumes as the corresponding data subvolumes.
The following example shows the layout of a mirrored logical volume my_vg/my_lv.
# lvs -a -o name,copy_percent,devices my_vg
  LV               Copy%  Devices                      
  my_lv             15.20 my_lv_mimage_0(0),my_lv_mimage_1(0)
  [my_lv_mimage_0]        /dev/sde1(0)                 
  [my_lv_mimage_1]        /dev/sdf1(0)                 
  [my_lv_mlog]            /dev/sdd1(0)
The following command converts the mirrored logical volume my_vg/my_lv to a RAID1 logical volume.
# lvconvert --type raid1 my_vg/my_lv
# lvs -a -o name,copy_percent,devices my_vg
  LV               Copy%  Devices                      
  my_lv            100.00 my_lv_rimage_0(0),my_lv_rimage_1(0)
  [my_lv_rimage_0]        /dev/sde1(0)                 
  [my_lv_rimage_1]        /dev/sdf1(0)                 
  [my_lv_rmeta_0]         /dev/sde1(125)               
  [my_lv_rmeta_1]         /dev/sdf1(125)
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.