• No results found

Configuring Tape and Medium Changer Devices on IBM System z Models

In document Installation and User s Guide (Page 118-120)

The fibre channel topology supported for System z is point-to-point and fabric. Please refer to the Linux on System z fibre channel documents for more details on the supported configurations for fibre channel device attachment. The Linux fibre channel adapter device driver zfcp is available in the kernel that supports zSeries Fibre Channel Protocol. The zfcp device configuration methods in 2.6 and 2.4 kernels are different. For 2.6 kernels, refer to appropriate chapter in the Linux on System z document entitled″Linux on System z: Device Drivers, Features, and Commands″.

For 2.4 kernels, there are three ways to load the zfcp device driver in order to see the attached tape devices.

1. Create a /etc/zfcp.conf file and make a ramdisk to statically attach tape

devices into your system. You can use this method only if you have a persistent mapping in a SAN environment. Every time you reboot the system, the zfcp is automatically loaded and the tape devices can be seen from the system.

First you need to add the device map into this file. The following is an example of zfcp.conf:

0xf1c0 0x1:0x5005076300402733 0x0:0x0000000000000000;\ 0xf1c1 0x1:0x5005076300402733 0x0:0x0001000000000000

The zfcp device driver uses the″map″module parameter to recognize a physically attached tape device. ″map″ takes the following format: map="<devno><port scsi-id>:<wwpn><unit-scsi-lun>:<fcp-lun>;...." Where:

devno The device number of the host bus adapter (16 bits, see

/proc/subchannels). It is″0xf1c0″or″0xf1c1″in the previous example.

port scsi-id

Linux internal SCSI ID assigned to the Fibre Channel port of the SCSI target device (32-bit, must not be 0, must be a unique one-to-one mapping for each World Wide Port Name. It is″0x1″in the previous example.

wwpn World Wide Port Name identifying the Fibre Channel port of the SCSI target device (64-bit). It is″0x5005076300402733″in the previous example.

unit scsi-lun

Linux internal SCSI Logical Unit Number (32-bit). It is″0x0″in the previous example.

fcp-lun

the previous example,″0x0000000000000000″is the Logical Unit Number 0, and″0x0001000000000000″is the Logical Unit Number 1. We recommend, for tape attachment, that each logical unit number be

associated with a unique devno. If you use the same devno numbers for several logical units, you should ensure that each <unit-scsi-lun> is unique. After /etc/zfcp.conf is created, run the following commands:

>mk_initrd>zipl

Then, reboot the system. After it is booted up, your tape device should be shown in /proc/scsi/scsifile.

2. Modify the /etc/modules.conf file to add the zfcp module parameters; then run the″depmod –A″ and″modprobe zfcp″command.

Note: Do not use this choice together with the first one, otherwise it causes conflicts.

The zfcp map in /etc/modules.conf always takes higher priority than the map in /etc/zfcp.conf.

The following example demonstrates the zfcp configuration in/etc/modules.conf: options zfcp map="\

0xf1c0 0x1:0x5005076300402733 0x0:0x0000000000000000;\ 0xf1c1 0x1:0x5005076300402733 0x0:0x0001000000000000"

The map arguments are the same as the ones listed in for the/etc/zfcp.conffile. After modifying the/etc/modules.conffile, save and close it. Then run the following command:

>depmod -A >modprobe zfcp

This installs the zfcp device driver and all of its prerequisite kernel modules. Now you can check the file /proc/scsi/scsito see if all of the attached tape devices are shown in this file. If not, then check the fibre channel connection, such as the fibre cables, or if the devices are powered on, etc.

Then run the following commands to install zfcp: >rmmod zfcp

>modprobe zfcp

3. Run the ″modprobe zfcp″command first, then dynamically add a tape device into the system after you physically attach a fibre channel tape device to the switch.

If you physically attach a tape device on the switch and zfcp is already loaded, you do not need to reboot the Linux system in order to add this entry in the /proc/scsi/scsifile. The zfcp device driver provides an″add_map″proc system entry under the directory/proc/scsi/zfcpto allow you to dynamically add the device into the system. For example, to add two logical units from the example in Step 2 into the system, you may issue the following commands;

> echo "0xf1c0 0x1:0x5005076300402733 0x0:0x0000000000000000;\

0xf1c1 0x1:0x5005076300402733 0x0:0x0001000000000000" > /proc/scsi/zfcp/add_map > echo "scsi add-single-device 0 0 1 0" > /proc/scsi/scsi

> echo "scsi add-single-device 1 0 1 1" > /proc/scsi/scsi

The″scsi add-single-device″takes four parameters, corresponding to the four parameters″scsi″,″Channel″,″Id″, and″Lun″in the/proc/scsi/scsifile. The value of″scsi″is 0 for the first devno, 1 for the second devno (if it is different from the first devno), and so on. The value of″Channel″can start from 0 for each different″scsi″value. The value of″Id″is the one you use for <unit scsi-lun> in

target device, for example, the last number in the previous mapping. Currently, the zfcp device driver does not support dynamically removing the attached devices. If you need to remove the tape devices from the system, do″rmmod zfcp″. Then you can delete the entry in /etc/modules.confand reload zfcp, or reload zfcp first and dynamically add the devices you want. After you have done all the mapping, if you can see all of the attached tape devices in

/proc/scsi/scsi, you have successfully attached those devices to your system. Next you may install the lin_tape device driver. Refer to the "“Installation

Procedure” on page 97″section in this chapter for the instructions on how to install lin_tape.

In document Installation and User s Guide (Page 118-120)