4.2. 创建逻辑卷总览
以下内容对创建 LVM 逻辑卷的步骤进行了总结。
- 将您要用作 LVM 卷的分区初始化为物理卷(进行标记)。
- 创建卷组。
- 创建逻辑卷。
After creating the logical volume you can create and mount the file system. The examples in this document use GFS2 file systems.
注意
Although a GFS2 file system can be implemented in a standalone system or as part of a cluster configuration, for the Red Hat Enterprise Linux 6 release Red Hat does not support the use of GFS2 as a single-node file system. Red Hat will continue to support single-node GFS2 file systems for mounting snapshots of cluster file systems (for example, for backup purposes).
- Create a GFS2 file system on the logical volume with the
mkfs.gfs2command. - 用
mkdir命令创建一个新的挂载点。在群集的系统中,在群集的所有节点中创建挂载点。 - 挂载文件系统。您可能想要在
fstab为系统中的每个节点添加一行。
Alternately, you can create and mount the GFS2 file system with the LVM GUI.
创建 LVM 卷在每台机器上都是不同的,因为保存 LVM 设置信息的区域是在物理卷中,而不是在创建卷的机器中。用于存储的服务器有本地副本,但可以重新生成物理卷中的内容。如果 LVM 版本兼容,您可以将物理卷附加到不同服务器上。