Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
25.2.2. 永久激活 FCP LUN
上面的步骤描述了如何在运行的系统中动态激活 FCP LUN。但是这种更改是临时的,重启后无法保留。如何将在 Linux 系统中对 FCP 配置的修改保留下来要看 FCP LUN 是否属于 root 文件系统。必须在引导进程早期使用
initramfs
激活那些 root 文件系统所需的 FCP LUN 方可将其挂载到 root 文件系统中。cio_ignore
是以透明方式处理永久设备配置,不需要在忽略列表中手动释放设备。
25.2.2.1. FCP LUN 是 Root 文件系统的一部分
添加作为 root 文件系统一部分的 FCP LUN 时唯一需要修改的文件是
/etc/zipl.conf
,然后运行 zipl 引导装载程序工具。不需要重新生成 initramfs
。
Red Hat Enterprise Linux 提供在引导进程早期激活 FCP LUN 的参数:
rd_ZFCP=
。该参数真是一个用逗号分开的设备总线 ID 列表、前缀为 0x
的 16 位十六进制 WWPN,以及前缀为 0x
,后接多个 0 以达到 16 位十六进制数的 FCP LUN。
下面的
zipl.conf
示例适用于使用在两个 FCP LUN 分区中的物理卷作为 LVM 卷组 vg_devel1
,该卷组中包括一个用于 root 文件系统的逻辑卷 lv_root
。为方便演示,该示例显示没有多路径的配置。
[defaultboot] default=linux target=/boot/ [linux] image=/boot/vmlinuz-2.6.32-19.el6.s390x ramdisk=/boot/initramfs-2.6.32-19.el6.s390x.img parameters="root=/dev/mapper/vg_devel1-lv_root rd_ZFCP=0.0.fc00,0x5105074308c212e9,0x401040a000000000 rd_ZFCP=0.0.fc00,0x5105074308c212e9,0x401040a100000000 rd_LVM_LV=vg_devel1/lv_root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009"
要在包含第三 FCP LUN(其设备总线 ID 为 0.0.fc00;WWPN 0x5105074308c212e9;FCP LUN 0x401040a300000000)的分区中另一个物理卷,只要在
zipl.conf
的引导内核参数行中添加 rd_ZFCP=0.0.fc00,0x5105074308c212e9,0x401040a300000000
即可。例如:
[defaultboot]
default=linux
target=/boot/
[linux]
image=/boot/vmlinuz-2.6.32-19.el6.s390x
ramdisk=/boot/initramfs-2.6.32-19.el6.s390x.img
parameters="root=/dev/mapper/vg_devel1-lv_root
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_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8
SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009"
运行
zipl
在下次 IPL 时应用对 /etc/zipl.conf
的修改:
# zipl -V Using config file '/etc/zipl.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 'linux' (default) kernel image......: /boot/vmlinuz-2.6.32-19.el6.s390x kernel parmline...: 'root=/dev/mapper/vg_devel1-lv_root 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_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us cio_ignore=all,!0.0.0009' initial ramdisk...: /boot/initramfs-2.6.32-19.el6.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.