.TH LVCONVERT 8 "LVM TOOLS 2.03.37(2) (2025-11-21)" "Red Hat, Inc." . .ie t \{\ .\" PostScript/PDF with tabs . ds TT \t . ds DTT \t\t .\} .el \{\ . ds TT \& . ds DTT \0\0\0 .\} . .de OPT .ie \\n(.$>1 \\*[TT]\fB\-\\$1\fP|\\*[TT]\fB\-\-\\$2\fP\c .el \\*[DTT]\fB\-\-\\$1\fP\c .. . .de OPA .OPT \\$* \ \c .. .de OPS .OPT \\$* \& .. . . .\"List of all options as O_string. . .de O_alloc .OPA alloc \%\fBcontiguous\fP|\:\ \fBcling\fP|\:\ \fBcling_by_tags\fP|\:\ \fBnormal\fP|\:\ \fBanywhere\fP|\:\ \fBinherit\fP .. .de O_background .OPS b background .. .de O_cache .OPS H cache .. .de O_cachedevice .OPA cachedevice \fIPV\fP .. .de O_cachemetadataformat .OPA cachemetadataformat \fBauto\fP|\fB1\fP|\fB2\fP .. .de O_cachemode .OPA cachemode \%\fBwritethrough\fP|\:\ \fBwriteback\fP|\:\ \fBpassthrough\fP .. .de O_cachepolicy .OPA cachepolicy \fIString\fP .. .de O_cachepool .OPA cachepool \fILV\fP .. .de O_cachesettings .OPA cachesettings \fIString\fP .. .de O_cachesize .OPA cachesize \fISize\fP[m|\:UNIT] .. .de O_cachevol .OPA cachevol \fILV\fP .. .de O_chunksize .OPA c chunksize \fISize\fP[k|\:UNIT] .. .de O_commandprofile .OPA commandprofile \fIString\fP .. .de O_compression .OPA compression \fBy\fP|\fBn\fP .. .de O_config .OPA config \fIString\fP .. .de O_debug .OPA d debug \&\.\|.\|.\& .. .de O_deduplication .OPA deduplication \fBy\fP|\fBn\fP .. .de O_devices .OPA devices \fIPV\fP .. .de O_devicesfile .OPA devicesfile \fIString\fP .. .de O_discards .OPA discards \%\fBpassdown\fP|\:\ \fBnopassdown\fP|\:\ \fBignore\fP .. .de O_driverloaded .OPA driverloaded \fBy\fP|\fBn\fP .. .de O_errorwhenfull .OPA errorwhenfull \fBy\fP|\fBn\fP .. .de O_force .OPA f force \&\.\|.\|.\& .. .de O_help .OPS h help .. .de O_integritysettings .OPA integritysettings \fIString\fP .. .de O_interval .OPA i interval \fINumber\fP .. .de O_journal .OPA journal \fIString\fP .. .de O_lockopt .OPA lockopt \fIString\fP .. .de O_longhelp .OPS longhelp .. .de O_merge .OPS merge .. .de O_mergemirrors .OPS mergemirrors .. .de O_mergesnapshot .OPS mergesnapshot .. .de O_mergethin .OPS mergethin .. .de O_metadataprofile .OPA metadataprofile \fIString\fP .. .de O_mirrorlog .OPA mirrorlog \fBcore\fP|\fBdisk\fP .. .de O_mirrors .OPA m mirrors [\fB+\fP|\fB\-\fP]\fINumber\fP .. .de O_name .OPA n name \fIString\fP .. .de O_nohints .OPS nohints .. .de O_nolocking .OPS nolocking .. .de O_noudevsync .OPS noudevsync .. .de O_originname .OPA originname \fILV\fP .. .de O_pooldatavdo .OPA pooldatavdo \fBy\fP|\fBn\fP .. .de O_poolmetadata .OPA poolmetadata \fILV\fP .. .de O_poolmetadatasize .OPA poolmetadatasize \fISize\fP[m|\:UNIT] .. .de O_poolmetadataspare .OPA poolmetadataspare \fBy\fP|\fBn\fP .. .de O_profile .OPA profile \fIString\fP .. .de O_quiet .OPA q quiet \&\.\|.\|.\& .. .de O_raidintegrity .OPA raidintegrity \fBy\fP|\fBn\fP .. .de O_raidintegrityblocksize .OPA raidintegrityblocksize \fINumber\fP .. .de O_raidintegritymode .OPA raidintegritymode \fIString\fP .. .de O_readahead .OPA r readahead \%\fBauto\fP|\:\ \fBnone\fP|\:\ \fINumber\fP .. .de O_regionsize .OPA R regionsize \fISize\fP[m|\:UNIT] .. .de O_repair .OPS repair .. .de O_replace .OPA replace \fIPV\fP .. .de O_setactivationskip .OPA k setactivationskip \fBy\fP|\fBn\fP .. .de O_snapshot .OPS s snapshot .. .de O_splitcache .OPS splitcache .. .de O_splitmirrors .OPA splitmirrors \fINumber\fP .. .de O_splitsnapshot .OPS splitsnapshot .. .de O_startpoll .OPS startpoll .. .de O_stripes .OPA stripes \fINumber\fP .. .de O_stripesize .OPA I stripesize \fISize\fP[k|\:UNIT] .. .de O_swapmetadata .OPS swapmetadata .. .de O_test .OPS t test .. .de O_thin .OPS T thin .. .de O_thinpool .OPA thinpool \fILV\fP .. .de O_trackchanges .OPS trackchanges .. .de O_type .OPA type \%\fBlinear\fP|\:\ \fBstriped\fP|\:\ \fBsnapshot\fP|\:\ \fBraid\fP|\:\ \fBmirror\fP|\:\ \fBthin\fP|\:\ \fBthin\-pool\fP|\:\ \fBvdo\fP|\:\ \fBvdo\-pool\fP|\:\ \fBcache\fP|\:\ \fBcache\-pool\fP|\:\ \fBwritecache\fP .. .de O_uncache .OPS uncache .. .de O_usepolicies .OPS usepolicies .. .de O_vdopool .OPA vdopool \fILV\fP .. .de O_vdosettings .OPA vdosettings \fIString\fP .. .de O_verbose .OPA v verbose \&\.\|.\|.\& .. .de O_version .OPS version .. .de O_virtualsize .OPA V virtualsize \fISize\fP[m|\:UNIT] .. .de O_wipesignatures .OPA W wipesignatures \fBy\fP|\fBn\fP .. .de O_yes .OPS y yes .. .de O_zero .OPA Z zero \fBy\fP|\fBn\fP .. . .SH NAME . lvconvert \(em Change logical volume layout . .SH SYNOPSIS . .nh .TP \fBlvconvert\fP \fIoption_args\fP \fIposition_args\fP [ \fIoption_args\fP ] .br [ \fIposition_args\fP ] .P .na .RS 5 .if t .ta 3nR +1uL \" PostScript/PDF .PD 0 .O_alloc .br .O_background .br .O_cache .br .O_cachedevice .br .O_cachemetadataformat .br .O_cachemode .br .O_cachepolicy .br .O_cachepool .br .O_cachesettings .br .O_cachesize .br .O_cachevol .br .O_chunksize .br .O_commandprofile .br .O_compression .br .O_config .br .O_debug .br .O_deduplication .br .O_devices .br .O_devicesfile .br .O_discards .br .O_driverloaded .br .O_errorwhenfull .br .O_force .br .O_help .br .O_integritysettings .br .O_interval .br .O_journal .br .O_lockopt .br .O_longhelp .br .O_merge .br .O_mergemirrors .br .O_mergesnapshot .br .O_mergethin .br .O_metadataprofile .br .O_mirrorlog .br .O_mirrors .br .O_name .br .O_nohints .br .O_nolocking .br .O_noudevsync .br .O_originname .br .O_pooldatavdo .br .O_poolmetadata .br .O_poolmetadatasize .br .O_poolmetadataspare .br .O_profile .br .O_quiet .br .O_raidintegrity .br .O_raidintegrityblocksize .br .O_raidintegritymode .br .O_readahead .br .O_regionsize .br .O_repair .br .O_replace .br .O_setactivationskip .br .O_snapshot .br .O_splitcache .br .O_splitmirrors .br .O_splitsnapshot .br .O_startpoll .br .O_stripes .br .O_stripesize .br .O_swapmetadata .br .O_test .br .O_thin .br .O_thinpool .br .O_trackchanges .br .O_type .br .O_uncache .br .O_usepolicies .br .O_vdopool .br .O_vdosettings .br .O_verbose .br .O_version .br .O_virtualsize .br .O_wipesignatures .br .O_yes .br .O_zero .PD .if t .ta .RE .ad .hy . .ds TT \& .ds DTT \& . . .SH DESCRIPTION . lvconvert changes the LV type and includes utilities for LV data maintenance. The LV type controls data layout and redundancy. The LV type is also called the segment type or segtype. .P To display the current LV type, run the command: .P .B lvs \-o name,segtype .I LV .P In some cases, an LV is a single device mapper (dm) layer above physical devices. In other cases, hidden LVs (dm devices) are layered between the visible LV and physical devices. LVs in the middle layers are called sub LVs. A command run on a visible LV sometimes operates on a sub LV rather than the specified LV. In other cases, a sub LV must be specified directly on the command line. .P Sub LVs can be displayed with the command: .P .B lvs \-a .P The .B linear type is equivalent to the .B striped type when one stripe exists. In that case, the types can sometimes be used interchangeably. .P In most cases, the .B mirror type is deprecated and the .B raid1 type should be used. They are both implementations of mirroring. .P Striped raid types are \fBraid0/raid0_meta\fP, \fBraid5\fP (an alias for raid5_ls), \fBraid6\fP (an alias for raid6_zr) and \fBraid10\fP (an alias for raid10_near). .P As opposed to mirroring, raid5 and raid6 stripe data and calculate parity blocks. The parity blocks can be used for data block recovery in case devices fail. A maximum number of one device in a raid5 LV may fail, and two in case of raid6. Striped raid types typically rotate the parity and data blocks for performance reasons, thus avoiding contention on a single device. Specific arrangements of parity and data blocks (layouts) can be used to optimize I/O performance, or to convert between raid levels. See \fBlvmraid\fP(7) for more information. .P Layouts of raid5 rotating parity blocks can be: left-asymmetric (raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmetric (raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't rotate parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with alias raid6), next-restart (raid6_nr), and next-continue (raid6_nc). .P Layouts including _n allow for conversion between raid levels (raid5_n to raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special raid6 layouts for raid level conversions between raid5 and raid6 are: raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to their raid5 counterparts (e.g. raid5_rs can be directly converted to raid6_rs_6 and vice-versa). .P raid10 (an alias for raid10_near) is currently limited to one data copy and even number of sub LVs. This is a mirror group layout, thus a single sub LV may fail per mirror group without data loss. .P Striped raid types support converting the layout, their stripesize and their number of stripes. .P The striped raid types combined with raid1 allow for conversion from linear \[->] striped/raid0/raid0_meta and vice-versa by e.g. linear \[<>] raid1 \[<>] raid5_n (then adding stripes) \[<>] striped/raid0/raid0_meta. . .SH USAGE . .nh .na Convert LV to linear. .P .B lvconvert \fB\-\-type\fP \fBlinear\fP \fILV\fP .RS [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .RE . .P \(em .P . Convert LV to striped. .P .B lvconvert \fB\-\-type\fP \fBstriped\fP \fILV\fP .RS [ .O_interval ] .br [ .O_stripesize ] .br [ .O_regionsize ] .br [ .O_stripes ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .RE . .P \(em .P . Convert LV to type mirror (also see type raid1), .P .B lvconvert \fB\-\-type\fP \fBmirror\fP \fILV\fP .RS [ .O_interval ] .br [ .O_stripesize ] .br [ .O_mirrors ] .br [ .O_regionsize ] .br [ .O_mirrorlog ] .br [ .O_stripes ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .RE . .P \(em .P . Convert LV to raid or change raid layout (a specific raid level must be used, e.g. raid1). .P .B lvconvert \fB\-\-type\fP \fBraid\fP \fILV\fP .RS [ .O_interval ] .br [ .O_stripesize ] .br [ .O_mirrors ] .br [ .O_regionsize ] .br [ .O_stripes ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .RE . .P \(em .P . Convert LV to raid1 or mirror, or change number of mirror images. .P .B lvconvert .O_mirrors \fILV\fP .RS [ .O_interval ] .br [ .O_regionsize ] .br [ .O_mirrorlog ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .RE . .P \(em .P . Convert raid LV to change number of stripe images. .P .B lvconvert .O_stripes \fILV1\fP .RS [ .O_interval ] .br [ .O_stripesize ] .br [ .O_regionsize ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: raid .RE . .P \(em .P . Convert raid LV to change the stripe size. .P .B lvconvert .O_stripesize \fILV1\fP .RS [ .O_interval ] .br [ .O_regionsize ] .br [ COMMON_OPTIONS ] .sp LV1 types: raid .RE . .P \(em .P . Split images from a raid1 or mirror LV and use them to create a new LV. .P .B lvconvert .O_splitmirrors \fB\-n\fP|\fB\-\-name\fP \fILV\fP\fI_new\fP \fILV1\fP .RS [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: cache mirror raid1 .RE . .P \(em .P . Split images from a raid1 LV and track changes to origin for later merge. .P .B lvconvert .O_splitmirrors .O_trackchanges \fILV1\fP .RS [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: cache raid1 .RE . .P \(em .P . Merge LV images that were split from a raid1 LV. .P .B lvconvert .O_mergemirrors \fIVG\fP|\fILV1\fP|\fITag\fP\ .\|.\|.\& .RS [ COMMON_OPTIONS ] .sp LV1 types: linear raid .RE . .P \(em .P . Convert LV to a thin LV, using the original LV as an external origin. .P .B lvconvert \fB\-\-thinpool\fP \fILV\fP \fB\-\-type\fP \fBthin\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_readahead ] .br [ .O_thin ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_metadataprofile ] .br [ .O_originname ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped cache raid thin zero error .RE . .P \(em .P . Convert LV to a thin LV, using LV as thin\-pool data volume. .P .B lvconvert \fB\-\-type\fP \fBthin\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_readahead ] .br [ .O_thin ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_metadataprofile ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped cache raid vdo writecache zero error .RE . .P \(em .P . Attach a cache pool to an LV, converts the LV to type cache. .P .B lvconvert \fB\-\-cachepool\fP \fILV\fP \fB\-\-type\fP \fBcache\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_cache ] .br [ .O_readahead ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_cachemetadataformat ] .br [ .O_cachemode ] .br [ .O_cachepolicy ] .br [ .O_cachesettings ] .br [ .O_metadataprofile ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped raid thin thinpool thinpooldata vdo vdopool vdopooldata zero error .RE . .P \(em .P . Attach a writecache to an LV, converts the LV to type writecache. .P .B lvconvert .O_cachevol \fB\-\-type\fP \fBwritecache\fP \fILV1\fP .RS [ .O_cachesettings ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped raid thinpool .RE . .P \(em .P . Attach a cache to an LV, converts the LV to type cache. .P .B lvconvert .O_cachevol \fB\-\-type\fP \fBcache\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_cache ] .br [ .O_zero ] .br [ .O_cachemetadataformat ] .br [ .O_cachemode ] .br [ .O_cachepolicy ] .br [ .O_cachesettings ] .br [ .O_poolmetadatasize ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped raid thinpool .RE . .P \(em .P . Add a writecache to an LV, using a specified cache device. .P .B lvconvert .O_cachedevice \fB\-\-type\fP \fBwritecache\fP \fILV1\fP .RS [ .O_cachesettings ] .br [ .O_cachesize ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped raid thinpool .RE . .P \(em .P . Add a cache to an LV, using a specified cache device. .P .B lvconvert .O_cachedevice \fB\-\-type\fP \fBcache\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_cachesettings ] .br [ .O_cachesize ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped raid thinpool .RE . .P \(em .P . Convert LV to type thin\-pool (existing data on LV will be erased). .P .B lvconvert \fB\-\-type\fP \fBthin\-pool\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_stripesize ] .br [ .O_readahead ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_compression ] .br [ .O_deduplication ] .br [ .O_discards ] .br [ .O_errorwhenfull ] .br [ .O_metadataprofile ] .br [ .O_pooldatavdo ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ .O_stripes ] .br [ .O_vdosettings ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped cache raid vdo writecache zero error .RE . .P \(em .P . Convert LV to type cache\-pool (existing data on LV will be erased). .P .B lvconvert \fB\-\-type\fP \fBcache\-pool\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_readahead ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_cachemetadataformat ] .br [ .O_cachemode ] .br [ .O_cachepolicy ] .br [ .O_cachesettings ] .br [ .O_metadataprofile ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped raid zero error .RE . .P \(em .P . Convert LV to type vdopool (existing data on LV will be erased). .P .B lvconvert \fB\-\-type\fP \fBvdo\-pool\fP \fILV1\fP .RS [ .O_name ] .br [ .O_readahead ] .br [ .O_virtualsize ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_compression ] .br [ .O_deduplication ] .br [ .O_metadataprofile ] .br [ .O_vdosettings ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped cache raid .RE . .P \(em .P . Detach a cache from an LV. .P .B lvconvert .O_splitcache \fILV1\fP .RS [ .O_cachesettings ] .br [ COMMON_OPTIONS ] .sp LV1 types: cache cachepool thinpool vdopool writecache .RE . .P \(em .P . Merge thin LV into its origin LV. .P .B lvconvert .O_mergethin \fILV1\fP\ .\|.\|.\& .RS [ COMMON_OPTIONS ] .sp LV1 types: thin .RE . .P \(em .P . Merge COW snapshot LV into its origin. .P .B lvconvert .O_mergesnapshot \fILV1\fP\ .\|.\|.\& .RS [ .O_interval ] .br [ COMMON_OPTIONS ] .sp LV1 types: snapshot .RE . .P \(em .P . Combine a former COW snapshot (second arg) with a former origin LV (first arg) to reverse a splitsnapshot command. .P .B lvconvert \fB\-\-type\fP \fBsnapshot\fP \fILV\fP \fILV1\fP .RS [ .O_chunksize ] .br [ .O_snapshot ] .br [ .O_zero ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped .RE . .P \(em .P . Replace failed PVs in a raid or mirror LV. Repair a thin pool. Repair a cache pool. .P .B lvconvert .O_repair \fILV1\fP .RS [ .O_interval ] .br [ .O_setactivationskip ] .br [ .O_poolmetadataspare ] .br [ .O_usepolicies ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: cache cachepool mirror raid thinpool .RE . .P \(em .P . Replace specific PV(s) in a raid LV with another PV. .P .B lvconvert .O_replace \fILV1\fP .RS [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: raid .RE . .P \(em .P . Poll LV to continue conversion. .P .B lvconvert .O_startpoll \fILV1\fP .RS [ COMMON_OPTIONS ] .sp LV1 types: mirror raid .RE . .P \(em .P . Add or remove data integrity checksums to raid images. .P .B lvconvert .O_raidintegrity \fILV1\fP .RS [ .O_integritysettings ] .br [ .O_raidintegrityblocksize ] .br [ .O_raidintegritymode ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: raid .RE .P \(em .P Common options for command: .RS [ .O_background ] .br [ .O_force ] .br [ .O_alloc ] .br [ .O_noudevsync ] .RE .P Common options for lvm: .RS [ .O_debug ] .br [ .O_help ] .br [ .O_quiet ] .br [ .O_test ] .br [ .O_verbose ] .br [ .O_yes ] .br [ .O_commandprofile ] .br [ .O_config ] .br [ .O_devices ] .br [ .O_devicesfile ] .br [ .O_driverloaded ] .br [ .O_journal ] .br [ .O_lockopt ] .br [ .O_longhelp ] .br [ .O_nohints ] .br [ .O_nolocking ] .br [ .O_profile ] .br [ .O_version ] .RE .hy .ad . .SH OPTIONS . .TP .O_alloc Determines the allocation policy when a command needs to allocate Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy which can be changed with vgchange/lvchange, or overridden on the command line. \fBnormal\fP applies common sense rules such as not placing parallel stripes on the same PV. \fBinherit\fP applies the VG policy to an LV. \fBcontiguous\fP requires new PEs to be placed adjacent to existing PEs. \fBcling\fP places new PEs on the same PV as existing PEs in the same stripe of the LV. If there are sufficient PEs for an allocation, but normal does not use them, \fBanywhere\fP will use them even if it reduces performance, e.g. by placing two stripes on the same PV. Optional positional PV args on the command line can also be used to limit which PVs the command will use for allocation. See \fBlvm\fP(8) for more information about allocation. . .TP .O_background If the operation requires polling, this option causes the command to return before the operation is complete, and polling is done in the background. . .TP .O_cache Specifies the command is handling a cache LV or cache pool. See \-\-type cache and \-\-type cache\-pool. See \fBlvmcache\fP(7) for more information about LVM caching. . .TP .O_cachedevice The name of a device to use for a cache. . .TP .O_cachemetadataformat Specifies the cache metadata format used by cache target. . .TP .O_cachemode Specifies when writes to a cache LV should be considered complete. \fBwriteback\fP considers a write complete as soon as it is stored in the cache pool. \fBwritethrough\fP considers a write complete only when it has been stored in both the cache pool and on the origin LV. While writethrough may be slower for writes, it is more resilient if something should happen to a device associated with the cache pool LV. With \fBpassthrough\fP, all reads are served from the origin LV (all reads miss the cache) and all writes are forwarded to the origin LV; additionally, write hits cause cache block invalidates. See \fBlvmcache\fP(7) for more information. . .TP .O_cachepolicy Specifies the cache policy for a cache LV. See \fBlvmcache\fP(7) for more information. . .TP .O_cachepool The name of a cache pool. . .TP .O_cachesettings Specifies tunable kernel options for dm-cache or dm-writecache LVs. Use the form 'option=value' or 'option1=value option2=value', or repeat \-\-cachesettings for each option being set. These settings override the default kernel behaviors which are usually adequate. To remove cachesettings and revert to the default kernel behaviors, use \-\-cachesettings 'default' for dm-cache or an empty string \-\-cachesettings '' for dm-writecache. See \fBlvmcache\fP(7) for more information. . .TP .O_cachesize The size of cache to use. . .TP .O_cachevol The name of a cache volume. . .TP .O_chunksize The size of chunks in a snapshot, cache pool or thin pool. For snapshots, the value must be a power of 2 between 4\ KiB and 512\ KiB and the default value is 4. For a cache pool the value must be between 32\ KiB and 1\ GiB and the default value is 64. For a thin pool the value must be between 64\ KiB and 1\ GiB and the default value starts with 64 and scales up to fit the pool metadata size within 128\ MiB, if the pool metadata size is not specified. The value must be a multiple of 64\ KiB. See \fBlvmthin\fP(7) and \fBlvmcache\fP(7) for more information. . .TP .O_commandprofile The command profile to use for command configuration. See \fBlvm.conf\fP(5) for more information about profiles. . .TP .O_compression Controls whether compression is enabled or disabled for VDO volume. See \fBlvmvdo\fP(7) for more information about VDO usage. . .TP .O_config Config settings for the command. These override \fBlvm.conf\fP(5) settings. The String arg uses the same format as \fBlvm.conf\fP(5), or may use section/field syntax. See \fBlvm.conf\fP(5) for more information about config. . .TP .O_debug Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log file and/or syslog (if configured). . .TP .O_deduplication Controls whether deduplication is enabled or disabled for VDO volume. See \fBlvmvdo\fP(7) for more information about VDO usage. . .TP .O_devices Restricts the devices that are visible and accessible to the command. Devices not listed will appear to be missing. This option can be repeated, or accepts a comma separated list of devices. This overrides the devices file. . .TP .O_devicesfile A file listing devices that LVM should use. The file must exist in \fI/etc/lvm/devices/\fP and is managed with the \fBlvmdevices\fP(8) command. This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and \fBdevices/use_devicesfile\fP settings. . .TP .O_discards Specifies how the device-mapper thin pool layer in the kernel should handle discards. \fBignore\fP causes the thin pool to ignore discards. \fBnopassdown\fP causes the thin pool to process discards itself to allow reuse of unneeded extents in the thin pool. \fBpassdown\fP causes the thin pool to process discards itself (like nopassdown) and pass the discards to the underlying device. See \fBlvmthin\fP(7) for more information. . .TP .O_driverloaded If set to no, the command will not attempt to use device-mapper. For testing and debugging. . .TP .O_errorwhenfull Specifies thin pool behavior when data space is exhausted. When yes, device-mapper will immediately return an error when a thin pool is full and an I/O request requires space. When no, device-mapper will queue these I/O requests for a period of time to allow the thin pool to be extended. Errors are returned if no space is available after the timeout. (Also see "\fIdm_thin_pool\fP" kernel module option no_space_timeout.) See \fBlvmthin\fP(7) for more information. . .TP .O_force Override various checks, confirmations and protections. Use with extreme caution. . .TP .O_help Display help text. . .TP .O_integritysettings Specifies tunable kernel options for dm-integrity. See \fBlvmraid\fP(7) for more information. . .TP .O_interval Report progress at regular intervals. . .TP .O_journal Record information in the systemd journal. This information is in addition to information enabled by the lvm.conf log/journal setting. command: record information about the command. output: record the default command output. debug: record full command debugging. . .TP .O_lockopt Used to pass options for special cases to lvmlockd. See \fBlvmlockd\fP(8) for more information. . .TP .O_longhelp Display long help text. . .TP .O_merge An alias for \-\-mergethin, \-\-mergemirrors, or \-\-mergesnapshot, depending on the type of LV. . .TP .O_mergemirrors Merge LV images that were split from a raid1 LV. See \-\-splitmirrors with \-\-trackchanges. . .TP .O_mergesnapshot Merge COW snapshot LV into its origin. When merging a snapshot, if both the origin and snapshot LVs are not open, the merge will start immediately. Otherwise, the merge will start the first time either the origin or snapshot LV are activated and both are closed. Merging a snapshot into an origin that cannot be closed, for example a root filesystem, is deferred until the next time the origin volume is activated. When merging starts, the resulting LV will have the origin's name, minor number and UUID. While the merge is in progress, reads or writes to the origin appear as being directed to the snapshot being merged. When the merge finishes, the merged snapshot is removed. Multiple snapshots may be specified on the command line or a @tag may be used to specify multiple snapshots be merged to their respective origin. . .TP .O_mergethin Merge thin LV into its origin LV. The origin thin LV takes the content of the thin snapshot, and the thin snapshot LV is removed. See \fBlvmthin\fP(7) for more information. . .TP .O_metadataprofile The metadata profile to use for command configuration. See \fBlvm.conf\fP(5) for more information about profiles. . .TP .O_mirrorlog Specifies the type of mirror log for LVs with the "mirror" type (does not apply to the "raid1" type.) \fBdisk\fP is a persistent log and requires a small amount of storage space, usually on a separate device from the data being mirrored. \fBcore\fP is not persistent; the log is kept only in memory. In this case, the mirror must be synchronized (by copying LV data from the first device to others) each time the LV is activated, e.g. after reboot. \fBmirrored\fP is a persistent log that is itself mirrored, but should be avoided. Instead, use the raid1 type for log redundancy. . .TP .O_mirrors Specifies the number of mirror images in addition to the original LV image, e.g. \-\-mirrors 1 means there are two images of the data, the original and one mirror image. Optional positional PV args on the command line can specify the devices the images should be placed on. There are two mirroring implementations: "raid1" and "mirror". These are the names of the corresponding LV types, or "segment types". Use the \-\-type option to specify which to use (raid1 is default, and mirror is legacy) Use \fBlvm.conf\fP(5) \fBglobal/mirror_segtype_default\fP and \fBglobal/raid10_segtype_default\fP to configure the default types. The plus prefix \fB+\fP can be used, in which case the number is added to the current number of images, or the minus prefix \fB\-\fP can be used, in which case the number is subtracted from the current number of images. See \fBlvmraid\fP(7) for more information. . .TP .O_name Specifies the name of a new LV. When unspecified, a default name of "lvol#" is generated, where # is a number generated by LVM. . .TP .O_nohints Do not use the hints file to locate devices for PVs. A command may read more devices to find PVs when hints are not used. The command will still perform standard hint file invalidation where appropriate. . .TP .O_nolocking Disable locking. Use with caution, concurrent commands may produce incorrect results. . .TP .O_noudevsync Disables udev synchronization. The process will not wait for notification from udev. It will continue irrespective of any possible udev processing in the background. Only use this if udev is not running or has rules that ignore the devices LVM creates. . .TP .O_originname Specifies the name to use for the external origin LV when converting an LV to a thin LV. The LV being converted becomes a read-only external origin with this name. . .TP .O_pooldatavdo Use VDO type volume for pool data volume. . .TP .O_poolmetadata The name of an LV to use for storing pool metadata. . .TP .O_poolmetadatasize Specifies the size of the new pool metadata LV. . .TP .O_poolmetadataspare Enable or disable the automatic creation and management of a spare pool metadata LV in the VG. A spare metadata LV is reserved space that can be used when repairing a pool. . .TP .O_profile An alias for \-\-commandprofile or \-\-metadataprofile, depending on the command. . .TP .O_quiet Suppress output and log messages. Overrides \-\-debug and \-\-verbose. Repeat once to also suppress any prompts with answer 'no'. . .TP .O_raidintegrity Enable or disable data integrity checksums for raid images. . .TP .O_raidintegrityblocksize The block size to use for dm-integrity on raid images. The integrity block size should usually match the device logical block size, or the file system block size. It may be less than the file system block size, but not less than the device logical block size. Possible values: 512, 1024, 2048, 4096. . .TP .O_raidintegritymode Use a journal (default) or bitmap for keeping integrity checksums consistent in case of a crash. The bitmap areas are recalculated after a crash, so corruption in those areas would not be detected. A journal does not have this problem. The journal mode doubles writes to storage, but can improve performance for scattered writes packed into a single journal write. bitmap mode can in theory achieve full write throughput of the device, but would not benefit from the potential scattered write optimization. . .TP .O_readahead Sets read ahead sector count of an LV. \fBauto\fP is the default which allows the kernel to choose a suitable value automatically. \fBnone\fP is equivalent to zero. . .TP .O_regionsize Size of each raid or mirror synchronization region. \fBlvm.conf\fP(5) \fBactivation/raid_region_size\fP can be used to configure a default. . .TP .O_repair Replace failed PVs in a raid or mirror LV, or run a repair utility on a thin pool. See \fBlvmraid\fP(7) and \fBlvmthin\fP(7) for more information. . .TP .O_replace Replace a specific PV in a raid LV with another PV. The new PV to use can be optionally specified after the LV. Multiple PVs can be replaced by repeating this option. See \fBlvmraid\fP(7) for more information. . .TP .O_setactivationskip Persistently sets (yes) or clears (no) the "activation skip" flag on an LV. An LV with this flag set is not activated unless the \-\-ignoreactivationskip option is used by the activation command. This flag is set by default on new thin snapshot LVs. The flag is not applied to deactivation. The current value of the flag is indicated in the lvs lv_attr bits. . .TP .O_snapshot Combine a former COW snapshot LV with a former origin LV to reverse a previous \-\-splitsnapshot command. . .TP .O_splitcache Separates a cache pool from a cache LV, and keeps the unused cache pool LV. Before the separation, the cache is flushed. Also see \-\-uncache. . .TP .O_splitmirrors Splits the specified number of images from a raid1 or mirror LV and uses them to create a new LV. If \-\-trackchanges is also specified, changes to the raid1 LV are tracked while the split LV remains detached. If \-\-name is specified, then the images are permanently split from the original LV and changes are not tracked. . .TP .O_splitsnapshot Separates a COW snapshot from its origin LV. The LV that is split off contains the chunks that differ from the origin LV along with metadata describing them. This LV can be wiped and then destroyed with lvremove. . .TP .O_startpoll Start polling an LV to continue processing a conversion. . .TP .O_stripes Specifies the number of stripes in a striped LV. This is the number of PVs (devices) that a striped LV is spread across. Data that appears sequential in the LV is spread across multiple devices in units of the stripe size (see \-\-stripesize). This does not apply to existing allocated space, only newly allocated space can be striped. . .TP .O_stripesize The amount of data that is written to one device before moving to the next in a striped LV. . .TP .O_swapmetadata Extracts the metadata LV from a pool and replaces it with another specified LV. The extracted LV is preserved and given the name of the LV that replaced it. Use for repair only. When the metadata LV is swapped out of the pool, it can be activated directly and used with thin provisioning tools: \fBcache_dump\fP(8), \fBcache_repair\fP(8), \fBcache_restore\fP(8), \fBthin_dump\fP(8), \fBthin_repair\fP(8), \fBthin_restore\fP(8). . .TP .O_test Run in test mode. Commands will not update metadata. This is implemented by disabling all metadata writing but nevertheless returning success to the calling function. This may lead to unusual error messages in multi-stage operations if a tool relies on reading back metadata it believes has changed but hasn't. . .TP .O_thin Specifies the command is handling a thin LV or thin pool. See \-\-type thin, \-\-type thin\-pool, and \-\-virtualsize. See \fBlvmthin\fP(7) for more information about LVM thin provisioning. . .TP .O_thinpool The name of a thin pool LV. . .TP .O_trackchanges Can be used with \-\-splitmirrors on a raid1 LV. This causes changes to the original raid1 LV to be tracked while the split images remain detached. This is a temporary state that allows the read-only detached image to be merged efficiently back into the raid1 LV later. Only the regions with changed data are resynchronized during merge. While a raid1 LV is tracking changes, operations on it are limited to merging the split image (see \-\-mergemirrors) or permanently splitting the image (see \-\-splitmirrors with \-\-name. . .TP .O_type The LV type, also known as "segment type" or "segtype". See usage descriptions for the specific ways to use these types. For more information about redundancy and performance (\fBraid\fP, \fBmirror\fP, \fBstriped\fP, \fBlinear\fP) see \fBlvmraid\fP(7). For thin provisioning (\fBthin\fP, \fBthin\-pool\fP) see \fBlvmthin\fP(7). For performance caching (\fBcache\fP, \fBcache\-pool\fP) see \fBlvmcache\fP(7). For copy-on\-write snapshots (\fBsnapshot\fP) see usage definitions. For VDO (\fBvdo\fP) see \fBlvmvdo\fP(7). Several commands omit an explicit type option because the type is inferred from other options or shortcuts (e.g. \-\-stripes, \-\-mirrors, \-\-snapshot, \-\-virtualsize, \-\-thin, \-\-cache, \-\-vdo). Use inferred types with care because it can lead to unexpected results. . .TP .O_uncache Separates a cache pool from a cache LV, and deletes the unused cache pool LV. Before the separation, the cache is flushed. Also see \-\-splitcache. . .TP .O_usepolicies Perform an operation according to the policy configured in \fBlvm.conf\fP(5) or a profile. . .TP .O_vdopool The name of a VDO pool LV. See \fBlvmvdo\fP(7) for more information about VDO usage. . .TP .O_vdosettings Specifies tunable VDO options for VDO LVs. Use the form 'option=value' or 'option1=value option2=value', or repeat \-\-vdosettings for each option being set. These settings override the default VDO behaviors. To remove vdosettings and revert to the default VDO behaviors, use \-\-vdosettings 'default'. See \fBlvmvdo\fP(7) for more information. . .TP .O_verbose Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout and stderr. . .TP .O_version Display version information. . .TP .O_virtualsize The virtual size of a new thin LV. See \fBlvmthin\fP(7) for more information about LVM thin provisioning. Using virtual size (\-V) and actual size (\-L) together creates a sparse LV. \fBlvm.conf\fP(5) \fBglobal/sparse_segtype_default\fP determines the default segment type used to create a sparse LV. Anything written to a sparse LV will be returned when reading from it. Reading from other areas of the LV will return blocks of zeros. When using a snapshot to create a sparse LV, a hidden virtual device is created using the zero target, and the LV has the suffix _vorigin. Snapshots are less efficient than thin provisioning when creating large sparse LVs (GiB). . .TP .O_wipesignatures Controls detection and subsequent wiping of signatures on new LVs. There is a prompt for each signature detected to confirm its wiping (unless \-\-yes is used to override confirmations.) When not specified, signatures are wiped whenever zeroing is done (see \-\-zero). This behaviour can be configured with \fBlvm.conf\fP(5) \fBallocation/wipe_signatures_when_zeroing_new_lvs\fP. If blkid wiping is used (\fBlvm.conf\fP(5) \fBallocation/use_blkid_wiping\fP) and LVM is compiled with blkid wiping support, then the blkid(8) library is used to detect the signatures (use blkid \-k to list the signatures that are recognized). Otherwise, native LVM code is used to detect signatures (only MD RAID, swap and LUKS signatures are detected in this case.) The LV is not wiped if the read only flag is set. . .TP .O_yes Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme caution. (For automatic no, see \-qq.) . .TP .O_zero For snapshots, this controls zeroing of the first 4\ KiB of data in the snapshot. If the LV is read-only, the snapshot will not be zeroed. For thin pools, this controls zeroing of provisioned blocks. Provisioning of large zeroed chunks negatively impacts performance. . .SH VARIABLES . .TP .I VG Volume Group name. See \fBlvm\fP(8) for valid names. . .TP .I LV Logical Volume name. See \fBlvm\fP(8) for valid names. An LV positional arg generally includes the VG name and LV name, e.g. VG/LV. LV1 indicates the LV must have a specific type, where the accepted LV types are listed. (raid represents raid type). . .TP .I PV Physical Volume name, a device path under /dev. For commands managing physical extents, a PV positional arg generally accepts a suffix indicating a range (or multiple ranges) of physical extents (PEs). When the first PE is omitted, it defaults to the start of the device, and when the last PE is omitted it defaults to end. .br Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB\-\fP\fIPE\fP]\ .\|.\|.\& .br Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\& . .TP .I Tag Tag name. See \fBlvm\fP(8) for information about tag names and using tags in place of a VG, LV or PV. . .TP .I String See the option description for information about the string content. . .TP .IR Size [UNIT] Size is an input number that accepts an optional unit. Input units are always treated as base two values, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit is specified by letter, followed by |UNIT. UNIT represents other possible input units: .BR b | B is bytes, .BR s | S is sectors of 512 bytes, .BR k | K is KiB, .BR m | M is MiB, .BR g | G is GiB, .BR t | T is TiB, .BR p | P is PiB, .BR e | E is EiB. (This should not be confused with the output control \-\-units, where capital letters mean multiple of 1000.) . .SH ENVIRONMENT VARIABLES . See \fBlvm\fP(8) for information about environment variables used by lvm. For example, \fBLVM_VG_NAME\fP can generally be substituted for a required VG parameter. . .SH ADVANCED USAGE . Alternate command forms, advanced command usage, and listing of all valid syntax for completeness. .P Change the region size of an LV. .P .B lvconvert .O_regionsize \fILV1\fP .RS [ COMMON_OPTIONS ] .sp LV1 types: raid .RE . .P \(em .P . Change the type of mirror log used by a mirror LV. .P .B lvconvert .O_mirrorlog \fILV1\fP .RS [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: mirror .RE . .P \(em .P . Convert LV to a thin LV, using the original LV as an external origin. .P .B lvconvert \fB\-\-thinpool\fP \fILV\fP .O_thin \fILV1\fP .RS [ \fB\-\-type thin\fP ] (implied) .br [ .O_chunksize ] .br [ .O_readahead ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_metadataprofile ] .br [ .O_originname ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped cache raid thin zero error .RE . .P \(em .P . Convert LV to a thin LV, using LV as thin\-pool data volume. .P .B lvconvert .O_thin \fILV1\fP .RS [ \fB\-\-type thin\fP ] (implied) .br [ .O_chunksize ] .br [ .O_readahead ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_metadataprofile ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped cache raid vdo writecache zero error .RE . .P \(em .P . Attach a cache pool to an LV. .P .B lvconvert \fB\-\-cachepool\fP \fILV\fP .O_cache \fILV1\fP .RS [ \fB\-\-type cache\fP ] (implied) .br [ .O_chunksize ] .br [ .O_readahead ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_cachemetadataformat ] .br [ .O_cachemode ] .br [ .O_cachepolicy ] .br [ .O_cachesettings ] .br [ .O_metadataprofile ] .br [ .O_poolmetadata ] .br [ .O_poolmetadatasize ] .br [ .O_poolmetadataspare ] .br [ COMMON_OPTIONS ] .br [ \fIPV\fP\ .\|.\|.\& ] .sp LV1 types: linear striped raid thin thinpool vdo vdopool vdopooldata zero error .RE . .P \(em .P . Attach a cache to an LV, converts the LV to type cache. .P .B lvconvert .O_cachevol .O_cache \fILV1\fP .RS [ .O_chunksize ] .br [ .O_zero ] .br [ .O_cachemetadataformat ] .br [ .O_cachemode ] .br [ .O_cachepolicy ] .br [ .O_cachesettings ] .br [ .O_poolmetadatasize ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped raid thinpool .RE . .P \(em .P . Convert LV to type vdopool (variant: use \-\-type vdo\-pool, existing data on LV will be erased). .P .B lvconvert \fB\-\-vdopool\fP \fILV1\fP .RS [ \fB\-\-type vdo\-pool\fP ] (implied) .br [ .O_name ] .br [ .O_readahead ] .br [ .O_virtualsize ] .br [ .O_wipesignatures ] .br [ .O_zero ] .br [ .O_compression ] .br [ .O_deduplication ] .br [ .O_metadataprofile ] .br [ .O_vdosettings ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped cache raid .RE . .P \(em .P . Detach and delete a cache from an LV. .P .B lvconvert .O_uncache \fILV1\fP .RS [ .O_cachesettings ] .br [ COMMON_OPTIONS ] .sp LV1 types: cache thinpool vdopool writecache .RE . .P \(em .P . Swap metadata LV in a thin pool or cache pool (for repair only). .P .B lvconvert .O_poolmetadata .O_swapmetadata \fILV1\fP .RS [ .O_chunksize ] .br [ COMMON_OPTIONS ] .sp LV1 types: cachepool thinpool .RE . .P \(em .P . Merge LV that was split from a mirror (variant, use \-\-mergemirrors). Merge thin LV into its origin LV (variant, use \-\-mergethin). Merge COW snapshot LV into its origin (variant, use \-\-mergesnapshot). .P .B lvconvert .O_merge \fIVG\fP|\fILV1\fP|\fITag\fP\ .\|.\|.\& .RS [ .O_interval ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped snapshot raid thin .RE . .P \(em .P . Separate a COW snapshot from its origin LV. .P .B lvconvert .O_splitsnapshot \fILV1\fP .RS [ COMMON_OPTIONS ] .sp LV1 types: snapshot .RE . .P \(em .P . Combine a former COW snapshot (second arg) with a former origin LV (first arg) to reverse a splitsnapshot command. .P .B lvconvert .O_snapshot \fILV\fP \fILV1\fP .RS [ \fB\-\-type snapshot\fP ] (implied) .br [ .O_chunksize ] .br [ .O_zero ] .br [ COMMON_OPTIONS ] .sp LV1 types: linear striped .RE . .P \(em .P . Poll LV to continue conversion (also see \-\-startpoll) or waits till conversion/mirror syncing is finished .P .B lvconvert \fILV1\fP .RS [ COMMON_OPTIONS ] .sp LV1 types: mirror raid .RE . .SH NOTES . This previous command syntax would perform two different operations: .br \fBlvconvert \-\-thinpool\fP \fILV1\fP \fB\-\-poolmetadata\fP \fILV2\fP .br If LV1 was not a thin pool, the command would convert LV1 to a thin pool, optionally using a specified LV for metadata. But, if LV1 was already a thin pool, the command would swap the current metadata LV with LV2 (for repair purposes.) .P In the same way, this previous command syntax would perform two different operations: .br \fBlvconvert \-\-cachepool\fP \fILV1\fP \fB\-\-poolmetadata\fP \fILV2\fP .br If LV1 was not a cache pool, the command would convert LV1 to a cache pool, optionally using a specified LV for metadata. But, if LV1 was already a cache pool, the command would swap the current metadata LV with LV2 (for repair purposes.) . .SH EXAMPLES . Convert a linear LV to a two-way mirror LV. .br .B lvconvert \-\-type mirror \-\-mirrors 1 vg/lvol1 .P Convert a linear LV to a two-way RAID1 LV. .br .B lvconvert \-\-type raid1 \-\-mirrors 1 vg/lvol1 .P Convert a mirror LV to use an in-memory log. .br .B lvconvert \-\-mirrorlog core vg/lvol1 .P Convert a mirror LV to use a disk log. .br .B lvconvert \-\-mirrorlog disk vg/lvol1 .P Convert a mirror or raid1 LV to a linear LV. .br .B lvconvert \-\-type linear vg/lvol1 .P Convert a mirror LV to a raid1 LV with the same number of images. .br .B lvconvert \-\-type raid1 vg/lvol1 .P Convert a linear LV to a two-way mirror LV, allocating new extents from specific PV ranges. .br .B lvconvert \-\-mirrors 1 vg/lvol1 /dev/sda:0\-15 /dev/sdb:0\-15 .P Convert a mirror LV to a linear LV, freeing physical extents from a specific PV. .br .B lvconvert \-\-type linear vg/lvol1 /dev/sda .P Split one image from a mirror or raid1 LV, making it a new LV. .br .B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg/lvol1 .P Split one image from a raid1 LV, and track changes made to the raid1 LV while the split image remains detached. .br .B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg/lvol1 .P Merge an image (that was previously created with \-\-splitmirrors and \-\-trackchanges) back into the original raid1 LV. .br .B lvconvert \-\-mergemirrors vg/lvol1_rimage_1 .P Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV. .br .B lvconvert \-\-replace /dev/sdb1 vg/lvol1 /dev/sdf1 .P Replace 3 PVs /dev/sd[b\-d]1 with PVs /dev/sd[f\-h]1 in a raid1 LV. .br .B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 \ \-\-replace /dev/sdd1 vg/lvol1 /dev/sd[fgh]1 .P Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV. .br .B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1 .P Convert a thick LV into a thin\-pool data volume and continue using this LV through thinLV and for the conversion set the pool metadata size to 1GiB. .br .B lvconvert \-\-type thin \-\-poolmetadatasize 1G vg/lvol1 .P Convert an LV into a thin\-pool with VDO deduplication and compression for storing its data. .br .B lvconvert \-\-type thin\-pool \-\-pooldatavdo y vg/lvol1 .P Convert an LV into a thin LV in the specified thin pool. The existing LV is used as an external read-only origin for the new thin LV. .br .B lvconvert \-\-type thin \-\-thinpool vg/tpool1 vg/lvol1 .P Convert an LV into a thin LV in the specified thin pool. The existing LV is used as an external read-only origin for the new thin LV, and is renamed "external". .br .B lvconvert \-\-type thin \-\-thinpool vg/tpool1 \-\-originname external vg/lvol1 .P Convert an LV to a cache pool LV using another specified LV for cache pool metadata. .br .B lvconvert \-\-type cache\-pool \-\-poolmetadata vg/poolmeta1 vg/lvol1 .P Convert an LV to a cache LV using the specified cache pool and chunk size. .br .B lvconvert \-\-type cache \-\-cachepool vg/cpool1 \-c 128 vg/lvol1 .P Detach and keep the cache pool from a cache LV. .br .B lvconvert \-\-splitcache vg/lvol1 .P Detach and remove the cache pool from a cache LV. .br .B lvconvert \-\-uncache vg/lvol1 . .SH SEE ALSO . .nh .na .BR lvm (8), .BR lvm.conf (5), .BR lvmconfig (8), .BR lvmdevices (8), .P .BR pvchange (8), .BR pvck (8), .BR pvcreate (8), .BR pvdisplay (8), .BR pvmove (8), .BR pvremove (8), .BR pvresize (8), .BR pvs (8), .BR pvscan (8), .P .BR vgcfgbackup (8), .BR vgcfgrestore (8), .BR vgchange (8), .BR vgck (8), .BR vgcreate (8), .BR vgconvert (8), .BR vgdisplay (8), .BR vgexport (8), .BR vgextend (8), .BR vgimport (8), .BR vgimportclone (8), .BR vgimportdevices (8), .BR vgmerge (8), .BR vgmknodes (8), .BR vgreduce (8), .BR vgremove (8), .BR vgrename (8), .BR vgs (8), .BR vgscan (8), .BR vgsplit (8), .P .BR lvcreate (8), .BR lvchange (8), .BR lvconvert (8), .BR lvdisplay (8), .BR lvextend (8), .BR lvreduce (8), .BR lvremove (8), .BR lvrename (8), .BR lvresize (8), .BR lvs (8), .BR lvscan (8), .P .BR lvm\-fullreport (8), .BR lvm\-lvpoll (8), .BR blkdeactivate (8), .BR lvmdump (8), .P .BR dmeventd (8), .BR lvmpolld (8), .BR lvmlockd (8), .BR lvmlockctl (8), .BR cmirrord (8), .BR lvmdbusd (8), .BR fsadm (8), .P .BR lvmsystemid (7), .BR lvmreport (7), .BR lvmcache (7), .BR lvmraid (7), .BR lvmthin (7), .BR lvmvdo (7), .BR lvmautoactivation (7)