4.3.4. 显示卷组
您可以使用两个命令来显示 LVM 卷组的属性:
vgs
和 vgdisplay
。
The
vgscan
command will also display the volume groups, although its primary purpose is to scan all the disks for volume groups and rebuild the LVM cache file. For information on the vgscan
command, see 第 4.3.5 节 “为卷组扫描磁盘来建立缓存文件”.
The
vgs
command provides volume group information in a configurable form, displaying one line per volume group. The vgs
command provides a great deal of format control, and is useful for scripting. For information on using the vgs
command to customize your output, see 第 4.9 节 “为 LVM 自定义报告”.
vgdisplay
命令以固定格式显示卷组属性(比如大小、扩展、物理卷数量等等)。下面的例子就是对卷组 new_vg
执行 vgdisplay
命令时的输出结果。如果您没有指定卷组,那么就会列出所有现有的卷组。
# vgdisplay new_vg
--- Volume group ---
VG Name new_vg
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 11
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 51.42 GB
PE Size 4.00 MB
Total PE 13164
Alloc PE / Size 13 / 52.00 MB
Free PE / Size 13151 / 51.37 GB
VG UUID jxQJ0a-ZKk0-OpMO-0118-nlwO-wwqd-fD5D32