← 返回命令列表

Linux command

lvm 命令

安全

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

常用示例

Example

sudo lvm

Example

sudo lvm pvcreate /dev/sda1

Example

sudo lvm pvdisplay

Example

sudo lvm vgcreate vg1 /dev/sda1

Example

sudo lvm vgdisplay

Example

sudo lvm lvcreate -L 10G vg1

Example

sudo lvm lvdisplay

说明

lvm is the Linux Logical Volume Manager, providing flexible disk management through physical volumes (PVs), volume groups (VGs), and logical volumes (LVs). It enables dynamic resizing, snapshots, mirroring, and striping.

参数

pvcreate
Initialize a physical volume
pvdisplay
Display physical volume information
vgcreate
Create a volume group
vgdisplay
Display volume group information
lvcreate
Create a logical volume
lvdisplay
Display logical volume information
lvextend
Extend a logical volume
lvreduce
Reduce a logical volume
pvs
Report information about physical volumes
vgs
Report information about volume groups
lvs
Report information about logical volumes
pvremove
Remove a physical volume
vgremove
Remove a volume group
help _command_
Display help for a specific command
-d, --debug
Enable verbose debugging output (repeat up to 6 times to increase)
-v, --verbose
Set verbose level (repeat from 1 to 3 to increase)
-t, --test
Run in test mode (don't update metadata)
-y, --yes
Answer yes to all confirmation prompts

FAQ

What is the lvm command used for?

lvm is the Linux Logical Volume Manager, providing flexible disk management through physical volumes (PVs), volume groups (VGs), and logical volumes (LVs). It enables dynamic resizing, snapshots, mirroring, and striping.

How do I run a basic lvm example?

Run `sudo lvm` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does pvcreate do in lvm?

Initialize a physical volume