5.3. 卷组管理


这部分论述用于管理卷组各个方面的命令。

5.3.1. 创建卷组

To create a volume group from one or more physical volumes, use the vgcreate command. The vgcreate command creates a new volume group by name and adds at least one physical volume to it.
The following command creates a volume group named vg1 that contains physical volumes /dev/sdd1 and /dev/sde1.
# vgcreate vg1 /dev/sdd1 /dev/sde1
Copy to Clipboard Toggle word wrap
当使用物理卷创建卷组时,默认情况下,它的磁盘空间被分成大小为 4MB 的扩展。这个扩展是增大或者减小逻辑卷容量的最小单位。大量的扩展不会影响逻辑卷的 I/O 性能。
You can specify the extent size with the -s option to the vgcreate command if the default extent size is not suitable. You can put limits on the number of physical or logical volumes the volume group can have by using the -p and -l arguments of the vgcreate command.
By default, a volume group allocates physical extents according to common-sense rules such as not placing parallel stripes on the same physical volume. This is the normal allocation policy. You can use the --alloc argument of the vgcreate command to specify an allocation policy of contiguous, anywhere, or cling. In general, allocation policies other than normal are required only in special cases where you need to specify unusual or nonstandard extent allocation. For further information on how LVM allocates physical extents, see 第 5.3.2 节 “LVM Allocation”.
LVM 卷组和基本逻辑卷是包含在 /dev 目录的设备专用文件目录树中的,布局如下:
/dev/vg/lv/
Copy to Clipboard Toggle word wrap
For example, if you create two volume groups myvg1 and myvg2, each with three logical volumes named lv01, lv02, and lv03, six device special files are created:
/dev/myvg1/lv01
/dev/myvg1/lv02
/dev/myvg1/lv03
/dev/myvg2/lv01
/dev/myvg2/lv02
/dev/myvg2/lv03
Copy to Clipboard Toggle word wrap
The device special files are not present if the corresponding logical volume is not currently active.
64 位 CPU 中 LVM 的最大设备大小为 8EB。
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat