{"id":3948,"date":"2022-12-20T17:28:29","date_gmt":"2022-12-20T20:28:29","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/lvmvdo-man7\/"},"modified":"2022-12-20T17:28:29","modified_gmt":"2022-12-20T20:28:29","slug":"lvmvdo-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/lvmvdo-man7\/","title":{"rendered":"LVMVDO (man7)"},"content":{"rendered":"<h1 align=\"center\">LVMVDO<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#VDO Terms\">VDO Terms<\/a><br \/> <a href=\"#VDO Usage\">VDO Usage<\/a><br \/> <a href=\"#VDO Topics\">VDO Topics<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">lvmvdo \u2014 EXPERIMENTAL LVM Virtual Data Optimizer support<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">VDO (which includes kvdo and vdo) is software that provides inline block-level deduplication, compression, and thin provisioning capabilities for primary storage.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Deduplication is a technique for reducing the consumption of storage resources by eliminating multiple copies of duplicate blocks. Compression takes the individual unique blocks and shrinks them with coding algorithms; these reduced blocks are then efficiently packed together into physical blocks. Thin provisioning manages the mapping from LBAs presented by VDO to where the data has actually been stored, and also eliminates any blocks of all zeroes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">With deduplication, instead of writing the same data more than once each duplicate block is detected and recorded as a reference to the original block. VDO maintains a mapping from logical block addresses (used by the storage layer above VDO) to physical block addresses (used by the storage layer under VDO). After deduplication, multiple logical block addresses may be mapped to the same physical block address; these are called shared blocks and are reference-counted by the software.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">With VDO\u2019s compression, multiple blocks (or shared blocks) are compressed with the fast LZ4 algorithm, and binned together where possible so that multiple compressed blocks fit within a 4 KB block on the underlying storage. Mapping from LBA is to a physical block address and index within it for the desired compressed data. All compressed blocks are individually reference counted for correctness.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Block sharing and block compression are invisible to applications using the storage, which read and write blocks as they would if VDO were not present. When a shared block is overwritten, a new physical block is allocated for storing the new block data to ensure that other logical block addresses that are mapped to the shared physical block are not modified.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For usage of VDO with <b>lvm<\/b>(8) standard VDO userspace tools <b>vdoformat<\/b>(8) and currently non-standard kernel VDO module &#8220;<i>kvdo<\/i>&#8221; needs to be installed on the system.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The &#8220;<i>kvdo<\/i>&#8221; module implements fine-grained storage virtualization, thin provisioning, block sharing, and compression; the &#8220;<i>uds<\/i>&#8221; module provides memory-efficient duplicate identification. The userspace tools include <b>vdostats<\/b>(8) for extracting statistics from those volumes.<\/p>\n<h2>VDO Terms <a name=\"VDO Terms\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">VDODataLV<\/p>\n<p style=\"margin-left:22%;\">VDO data LV <br \/> large hidden LV with suffix _vdata created in a VG. <br \/> used by VDO target to store all data and metadata blocks.<\/p>\n<p style=\"margin-left:11%;\">VDOPoolLV<\/p>\n<p style=\"margin-left:22%;\">VDO pool LV <br \/> maintains virtual for LV(s) stored in attached VDO data LV and it has same size. <br \/> contains VDOLV(s) (currently supports only a single VDOLV).<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"7%\">\n<p>VDOLV<\/p>\n<\/td>\n<td width=\"4%\"><\/td>\n<td width=\"9%\">\n<p>VDO LV<\/p>\n<\/td>\n<td width=\"69%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\">created from VDOPoolLV <br \/> appears blank after creation<\/p>\n<h2>VDO Usage <a name=\"VDO Usage\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The primary methods for using VDO with lvm2:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>1. Create VDOPoolLV with VDOLV<\/b> <br \/> Create an VDOPoolLV that will holds VDO data together with virtual size VDOLV, that user can use. When the virtual size is not specified, then such LV is created with maximum size that always fits into data volume even if there cannot happen any deduplication and compression (i.e. it can hold uncompressible content of \/dev\/urandom). When the name of VDOPoolLV is not specified, it tales name from sequence of vpool0, vpool1 &#8230;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note: As the performance of TRIM\/Discard operation is slow for large volumes of VDO type, please try to avoid sending discard requests unless necessary as it may take considerable amount of time to finish discard operation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvcreate \u2212\u2212type vdo \u2212n VDOLV \u2212L DataSize \u2212V LargeVirtualSize VG\/VDOPoolLV <br \/> lvcreate \u2212\u2212vdo \u2212L DataSize VG<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvcreate \u2212\u2212type vdo \u2212n vdo0 \u2212L 10G \u2212V 100G vg\/vdopool0 <br \/> # mkfs.ext4 \u2212E nodiscard \/dev\/vg\/vdo0<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>2. Create VDOPoolLV and convert existing LV into VDODataLV<\/b> <br \/> Convert an already created\/existing LV into a volume that can hold VDO data and metadata (a volume reference by VDOPoolLV). User will be prompted to confirm such conversion as it is <b>IRREVERSIBLY DESTROYING<\/b> content of such volume, as it\u2019s being immediately formatted by <b>vdoformat<\/b>(8) as VDO pool data volume. User can specify virtual size of associated VDOLV with this VDOPoolLV. When the virtual size is not specified, it will set to the maximum size that can keep 100% uncompressible data there.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvconvert \u2212\u2212type vdo\u2212pool \u2212n VDOLV \u2212V VirtualSize VG\/VDOPoolLV <br \/> lvconvert \u2212\u2212vdopool VG\/VDOPoolLV<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvconvert \u2212\u2212type vdo\u2212pool \u2212n vdo0 \u2212V10G vg\/existinglv<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>3. Change default setting used for creating VDOPoolLV<\/b> <br \/> VDO allows to set large variety of option. Lots of these setting can be specified by lvm.conf or profile settings. User can prepare number of different profiles and just specify profile file name. Check output of <b>lvmconfig \u2212\u2212type full<\/b> for detailed description of all individual vdo settings.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # cat <<EOF > vdo.profile <br \/> allocation {<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_use_compression=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_use_deduplication=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_use_metadata_hints=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_minimum_io_size=4096<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_block_map_cache_size_mb=128<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_block_map_period=16380<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_check_point_frequency=0<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_use_sparse_index=0<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_index_memory_size_mb=256<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_slab_size_mb=2048<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_ack_threads=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_bio_threads=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_bio_rotation=64<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_cpu_threads=2<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_hash_zone_threads=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_logical_threads=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_physical_threads=1<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_write_policy=&#8221;auto&#8221;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>vdo_max_discard=1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\">} <br \/> EOF<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"># lvcreate \u2212\u2212vdo \u2212L10G \u2212\u2212metadataprofile vdo.profile vg\/vdopool0 <br \/> # lvcreate \u2212\u2212vdo \u2212L10G \u2212\u2212config \u2019allocation\/vdo_cpu_threads=4\u2019 vg\/vdopool1<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>4. Change compression and deduplication of VDOPoolLV<\/b> <br \/> Disable or enable compression and deduplication for VDO pool LV (the volume that maintains all VDO LV(s) associated with it).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvchange \u2212\u2212compression [y|n] \u2212\u2212deduplication [y|n] VG\/VDOPoolLV<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvchange \u2212\u2212compression n vg\/vdpool0 <br \/> # lvchange \u2212\u2212deduplication y vg\/vdpool1<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>4. Checking usage of VDOPoolLV<\/b> <br \/> To quickly check how much data of VDOPoolLV are already consumed use <b>lvs<\/b>(8). Field Data% will report how much data occupies content of virtual data for VDOLV and how much space is already consumed with all the data and metadata blocks in VDOPoolLV. For a detailed description use <b>vdostats<\/b>(8) command.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note: <b>vdostats<\/b>(8) currently understands only \/dev\/mapper device names.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvcreate \u2212\u2212type vdo \u2212L10G \u2212V20G \u2212n vdo0 vg\/vdopool0 <br \/> # mkfs.ext4 \u2212E nodiscard \/dev\/vg\/vdo0 <br \/> # lvs \u2212a vg<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">LV VG Attr LSize Pool Origin Data% <br \/> vdo0 vg vwi\u2212a-v\u2212\u2212\u2212 20.00g vdopool0 0.01 <br \/> vdopool0 vg dwi-ao\u2212\u2212\u2212\u2212 10.00g 30.16 <br \/> [vdopool0_vdata] vg Dwi-ao\u2212\u2212\u2212\u2212 10.00g<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"># vdostats \u2212\u2212all \/dev\/mapper\/vg-vdopool0 <br \/> \/dev\/mapper\/vg-vdopool0 : <br \/> version : 30 <br \/> release version : 133524 <br \/> data blocks used : 79 <br \/> &#8230;<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>4. Extending VDOPoolLV size<\/b> <br \/> Adding more space to hold VDO data and metadata can be made via extension of VDODataLV with commands <b>lvresize<\/b>(8), <b>lvextend<\/b>(8).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note: Size of VDOPoolLV cannot be reduced.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvextend \u2212L+AddingSize VG\/VDOPoolLV<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvextend \u2212L+50G vg\/vdopool0 <br \/> # lvresize \u2212L300G vg\/vdopool1<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>4. Extending or reducing VDOLV size<\/b> <br \/> VDO LV can be extended or reduced as standard LV with commands <b>lvresize<\/b>(8), <b>lvextend<\/b>(8), <b>lvreduce<\/b>(8).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note: Reduction needs to process TRIM for reduced disk area to unmap used data blocks from VDOPoolLV and it may take a long time.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvextend \u2212L+AddingSize VG\/VDOLV <br \/> lvreduce \u2212L-ReducingSize VG\/VDOLV<\/b><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvextend \u2212L+50G vg\/vdo0 <br \/> # lvreduce \u2212L-50G vg\/vdo1 <br \/> # lvresize \u2212L200G vg\/vdo2<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>5. Component activation of VDODataLV<\/b> <br \/> VDODataLV can be activated separately as component LV for examination purposes. It activates data LV in read-only mode and cannot be modified. If the VDODataLV is active as component, any upper LV using this volume CANNOT be activated. User has to deactivate VDODataLV first to continue to use VDOPoolLV.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvchange \u2212ay vg\/vpool0_vdata <br \/> # lvchange \u2212an vg\/vpool0_vdata<\/p>\n<h2>VDO Topics <a name=\"VDO Topics\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>1. Stacking VDO<\/b> <br \/> User can convert\/stack VDO with existing volumes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>2. VDO on top of raid<\/b> <br \/> Using Raid type LV for VDO Data LV.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvcreate \u2212\u2212type raid1 \u2212L 5G \u2212n vpool vg <br \/> # lvconvert \u2212\u2212type vdo\u2212pool \u2212V 10G vg\/vpool<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>3. Caching VDODataLV, VDOPoolLV<\/b> <br \/> Cache VDO Data LV (accepts also VDOPoolLV.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvcreate \u2212L 5G \u2212V 10G \u2212n vdo1 vg\/vpool <br \/> # lvcreate \u2212\u2212type cache\u2212pool \u2212L 1G \u2212n cpool vg <br \/> # lvconvert \u2212\u2212cache \u2212\u2212cachepool vg\/cpool vg\/vpool <br \/> # lvconvert \u2212\u2212uncache vg\/vpool<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>3. Caching VDOLV<\/b> <br \/> Cache VDO LV.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>Example<\/i> <br \/> # lvcreate \u2212L 5G \u2212V 10G \u2212n vdo1 vg\/vpool <br \/> # lvcreate \u2212\u2212type cache\u2212pool \u2212L 1G \u2212n cpool vg <br \/> # lvconvert \u2212\u2212cache \u2212\u2212cachepool vg\/cpool vg\/vdo1 <br \/> # lvconvert \u2212\u2212uncache vg\/vdo1<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>lvm<\/b>(8), <b>lvm.conf<\/b>(5), <b>lvmconfig<\/b>(8), <b>lvcreate<\/b>(8), <b>lvconvert<\/b>(8), <b>lvchange<\/b>(8), <b>lvextend<\/b>(8), <b>lvreduce<\/b>(8), <b>lvresize<\/b>(8), <b>lvremove<\/b>(8), <b>lvs<\/b>(8), <b>vdo<\/b>(8), <b>vdoformat<\/b>(8), <b>vdostats<\/b>(8), <b>mkfs<\/b>(8)<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  lvmvdo \u2014 EXPERIMENTAL LVM Virtual Data Optimizer support <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,1040,972],"class_list":["post-3948","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-lvmvdo","tag-man7"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3948","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3948"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3948\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3948"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3948"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3948"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}