Questo contenuto non è disponibile nella lingua selezionata.
20.2. Adding FCP-attached Logical Units (LUNs)
The following is an example of how to add an FCP LUN.
Note
If running under z/VM, make sure the FCP adapter is attached to the z/VM guest virtual machine. For multipathing in production environments there would be at least two FCP devices on two different physical adapters (CHPIDs). For example:
CP ATTACH FC00 TO * CP ATTACH FCD0 TO *
CP ATTACH FC00 TO *
CP ATTACH FCD0 TO *
20.2.1. Dynamically Activating an FCP LUN Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
Follow these steps to activate a LUN:
- Use the
cio_ignore
utility to remove the FCP adapter from the list of ignored devices and make it visible to Linux:cio_ignore -r device_number
# cio_ignore -r device_numbercio_ignore -r device_number
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace device_number with the device number of the FCP adapter. For example: - To bring the FCP adapter device online, use the following command:
chccwdev -e fc00
# chccwdev -e fc00
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Verify that the required WWPN was found by the automatic port scanning of the zfcp device driver:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Activate the FCP LUN by adding it to the port (WWPN) through which you would like to access the LUN:
echo 0x4020400100000000 > /sys/bus/ccw/drivers/zfcp/0.0.fc00/0x50050763050b073d/unit_add
# echo 0x4020400100000000 > /sys/bus/ccw/drivers/zfcp/0.0.fc00/0x50050763050b073d/unit_add
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Find out the assigned SCSI device name:
lszfcp -DV
# 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
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
20.2.2. Persistently activating FCP LUNs Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The above instructions described how to activate FCP LUNs dynamically in a running system. However, such changes are not persistent and do not survive a reboot. How you make the changes to the FCP configuration persistent in your Linux system depends on whether the FCP LUNs belong to the root file system. Those required for the root file system need to be activated very early during the boot process by the
initramfs
to be able to mount the root file system. The cio_ignore
commands are handled transparently for persistent device configurations and you do not need to free devices from the ignore list manually.
20.2.2.1. FCP LUNs That Are Part of the Root File System Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
The only file you have to modify for adding FCP LUNs that are part of the root file system is
/etc/zipl.conf
followed by a run of the zipl boot loader tool. There is no more need to recreate the initramfs
.
Red Hat Enterprise Linux provides a parameter to activate FCP LUNs early in the boot process:
rd.zfcp=
. The value is a comma-separated list containing the device bus ID, the WWPN as 16 digit hexadecimal number prefixed with 0x
, and the FCP LUN prefixed with 0x
and padded with zeroes to the right to have 16 hexadecimal digits.
The following example
zipl.conf
is for a system that uses physical volumes on partitions of two FCP LUNs for an LVM volume group vg_devel1
that contains a logical volume lv_root
for the root file system. For simplicity, the example shows a configuration without multipathing.
To add another physical volume on a partition of a third FCP LUN with device bus ID 0.0.fc00, WWPN 0x5105074308c212e9 and FCP LUN 0x401040a300000000, add
rd.zfcp=0.0.fc00,0x5105074308c212e9,0x401040a300000000
to the parameters line of your boot kernel in zipl.conf
. For example:
Warning
Make sure the length of the kernel command line in
/etc/zipl.conf
does not exceed 896 bytes. Otherwise, the boot loader cannot be saved, and the installation fails.
Run zipl to apply the changes of
/etc/zipl.conf
for the next IPL:
20.2.2.2. FCP LUNs That Are Not Part of the Root File System Copia collegamentoCollegamento copiato negli appunti!
Copia collegamentoCollegamento copiato negli appunti!
FCP LUNs that are not part of the root file system, such as data disks, are persistently configured in the file
/etc/zfcp.conf
. It contains one FCP LUN per line. Each line contains the device bus ID of the FCP adapter, the WWPN as 16 digit hexadecimal number prefixed with 0x
, and the FCP LUN prefixed with 0x
and padded with zeroes to the right to have 16 hexadecimal digits, separated by a space or tab. Entries in /etc/zfcp.conf
are activated and configured by udev when an FCP adapter is added to the system. At boot time, all FCP adapters visible to the system are added and trigger udev.
Example content of
/etc/zfcp.conf
:
Modifications of
/etc/zfcp.conf
only become effective after a reboot of the system or after the dynamic addition of a new FCP channel by changing the system's I/O configuration (for example, a channel is attached under z/VM). Alternatively, you can trigger the activation of a new entry in /etc/zfcp.conf
for an FCP adapter which was previously not active, by executing the following commands:
- Use the
cio_ignore
utility to remove the FCP adapter from the list of ignored devices and make it visible to Linux:cio_ignore -r device_number
# cio_ignore -r device_numbercio_ignore -r device_number
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace device_number with the device number of the FCP adapter. For example:cio_ignore -r fcfc
# cio_ignore -r fcfc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - To trigger the uevent that activates the change, issue:
echo add > /sys/bus/ccw/devices/device-bus-ID/uevent
# echo add > /sys/bus/ccw/devices/device-bus-ID/ueventecho add > /sys/bus/ccw/devices/device-bus-ID/ueventecho add > /sys/bus/ccw/devices/device-bus-ID/uevent
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For example:echo add > /sys/bus/ccw/devices/0.0.fcfc/uevent
# echo add > /sys/bus/ccw/devices/0.0.fcfc/uevent
Copy to Clipboard Copied! Toggle word wrap Toggle overflow