20.7. FCP LUN 是 root 文件系统的一部分
在 Red Hat Enterprise Linux 10 中,用于添加是 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=。这个值是一个以逗号分隔的列表,其中包含 FCP 设备总线 ID 和目标 WWPN。WWPN 必须是前缀为 0x 的 16 位十六进制数字。该列表还包括前缀为 0x 的 FCP LUN,后缀为 0 到 16 位的十六进制数字。
只有在 zFCP 设备没有配置为 NPIV 模式时,才需要 WWPN 和 FCP LUN 值。当使用 zfcp.allow_lun_scan=0 内核参数禁用自动 LUN 扫描时,或者在安装 RHEL-9.0 或更旧版本时,也需要它们。否则,可以省略它们,例如 rd.zfcp=0.0.4000。以下是 /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-5.14.0-55.el9.s390x.conf 文件的示例。这个示例显示了在附加 FCP 的 SCSI 磁盘分区中使用物理卷的系统,它有两个路径。系统使用 vg_devel1 LVM 卷组,其中包含 root 文件系统的 lv_root 逻辑卷。
title Red Hat Enterprise Linux (5.14.0-55.el9.s390x) 9.0 (Plow)
version 5.14.0-55.el9.s390x
linux /boot/vmlinuz-5.14.0-55.el9.s390x
initrd /boot/initramfs-5.14.0-55.el9.s390x.img
options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fcd0,0x5105074308c2aee9,0x401040a000000000 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-5.14.0-55.el9.s390x
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
要在附加 FCP 的第二个 SCSI 磁盘中添加另一个物理卷,请使用 FCP LUN 0x401040a300000000。使用与现有物理卷相同的两个路径。在 /boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-5.14.0-55.el9.s390x.conf 的内核参数行中添加 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 和 rd.zfcp=0.0.fcd0,0x5105074308c2aee9,0x401040a300000000 。例如:
title Red Hat Enterprise Linux (5.14.0-55.el9.s390x) 9.0 (Plow)
version 5.14.0-55.el9.s390x
linux /boot/vmlinuz-5.14.0-55.el9.s390x
initrd /boot/initramfs-5.14.0-55.el9.s390x.img
options root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fcd0,0x5105074308c2aee9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 rd.zfcp=0.0.fcd0,0x5105074308c2aee9,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-5.14.0-55.el9.s390x
grub_users $grub_users
grub_arg --unrestricted
grub_class kernel
请确定配置文件中的内核命令行长度不超过 896 字节。否则引导装载程序无法被保存,安装将失败。
-
运行
dracut -f以更新目标内核的初始 RAM 磁盘。 运行
zipl来对下一个 IPL 应用配置文件的更改:# zipl -VUsing config file '/etc/zipl.conf' Using BLS config file '/boot/loader/entries/4ab74e52867b4f998e73e06cf23fd761-5.14.0-55.el9.s390x.conf' Run /lib/s390-tools/zipl_helper.device-mapper /boot Target device information Device..........................: fd:00 Partition.......................: fd:01 Device name.....................: dm-0 Device driver name..............: device-mapper 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 'zipl-automatic-menu' Adding #1: IPL section '5.14.0-55.el9.s390x' (default) kernel image......: /boot/vmlinuz-5.14.0-55.el9.s390x kernel parmline...: 'root=/dev/mapper/vg_devel1-lv_root crashkernel=auto rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd.zfcp=0.0.fcd0,0x5105074308c2aee9,0x401040a000000000 rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 rd.zfcp=0.0.fcd0,0x5105074308c2aee9,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-5.14.0-55.el9.s390x.img component address: kernel image....: 0x00010000-0x007a21ff parmline........: 0x00001000-0x000011ff initial ramdisk.: 0x02000000-0x028f63ff internal loader.: 0x0000a000-0x0000a3ff Preparing boot device: dm-0. Detected SCSI PCBIOS disk layout. Writing SCSI master boot record. Syncing disks... Done.
IBM Z 系统使用 zipl 创建包含内核和 initramfs 的原始块地址的 bootmap 。如果重新生成了 initramfs,则其磁盘上的物理布局可能会改变。因为 dracut 不会自动更新 bootmap,因此在重新生成 initramfs 后手动运行 zipl。如果不这样做,可能会导致过时的引导装载程序引用,并导致系统无法引导。