12.6. FCP LUN 是 root 文件系统的一部分
在 Red Hat Enterprise Linux 8 中更改了添加作为 root 文件系统一部分的 FCP LUN 时唯一需要修改的文件。运行以下命令可以找到要编辑的新文件,而不编辑 /etc/zipl.conf
文件:
# machine_id=$(cat /etc/machine-id) # kernel_version=$(uname -r) # ls /boot/loader/entries/$machine_id-$kernel_version.conf
Red Hat Enterprise Linux 提供在引导过程早期激活 FCP LUN 的参数: rd.zfcp=
。该值是一个用逗号分开的设备总线 ID 列表,前缀为 0x
的 16 位十六进制 WWPN,以及前缀为 0x
的 FCP LUN 16 位十六进制数字(需要时在右面使用 0 填充)。
以下是一个系统的 /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-80.el8.s390x.conf
文件示例。它使用两个 FCP LUN 分区中的物理卷用于一个 LVM 卷组 vg_devel1
,其中包括一个逻辑卷 lv_root
用于 root 文件系统。为方便起见,该示例显示没有多路径的配置。
title Red Hat Enterprise Linux (4.18.0-32.el8.s390x) 8.0 (Ootpa) version 4.18.0-32.el8.s390x linux /boot/vmlinuz-4.18.0-32.el8.s390x initrd /boot/initramfs-4.18.0-32.el8.s390x.img options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0 id rhel-20181027190514-4.18.0-32.el8.s390x grub_users $grub_users grub_arg --unrestricted grub_class kernel
要在包含第三个 FCP LUN 分区并包含设备总线 ID 0.0.fc00、WWPN 0x5105074308c212e9 和 FCP LUN 0x401040a300000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,添加 rd.zfcp=0.0.fc00,0x5105074308c212e9, 0x401040a300000000
到 /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-32.el8.s390x.conf
中的引导内核参数行。例如:
title Red Hat Enterprise Linux (4.18.0-32.el8.s390x) 8.0 (Ootpa) version 4.18.0-32.el8.s390x linux /boot/vmlinuz-4.18.0-32.el8.s390x initrd /boot/initramfs-4.18.0-32.el8.s390x.img options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0 id rhel-20181027190514-4.18.0-32.el8.s390x grub_users $grub_users grub_arg --unrestricted grub_class kernel
请确定配置文件中的内核命令行长度不超过 896 字节。否则引导装载程序无法被保存,安装将失败。
运行 zipl
来对下一个 IPL 应用配置文件的更改:
# zipl -V Using config file '/etc/zipl.conf' Using BLS config file '/boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-4.18.0-32.el8.s390x.conf' Target device information Device..........................: 08:00 Partition.......................: 08:01 Device name.....................: sda Device driver name..............: sd Type............................: disk partition Disk layout.....................: SCSI disk layout Geometry - start................: 2048 File system block size..........: 4096 Physical block size.............: 512 Device size in physical blocks..: 10074112 Building bootmap in '/boot/' Building menu 'rh-automatic-menu' Adding #1: IPL section '4.18.0-32.el8.s390x' (default) kernel image......: /boot/vmlinuz-4.18.0-32.el8.s390x kernel parmline...: 'root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 rd.lvm.lv=vg_devel1/lv_root rd.lvm.lv=vg_devel1/lv_swap cio_ignore=all,!condev rd.znet=qeth,0.0.0a00,0.0.0a01,0.0.0a02,layer2=1,portno=0' initial ramdisk...: /boot/initramfs-4.18.0-32.el8.s390x.img component address: kernel image....: 0x00010000-0x007a21ff parmline........: 0x00001000-0x000011ff initial ramdisk.: 0x02000000-0x028f63ff internal loader.: 0x0000a000-0x0000a3ff Preparing boot device: sda. Detected SCSI PCBIOS disk layout. Writing SCSI master boot record. Syncing disks... Done.
为了尽快向用户提供最新的信息,本文档可能会包括由机器自动从英文原文翻译的内容。如需更多信息,请参阅此说明。