Show Table of Contents
25.2. 添加使用 FCP 的逻辑单位(LUN)
以下是如何添加 FCP LUN 的示例。
注意
如果在 z/VM 中运行,请确定将 FCP 适配器附加到 z/VM 虚拟机中。要在产品环境中形成多路径,则必须至少在两个不同的物理适配器中(CHPID)中有两个 FCP 设备。例如:
CP ATTACH FC00 TO *CP ATTACH FCD0 TO *
25.2.1. 动态激活 FCP LUN
按以下步骤操作激活 LUN:
- 使用
cio_ignore命令从忽略的设备列表中删除 FCP 适配器,并使其出现在 Linux 中:# cio_ignore -r DeviceNumber使用 FCP 适配器的设备号替换 DeviceNumber。例如: - 要使 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
- 通过将 FCP LUN 添加到要访问 LUN 的端口(WWPN)激活它:
# 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
有关详情请参考《System z 中的 Linux: Red Hat Enterprise Linux 6 中的设备驱动程序、特性和命令》中《使用光纤的 SCSI》一章。

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.