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.
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
- Install the VDO software. For more information, see Installing VDO.
Procedure
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.
- Optional: Create a file system on the VDO LV.
- 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)
, andsystemd.mount(5)
man pages on your system