Show Table of Contents
19.2. FCP 接続の LUN (論理 ユニット) を追加する
FCP LUN の追加方法の例を以下に示します。
注記
z/VM 下で実行している場合は、FCP アダプターが z/VM ゲストの仮想マシンに接続されていることを確認してください。実稼働環境でのマルチパス設定には、2 つの異なる物理アダプター (CHPID) 上に少なくとも 2 つの FCP デバイスを配置することになります。
CP ATTACH FC00 TO *CP ATTACH FCD0 TO *
19.2.1. FCP LUN を動的にアクティベートする
LUN をアクティベートするには以下の手順に従います。
cio_ignoreユーティリティーを使用して FCP アダプターを無視されるデバイスの一覧から削除し、それを Linux から見えるようにします。#cio_ignore -r device_numberdevice_number には FCP アダプターのデバイス番号を入れます。- 以下のコマンドを使って FCP をオンラインにします。
#chccwdev -e fc00 - zfcp デバイスドライバーの自動ポートスキャンで必要な WWPN が検出されたか確認します。
#ls -l /sys/bus/ccw/drivers/zfcp/0.0.fc00/drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x500507630040710b drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x50050763050b073d drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x500507630e060521 drwxr-xr-x. 3 root root 0 Apr 28 18:19 0x500507630e860521 -r--r--r--. 1 root root 4096 Apr 28 18:17 availability -r--r--r--. 1 root root 4096 Apr 28 18:19 card_version -rw-r--r--. 1 root root 4096 Apr 28 18:17 cmb_enable -r--r--r--. 1 root root 4096 Apr 28 18:17 cutype -r--r--r--. 1 root root 4096 Apr 28 18:17 devtype lrwxrwxrwx. 1 root root 0 Apr 28 18:17 driver -> ../../../../bus/ccw/drivers/zfcp -rw-r--r--. 1 root root 4096 Apr 28 18:17 failed -r--r--r--. 1 root root 4096 Apr 28 18:19 hardware_version drwxr-xr-x. 35 root root 0 Apr 28 18:17 host0 -r--r--r--. 1 root root 4096 Apr 28 18:17 in_recovery -r--r--r--. 1 root root 4096 Apr 28 18:19 lic_version -r--r--r--. 1 root root 4096 Apr 28 18:17 modalias -rw-r--r--. 1 root root 4096 Apr 28 18:17 online -r--r--r--. 1 root root 4096 Apr 28 18:19 peer_d_id -r--r--r--. 1 root root 4096 Apr 28 18:19 peer_wwnn -r--r--r--. 1 root root 4096 Apr 28 18:19 peer_wwpn --w-------. 1 root root 4096 Apr 28 18:19 port_remove --w-------. 1 root root 4096 Apr 28 18:19 port_rescan drwxr-xr-x. 2 root root 0 Apr 28 18:19 power -r--r--r--. 1 root root 4096 Apr 28 18:19 status lrwxrwxrwx. 1 root root 0 Apr 28 18:17 subsystem -> ../../../../bus/ccw -rw-r--r--. 1 root root 4096 Apr 28 18:17 uevent - LUN へのアクセスに使用するポート (WWPN) に FCP LUN を追加して FCP LUN をアクティベートします。
#echo 0x4020400100000000 > /sys/bus/ccw/drivers/zfcp/0.0.fc00/0x50050763050b073d/unit_add - 割り当て済みの SCSI デバイス名を見つけます。
#lszfcp -DV/sys/devices/css0/0.0.0015/0.0.fc00/0x50050763050b073d/0x4020400100000000 /sys/bus/ccw/drivers/zfcp/0.0.fc00/host0/rport-0:0-21/target0:0:21/0:0:21:1089355792
19.2.2. FCP LUN を永続的にアクティベートする
上記では、実行中のシステムで FCP LUN を動的にアクティベートする手順を説明しています。ただし、このような変更は永続的ではないため、再起動時に失われてしまいます。Linux システムにおいて FCP 設定の変更を永続化する方法は、FCP LUN が root ファイルシステムに属しているかどうかによって異なります。root ファイルシステムに必要な FCP LUN は、root ファイルシステムをマウントできるようにするために、ブートプロセスのごく初期段階に
initramfs によってアクティベートされる必要があります。cio_ignore コマンドは、永続的なデバイス設定に応じて透過的に処理されるので、無視する一覧からデバイスを手動で解放する必要はありません。
19.2.2.1. root ファイルシステムの一部である FCP LUN
root ファイルシステムの一部である FCP LUN を追加するには、
/etc/zipl.conf ファイルの変更のみが必要です。その後に zipl ブートローダツールを実行します。initramfs を再作成する必要はありません。
Red Hat Enterprise Linux は、ブートプロセスの早い段階で FCP LUN をアクティブにするためのパラメーターである
rd.zfcp= を提供します。この値は、コンマで区切ったデバイスバス ID と 0x で始まる 16 進法の 16 桁の数字の WWPN と 0x で始まる 16 進法の 16 桁の数字の右側にゼロの列記を持つ FCP LUN とから構成されます。
以下の例は、LVM ボリュームグループ
vg_devel1 用の 2 つの FCP LUN パーティション上にある 物理ボリュームを使用するシステム用の zipl.conf です。この LVM ボリュームグループには root ファイルシステム用の論理ボリューム lv_root が含まれています。単純にするため、この例ではマルチパスなしの設定となっています。
[defaultboot] default=linux target=/boot/ [linux] image=/boot/vmlinuz-2.6.32-19.el7.s390x ramdisk=/boot/initramfs-2.6.32-19.el7.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,!condev"
デバイスバス ID 0.0.fc00、WWPN 0x5105074308c212e9、および FCP LUN 0x401040a300000000 を持つ 3 つ目の FCP LUN のパーティション上にもう 1 つの物理ボリュームを追加するには、
rd_zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000 を zipl.conf ファイル内のブートカーネルのパラメーター行に追加します。例を示します。
[defaultboot]
default=linux
target=/boot/
[linux]
image=/boot/vmlinuz-2.6.32-19.el7.s390x
ramdisk=/boot/initramfs-2.6.32-19.el7.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,!condev"警告
/etc/zipl.conf 内のカーネルコマンドラインの長さが 896 バイトを超えないようにしてください。これを超えてしまうとブートローダーの保存ができず、インストールに失敗します。
zipl を実行して次回の IPL に
/etc/zipl.conf の変更を適用します。
#zipl -VUsing 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.el7.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,!condev' initial ramdisk...: /boot/initramfs-2.6.32-19.el7.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.
19.2.2.2. root ファイルシステムの一部を構成しない FCP LUN
データディスクなど、root ファイルシステムの一部を構成しない FCP LUN は
/etc/zfcp.conf ファイル内で永続的に設定します。1 行に 1 つの FCP LUN を設定します。各行には FCP アダプターのデバイスバス ID、0x で始まる 16 桁の数字の WWPN、0x で始まり右側にゼロの列記を持つ 16 桁の数字の FCP LUN をそれぞれ空白かタブで区切って含めます。FCP アダプターがシステムに追加されると /etc/zfcp.conf 内のエントリーが udev によってアクティベートされ設定されます。起動時には、システム側で見える FCP アダプターがすべて追加され、udev が起動されます。
/etc/zfcp.conf のコンテンツの例:
0.0.fc00 0x5105074308c212e9 0x401040a000000000 0.0.fc00 0x5105074308c212e9 0x401040a100000000 0.0.fc00 0x5105074308c212e9 0x401040a300000000 0.0.fcd0 0x5105074308c2aee9 0x401040a000000000 0.0.fcd0 0x5105074308c2aee9 0x401040a100000000 0.0.fcd0 0x5105074308c2aee9 0x401040a300000000
/etc/zfcp.conf での変更は、システムを再起動するか、システムの I/O 設定を変更して新規の FCP チャネルを動的に追加 (つまり、チャネルを z/VM 下で接続) した後でしか有効になりません。別の方法として、今までアクティブではなかった FCP アダプター用に編集した /etc/zfcp.conf 内の新規エントリーをアクティベートする場合は以下のコマンドを順番に実行します。
cio_ignoreユーティリティーを使用して FCP アダプターを無視されるデバイスの一覧から削除し、それを Linux から見えるようにします。#cio_ignore -r device_numberdevice_number には FCP アダプターのデバイス番号を入れます。#cio_ignore -r fcfc- 次に変更をアクティベートする uevent を開始します。
#echo add > /sys/bus/ccw/devices/device-bus-ID/uevent例を示します。#echo add > /sys/bus/ccw/devices/0.0.fcfc/uevent

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.