5.18. 在蓝图中指定卷组和逻辑卷命名
您可以将 RHEL 镜像构建器用于以下操作:
-
使用高级分区布局创建 RHEL 磁盘镜像。您可以使用自定义挂载点、基于 LVM 的分区和基于 LVM 的 SWAP 创建磁盘镜像。例如,使用
config.toml文件更改/和/boot目录的大小。 -
选择要使用哪个文件系统。您可以在
ext4和xfs之间进行选择。 - 添加交换分区和 LV。磁盘镜像可以包含基于 LV 的 SWAP。
- 更改 LVM 实体的名称。镜像中的逻辑卷(LV)和卷组(VG)可以有自定义名称。
不支持以下选项:
- 一个镜像中的多个 PV 或 VG。
- SWAP 文件
-
非物理分区(如
/dev/shm和/tmp)的挂载选项。
示例:添加文件系统所在的 VG 和 LG 自定义名称。
[[customizations.disk.partitions]]
type = "plain"
label = "data"
mountpoint = "/data"
fs_type = "ext4"
minsize = "50 GiB"
[[customizations.disk.partitions]]
type = "lvm"
name = "mainvg"
minsize = "20 GiB"
[[customizations.disk.partitions.logical_volumes]]
name = "rootlv"
mountpoint = "/"
label = "root"
fs_type = "ext4"
minsize = "2 GiB"
[[customizations.disk.partitions.logical_volumes]]
name = "homelv"
mountpoint = "/home"
label = "home"
fs_type = "ext4"
minsize = "2 GiB"
[[customizations.disk.partitions.logical_volumes]]
name = "swaplv"
fs_type = "swap"
minsize = "1 GiB"