「lvm2」

认识

官网:https://sourceware.org/lvm2/ | https://gitlab.com/lvmteam/lvm2
文档:

组成

安装的可执行程序

dmsetup,is a low level logical volume management tool.
fsadm,is a utility used to resize or check filesystem on a device.
lvmconf,is a script that modifies the locking configuration in the LVM2 configuration file.

子命令

lvm,provides the command-line tools for LVM2. Commands are implemented via sympolic links to this program to manage physical devices (pv*), volume groups (vg*) and logical volumes (lv*).

lvmconfig,

物理卷(PV – Physical Volume)

查看 PV 及相关信息

pvdisplay 显示物理卷的各种属性;物理卷信息显示
pvscan 显示所有的物理卷;物理卷扫描
pvs 显示物理卷的信息;
pvck 检查物理卷的一致性;

修改

pvresize
pvchange

删除

pvremove

创建

pvcreate,物理卷创建:将普通的物理存储转换为物理卷。
pvmove,移动物理卷;

VG

vgcfgbackup
vgcfgrestore
vgchange
vgck
vgcreate
vgconvert
vgdisplay
vgexport
vgextend
vgimport
vgimportclone,is used to import a duplicated VG (e.g. hardware snapshot).

vgmerge
vgmknodes
vgreduce
vgremove
vgrename
vgs
vgscan
vgsplit

LV

lvcreate
lvchange
lvconvert
lvdisplay
lvextend
lvreduce
lvremove
lvrename
lvresize
lvs
lvscan

LVM

lvm-fullreport
lvm-lvpoll
lvm2-activation-generator

blkdeactivate,is a utility to deactivate block device.

lvmdump,is a tool used to dump various information concerning LVM2.

DAEMON

dmeventd,(optional) is the Device Mapper event daemon.

lvmetad,(optional) is the LVM metadata daemon.

lvmpolld
lvmlockd
lvmlockctl
clvmd
cmirrord
lvmdbusd

组成

命令程序 and 配置文件

/etc/lvm/*

/usr/lib/systemd/system/blk-availability.service
/usr/lib/systemd/system/lvm2-lvmpolld.service
/usr/lib/systemd/system/lvm2-lvmpolld.socket
/usr/lib/systemd/system/lvm2-monitor.service
/usr/lib/tmpfiles.d/lvm2.conf
/usr/lib/udev/rules.d/56-lvm.rules
/usr/lib/udev/rules.d/69-lvm.rules

/usr/sbin/fsadm
/usr/sbin/lvchange
/usr/sbin/lvconvert
/usr/sbin/lvcreate
/usr/sbin/lvdisplay
/usr/sbin/lvextend
/usr/sbin/lvm
/usr/sbin/lvmconfig
/usr/sbin/lvmdiskscan
/usr/sbin/lvmdump
/usr/sbin/lvmpolld
/usr/sbin/lvmsadc
/usr/sbin/lvmsar
/usr/sbin/lvreduce
/usr/sbin/lvremove
/usr/sbin/lvrename
/usr/sbin/lvresize
/usr/sbin/lvs
/usr/sbin/lvscan
/usr/sbin/pvchange
/usr/sbin/pvck
/usr/sbin/pvcreate
/usr/sbin/pvdisplay
/usr/sbin/pvmove
/usr/sbin/pvremove
/usr/sbin/pvresize
/usr/sbin/pvs
/usr/sbin/pvscan
/usr/sbin/vgcfgbackup
/usr/sbin/vgcfgrestore
/usr/sbin/vgchange
/usr/sbin/vgck
/usr/sbin/vgconvert
/usr/sbin/vgcreate
/usr/sbin/vgdisplay
/usr/sbin/vgexport
/usr/sbin/vgextend
/usr/sbin/vgimport
/usr/sbin/vgimportclone
/usr/sbin/vgmerge
/usr/sbin/vgmknodes
/usr/sbin/vgreduce
/usr/sbin/vgremove
/usr/sbin/vgrename
/usr/sbin/vgs
/usr/sbin/vgscan
/usr/sbin/vgsplit

/usr/share/doc/lvm2/*

/usr/share/initramfs-tools/hooks/lvm2

/usr/share/man/*

应用

创建新分区

WIP

参考