Chapter 4. Importing existing VDO volumes to LVM


You can import a VDO volume that was created by the VDO manager into LVM. As a result, you can manage the volume as a logical volume using the LVM tools.

Note

The import operation is not reversible. After converting an existing VDO volume to LVM, accessing the VDO data is only possible using the LVM commands and the VDO manager no longer controls the volume.

Prerequisites

Procedure

  1. Convert an existing VDO volume created by the VDO manager into a logical volume. In the following command, replace vg-name with the volume group name, lv-name with the logical volume name, and /dev/sdg1 with the VDO device:

    # lvm_import_vdo --name vg-name/lv-name /dev/sdg1
    
    
    Convert VDO device "/dev/sdg1" to VDO LV "vg-name/lv-name"? [y|N]: Yes
    Stopping VDO vdo-name
    Converting VDO vdo-name
         Opening /dev/disk/by-id/scsi-36d094660575ece002291bd67517f677a-part1 exclusively
         Loading the VDO superblock and volume geometry
         Checking the VDO state
         Converting the UDS index
         Converting the VDO
         Conversion completed for '/dev/disk/by-id/scsi-36d094660575ece002291bd67517f677a-part1': VDO is now offset by 2097152 bytes
     Physical volume "/dev/sdg1" successfully created.
     Volume group "vg-name" successfully created
     WARNING: Logical volume vg-name/lv-name_vpool not zeroed.
     Logical volume "lv-name_vpool" created.
     WARNING: Converting logical volume vg-name/lv-name_vpool to VDO pool volume WITHOUT formating.
     WARNING: Using invalid VDO pool data MAY DESTROY YOUR DATA!
     Logical volume "lv-name" created.
     Converted vg-name/lv-name_vpool to VDO pool volume and created virtual vg-name/lv-name VDO volume.
  2. Optional: Create a file system on the VDO LV.
  3. Optional: Mount the LVM-VDO volume. For more information, see Creating and mounting an LVM-VDO volume.

Verification

  • List your LVM devices to verify that importing the VDO volumes to LVM succeeded:

    # lvs -a -o +devices
      LV                    VG      Attr       LSize  Pool          Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
      lv-name               vg-name vwi-a-v--- 25.00g lv-name_vpool        0.00                                    lv-name_vpool(0)
      lv-name_vpool         vg-name dwi------- <1.82t                      0.31                                    lv-name_vpool_vdata(0)
      [lv-name_vpool_vdata] vg-name Dwi-ao---- <1.82t                                                              /dev/sdg1(0)

Additional resources

  • lvm_import_vdo(8), lvmvdo(7), and systemd.mount(5) man pages on your system
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.