Adding additional permanent devices for zSeries hosts running Linux

This section provides instructions for adding additional permanent devices for zSeries hosts running Linux.

You must collect the following software configuration information to prepare a Linux system to access the storage unit through a fibre channel:
  • Host name of the server that is hosting the Linux system
  • Device address and CHPID of the FCP port that is attached to the Linux machine
  • Worldwide port name (WWPN) of the FCP port on the zSeries®
  • Fibre-channel port on the storage unit
  • WWPN of the fibre-channel port on the storage unit

You can obtain that information from the hardware management console (HMC), the IBM® System Storage™ DS Storage Manager, and the SAN switch. Figure 1 shows examples of the prerequisite information that you must obtain to run FCP Linux on the zSeries.

Figure 1. Example of prerequisite information for FCP Linux on zSeries
Linux hostname linuxa
CHPID of the FCP port on the z800 15
WWPN of the FCP port on the z800 50:05:07:64:01:40:01:7d
FC port on the storage unit Enclosure 3 Slot 1
WWPN of the FC port on the storage unit 50:05:07:63:00:c8:95:89
  1. Choose one of the following methods to add devices: write a script or add the device manually.
    1. To add more than one device to your SCSI configuration, write a small script that includes all the parameters included. Figure 2 shows an example of such a script. This is an optional step.
      Figure 2. Example of a script to add more than one device
      rmmod zfcp
      modprobe qdio
      modprobe scsi_mod
      insmod zfcp map="\
      0x0600 1:0x5005076300c89589 0:0x5301000000000000;\
      0x0600 1:0x5005076300c89589 1:0x5302000000000000;\
      0x0600 1:0x5005076300c89589 2:0x5300000000000000"
      modprobe sd_mod
    2. Alternatively, you can also add SCSI devices to an existing configuration with the add_map command. After using this command, you must manually make the devices known to the SCSI stack. Figure 3 shows an example of how to add SCSI devices through the add_map command.
      Figure 3. Example of how to add SCSI devices through the add_map command
      linuxa:~#echo "0x0600 0x00000001:0x5005076300c89589 \
      0x00000001:0x5302000000000000">/proc/scsi/zfcp/add_map
      
      linuxa:~#echo "scsi add-single-device 0 0 1 1">/proc/scsi/scsi
  2. To make the devices available permanently, after a reboot, you must create a new initial ramdisk (RAM that is accessed like a disk) that contains the necessary modules and parameter information. First, save the module parameters in the configuration file /etc/zfcp.conf, as shown in Figure 4.
    Figure 4. Saving the module parameters in the /etc/zfcp.conf file
    linuxa:~#cat /proc/scsi/zfcp/map >/etc/zfcp.conf
    linuxa:~#cat /etc/zfcp.conf
    0x0600 0x00000001:0x5005076300c89589 0x00000000:0x5301000000000000
    0x0600 0x00000001:0x5005076300c89589 0x00000001:0x5302000000000000
    0x0600 0x00000001:0x5005076300c89589 0x00000002:0x5300000000000000
  3. Create a new ramdisk with the mk_initrd utility and then run the zipl utility to update the initial program load record to point to the new ramdisk.
  4. Enable multipath support, which is provided by the logical volume manager kernel for Linux z/FCP.
    1. Create physical volumes with the following commands:
      pvcreate /dev/sda1
      pvcreate /dev/sdb1...
    2. Put the physical volumes into a volume group with the following command:
      vgcreate fcpvg /dev/sda1 /dev/sdb1...
    3. Create as many logical volumes as you want with the following command:
      lvcreate --size 16G fcpvg
    4. Enable the alternate paths to the physical volumes with the pvpath command.
      pvpath --path0 --enable y /dev/sda1
      pvpath --path1 --enable y /dev/sda1
      If both paths have a weight of 0, they will loadbalance.
  5. These configurations yield the SCSI device /dev/sda - /dev/sdc accessed on the first path and the SCSI device /dev/sdd - /dev/sdf accessed on the second path, as shown in Figure 5.
    Figure 5. Example of Logical Volume Manager Multipathing
    rmmod zfcp modprobe qdio modprobe scsi_mod insmod zfcp map="\ 0x0600 1:0x5005076300c89589
    0:0x5301000000000000;\ 0x0600 1:0x5005076300c89589 1:0x5302000000000000;\
    0x0600 1:0x5005076300c89589 2:0x5300000000000000;\ 0x0700 1:0x5005076300ca9589
    0:0x5301000000000000;\ 0x0700 1:0x5005076300ca9589 1:0x5302000000000000;\
    0x0700 1:0x5005076300ca9589 2:0x5300000000000000" modprobe sd_mod
Library | Support | Terms of use | Feedback
© Copyright IBM Corporation 2004, 2007. All Rights Reserved.