Show Table of Contents
25.2.2. 永續性啟用 FCP LUN
上述指南詳述了如何動態式地在一部執行中的系統上啟用 FCP LUN。然而,此類型的變更並非永續性的變更,並且無法在重新開機後維持其狀態。要使 FCP 配置的變更能夠在您的系統上保有永續性,取決於該 FCP LUN 是否屬於 root 檔案系統。root 檔案系統所需的這些 FCP,需要在開機程序非常早期的步驟中,由
initramfs
啟用,以便掛載 root 檔案系統。cio_ignore
會自動地被處理為永續性裝置配置,並且您無須手動式地將裝置由忽略清單中移除。
25.2.2.1. 屬於 Root 檔案系統一部分的 FCP LUN
要新增屬於 root 檔案系統一部分的 FCP LUN,您唯一需要修改的檔案為
/etc/zipl.conf
。接著請執行 zipl 開機載入程式工具。您無須重新建立 initramfs
。
Red Hat Enterprise Linux 提供了用來在開機程序起始步驟中啟用 FCP LUN 的參數:
rd_ZFCP=
。此值為以逗號區隔開的清單,其中包含了裝置 bus ID、WWPN 為 16 碼的十六進位數字,並以 0x
作為起始,以及以 0x
為起始的 FCP LUN,並且右方填補上零以達到 16 個十六進位數字。
以下為一部系統的
zipl.conf
範例,它在兩個 FCP LUN 的分割區上使用了實體卷冊來作為一個 LVM 卷冊群組 vg_devel1
,它包含了 root 檔案系統的 lv_root
邏輯卷冊。為了讓您輕易理解,此範例中所顯示的是無 multipath 的配置。
[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 的分割區上新增另一個裝置 bus ID 為 0.0.fc00、WWPN 為 0x5105074308c212e9,並且 FCP LUN 為 0x401040a300000000 的實體卷冊,只需將
rd_ZFCP=0.0.fc00,0x5105074308c212e9,0x401040a300000000
附加至 zipl.conf
中,boot kernel 的參數行即可,例如:
[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.