← 返回命令列表

Linux command

lvconvert 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

sudo lvconvert --type raid1 -m 1 /dev/vg_name/lv_name

Remove mirroring

sudo lvconvert -m 0 /dev/vg_name/lv_name

Merge

sudo lvconvert --merge /dev/vg_name/snapshot_lv

Repair

sudo lvconvert --repair /dev/vg_name/lv_name

Example

sudo lvconvert --type thin-pool --poolmetadata /dev/vg_name/meta_lv /dev/vg_name/pool_lv

说明

lvconvert converts or modifies the type, redundancy, or state of logical volumes. It can add/remove mirrors, convert between linear and RAID, merge snapshots, and convert to thin pools.

参数

--type TYPE
Convert to specified type (raid1, linear, thin-pool, cache-pool)
-m, --mirrors N
Number of mirrors (0 removes mirroring)
--merge
Merge snapshot back into origin
--repair
Repair degraded RAID volume
--poolmetadata LV
Specify metadata LV for thin pool
--stripes N
Number of stripes for conversion

FAQ

What is the lvconvert command used for?

lvconvert converts or modifies the type, redundancy, or state of logical volumes. It can add/remove mirrors, convert between linear and RAID, merge snapshots, and convert to thin pools.

How do I run a basic lvconvert example?

Run `sudo lvconvert --type raid1 -m 1 /dev/vg_name/lv_name` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --type TYPE do in lvconvert?

Convert to specified type (raid1, linear, thin-pool, cache-pool)