Installing and updating IBMtape

Several steps must be taken before IBMtape is installed or updated on your system to ensure correct installation and system integrity.
  1. Notify users that system maintenance and a restart is completed.
  2. Select a time when all system activity can be stopped to run the installation.
  3. Log in to the target system as root.
  4. Ensure that all user and tape drive activity on the system is halted.
  5. If tape drives that are not owned by IBMtape are installed on the system, list the low-density device special files and find the SCSI addresses with which they are currently associated.
    % ls -l /dev/rmt/*l
    lrwxrwxrwx   1 root     root          72 Aug 26 15:47 /dev/rmt/5l ->
    ../../devices/iommu@f,e0000000/sbus@f,e0001000/QLGC,isp@3,10000/st@2,0:l

    In the preceding example, /dev/rmt/5l and the related 5m, 5h, are controlled by the st device driver and are associated with the device at SCSI address 2, LUN 0. Record the device type, /dev/rmt special file number, owning driver, SCSI target address, and LUN. This information is required later in the installation.

    For example, suppose that an installation has two non-IBM devices that are owned by st at SCSI addresses 2 and 8. The low-density devices are accessed as special files /dev/rmt/5l and /dev/rmt/6l. For the equipment listing after the device information is recorded, refer to Table 1.

    Table 1. Solaris: IBMtape install or update
    DEVICE Old special file Old driver SCSI address/LUN (Old)
    QIC /dev/rmt/5l st 2/0
    QIC /dev/rmt/6l st 8/0
  6. If IBMtape is updating, IBMtape-owned devices are already installed. In that case, list the primary device special files and find the SCSI addresses with which they are currently associated.
    % ls -l /dev/rmt/*st /dev/rmt/*smc
    lrwxrwxrwx   1 root     other         46 Aug 26 16:36 /dev/rmt/0st ->
    ../../devices/pci@6,4000/scsi@3/IBMtape@b,0:st
    
    lrwxrwxrwx   1 root     other         47 Aug 26 16:36 /dev/rmt/1smc ->
    ../../devices/pci@6,4000/scsi@3/IBMtape@b,1:smc
    Note: When the drive is configured with Oracle HBA driver, even though the hardware path shows as st@w10000000c9848d68,0 the device special file still indicates that the drive is configured with IBMtape driver.
    lrwxrwxrwx   1 root     root          80 Feb 22 05:12 /dev/rmt/0st ->
     ../../devices/pci@400/pci@0/pci@d/SUNW,emlxs@0/fp@0,0/
           st@w10000000c9848d68,0:st
    The previous device special file is created by IBMtape. Refer to Special files for detail.

    In this example, /dev/rmt/0st (a SCSI tape drive) is controlled by IBMtape and is associated with the device at SCSI address b, LUN 0. The address is reported in hexadecimal format: The file /dev/rmt/1smc (a SCSI medium changer) is associated with the device at SCSI address b, LUN 1. Record the device type, /dev/rmt special file number, owning driver, SCSI target address, and LUN. This information is required later in the installation.

    For example, suppose that an installation has only an IBMtape-owned device that is installed at SCSI address 8. The device consists of both a tape drive and SCSI medium changer. The tape drive is accessed as /dev/rmt/2st, and the medium changer as /dev/rmt/3smc. For a similar equipment listing after the device information is recorded, refer to Table 2.

    Table 2. Solaris Device Driver - IBMtape - equipment listing example 1
    DEVICE Old special fle Old driver SCSI address/LUN (Old)
    3592 drive /dev/rmt/2st IBMtape 8/0
    TS3500 changer /dev/rmt/3smc IBMtape 8/1
  7. Select one of the following methods to prevent conflicts between IBMtape and other SCSI tape device drivers, depending on the equipment that is attached to your system.
    Note: To prevent more than one device driver from claiming IBMtape-owned devices, IBMtape must be also configured with HBA correctly. Refer to the section of Configuring IBM tape devices with Oracle FC and SAS HBAs for the details.
    Attention: Failure to prevent more than one device driver from operating the same SCSI tape drive can cause system panics or data loss on the tape drive.
    1. If the system has only IBMtape-owned devices that are attached, follow these steps to prevent st and other non-IBM SCSI tape device drivers from claiming the IBM® devices.
      1. Edit /kernel/drv/st.conf, and comment out all SCSI target entries by placing a number sign (#) in the first column of each target entry. The following example shows the entries for SCSI target addresses 0 and 1 commented out. Repeat this operation for all target entries.
        #name="st" class="scsi"
        #target=0 lun=0;
        
        #name="st" class="scsi"
        #target=1 lun=0;
      2. For other non-IBM installed SCSI tape device drivers, remove the drivers if they are not needed. If a driver is for SCSI tape devices only, it is not needed. If a driver is for both tape and disk devices, follow the suppliers’ instructions to disable its access to all SCSI tape devices.
    2. If the system has a mixture of IBMtape-owned devices and other tape drives, follow these steps to configure st and other non-IBM SCSI tape device drivers so that they control a range of target addresses distinct from the range that IBMtape uses. These steps leave target addresses 7 and 15 unclaimed by all target device drivers because SCSI adapters typically use one of the two addresses.
      1. Edit /kernel/drv/st.conf, and comment out SCSI target entries for addresses 7-15 by placing a number sign (#) in the first column of each target entry. In the following example, the entries for SCSI address 7 and 8 are commented out. Repeat this operation for all entries in the target address range 7-15.
        #name="st" class="scsi"
         #target=7 lun=0;
        
         #name="st" class="scsi"
         #target=8 lun=0;
      2. For other non-IBM installed SCSI tape device drivers, follow the suppliers’ instructions to disable their access to all SCSI tape devices in the address range 7-15.
      3. After the IBMtape package is installed, you must alter its configuration file so it does not use SCSI target addresses in the range 0-7 or address 15.

      Now st and other non-IBM SCSI tape device drivers are configured to avoid a conflict with IBMtape.

  8. Remove all special file entries under /dev/rmt. This action ensures that stale entries do not exist after the system is restarted. New entries are created when the system is restarted.
    % rm /dev/rmt/*
  9. Read the next section of Configuring IBM tape devices with Fibre Channel and SAS HBAs, and follow the instruction requirements for the selected HBA in the host machine before or after IBMtape is installed.
  10. If you are updating the level of IBMtape, remove the currently installed IBMtape package. If this procedure is a new installation of IBMtape, skip this step.
    1. Use pkgrm to remove the current level.
      % /usr/sbin/pkgrm IBMtape

      Respond to the pkgrm prompts.

    2. Examine the results from pkgrm. If you see these messages, one or more IBMtape-owned tape drives or tape monitor daemon (TMD) were still in use. Identify the drives and TMD process ID (pid), and end the processes that are using them. If you cannot identify the processes, you must restart the system to free the tape drive, then continue with the installation from this point.
      ...
      Device busy
      Cannot unload module: IBMtape
      Will be unloaded upon reboot.
      ...
  11. Select one of the following methods to install the IBMtape package, depending on the package distribution medium and the location of system resources.
    Note: If this procedure is a new installation of IBMtape, IBM devices are not yet attached to the system, pkgadd error messages similar to the following are output.
    ...
    drvconfig: Driver (IBMtape) failed to attach
    Warning: Driver (IBMtape) successfully added to system
    but failed to attach
    ## The device driver was unable to detect any supported devices!
    ## Verify that the device(s) are properly connected and powered on.
    ## Ensure that the SCSI adapter device driver is installed/configured.
    ## Then try reinstalling the device driver as follows:
    ##   -enter the command: rem_drv IBMtape
    ##   -enter the command: add_drv -m '* 0666 bin bin' IBMtape
    ## If problems persist, contact your IBM service representative.
    pkgadd: ERROR: postinstall script did not complete successfully
    ...

    Later, after you cabled IBM drives to the system and restarted, the driver attaches normally.

    If the distribution medium is a package file in a UNIX file system, complete the following steps. You might obtain a package file by downloading it from the IBM Fix Central website: http://www.ibm.com/support/fixcentral. For information, see Accessing documentation and software online. This example presumes a package file named IBMtape.4.0.2.7 in the /tmp directory.
    1. If necessary, FTP the package file to the target system. Use binary transfer mode. Place the package file in the target system’s /tmp directory.
    2. Use pkgadd to install the driver.
      % /usr/sbin/pkgadd -d /tmp/IBMtape.4.0.2.7
  12. If your system environment includes a mixture of IBMtape-owned devices and devices that are owned by st or another third-party SCSI tape device driver, you must first modify the configuration files for the non-IBM device drivers and restrict them to target addresses in the range 0-6.
    Edit IBMtape.conf, in /usr/kernel/drv, and comment out entries for SCSI target addresses 0-7 and 15. Place a number sign (#) in the first column of each line that makes up the entries. In the following example, the entries for address 0, LUN 0 and address 0, LUN 1 are commented out. Repeat the operation for all stanzas in the address range 0-7 and address 15. Each SCSI target address has a stanza for both LUN 0 and LUN 1.
    #name="IBMtape" class="scsi"
    #target=0 lun=0
    #block_size=0
    #buffering=1
    #immediate=0
    #trailer=0
    #sili=0;
    #name="IBMtape"	 class="scsi"
    #target=0 lun=1
    #block_size=0
    #buffering=1
    #immediate=0
    #trailer=0
    #sili=0;
    In SAN environment, the Fibre Channel HBA driver can map the SCSI target address out of the range 15 and LUN over the number 1. You create a new entry with the mapped SCSI target in IBMtape.conf. In the following example, the IBM tape device is mapped to the SCSI target 32 and LUN 15.
    name="IBMtape" class="scsi"
    target=32 lun=15 
    block_size=0
    buffering=1 
    immediate=0 
    trailer=0 
    sili=0;
    Alternatively, you can modify the configuration file or use the utility that is provided by the Fibre Channel HBA driver to persistently bind the tape device to the expected SCSI target address.
  13. Shut down the system. One common method to complete a shutdown is shown here but use your installation’s normal procedures.
    % /usr/sbin/shutdown -y -g0 -i0
  14. Address or readdress devices as determined by your installation.
    1. If the system has only IBMtape-owned devices that are attached, you can select addresses in the range 0-6 or 8-14. Leave addresses 7 and 15 unused because these addresses are used typically by the SCSI adapter.
      1. For each device, refer to the appropriate IBM hardware reference for any special instructions about addressing. Then, set the address and record the device type, SCSI address, and LUN. For example, suppose that an installation has only IBMtape-owned devices attached. An IBM device with tape drive and medium changer is added. It is addressed at target 4 and the information is recorded. For the results, refer to Table 3
        Table 3. Solaris Device Driver - IBMtape - equipment listing example 2
        DEVICE Old special file Old driver SCSI address/LUN (Old) SCSI address/LUN (New)
        3592 drive - - - 4/0
        TS3500 changer - - - 4/1
    2. If you are using distinct address ranges to separate tape drives that are IBMtape-owned from devices that are owned by st or another supplier’s driver, readdress the tape drives now.
      1. For each device that is owned by st or another SCSI tape device driver, refer to the manufacturer’s hardware reference for any special instructions about readdressing. Then, readdress each device to an address in the range 0-6. For each tape drive that is readdressed, record the new SCSI address next to the special file number and old SCSI address that you recorded previously.
      2. Readdress all tape drives that are owned by IBMtape to addresses in the range 8-14. Refer to the appropriate IBM hardware references for any special instructions about readdressing. For each tape drive that is readdressed, record the new SCSI address next to the special file number and old SCSI address, if any, that you previously recorded.
        For example, suppose that an installation has two non-IBM devices that are owned by st at SCSI addresses 9 and B (12 in decimal). An IBM device with tape drive and medium changer is added. To prevent conflicts between IBMtape and st, the non-IBM devices are all placed at addresses in the range 0-6. The new IBM device is addressed in the range 8-14, at address 10, or 0A. Depending on the addresses that are chosen for the non-IBM devices after device information is readdressed and recorded, refer to Table 4 for the possible equipment listing.
        Table 4. Solaris Device Driver - IBMtape - equipment listing example 3
        DEVICE Old special file Old driver SCSI address/LUN (Old) SCSI address/LUN (New)
        QIC /dev/rmt/2l st 9/0 3/0
        QIC /dev/rmt/3l st b/0 5/0
        3592 drive - - - a/0
        TS3500 changer - - - a/1
        Note: The SCSI target address of Fibre Channel tape device might be over 15.
  15. Cable the tape drives to the system, if not yet done. Refer to the manufacturer’s hardware references for any special instructions about cabling. Ensure that each SCSI bus is terminated properly.
  16. Start the system according to your installation’s normal procedures.
  17. Log on as root and list the device special files in /dev/rmt as you did earlier during the installation.
    % ls -l /dev/rmt/*l
    % ls -l /dev/rmt/*st /dev/rmt/*smc

    Compare the SCSI addresses obtained from ls with the readdressed SCSI targets you recorded. Write the new device special file numbers and owning driver next to the matching new SCSI addresses.

    For example, suppose that an installation previously had two non-IBM devices that are owned by st at SCSI addresses 2-8. An IBM device with tape drive and medium changer is added. To prevent conflicts between IBMtape and st, the non-IBM devices are all placed at addresses in the range 0-6. The new IBM device is addressed in the range 8-14. Depending on the addresses that are chosen after installation is completed and device information is recorded, refer to Table 5 for the possible equipment listing entries.
    Table 5. Solaris Device Driver - IBMtape - equipment listing example 4
    DEVICE Old special file Old driver SCSI address/LUN (Old) SCSI address/LUN (New) New driver New special file (Note)
    QIC /dev/rmt/5l st 2/0 2/0 st /dev/rmt/0l
    QIC /dev/rmt/6l st 8/0 0/0 st /dev/rmt/1l
    3590-B11 drive - - - 8/0 IBMtape /dev/rmt/2st
    3590-B11 changer - - - 8/1 IBMtape /dev/rmt /3smc
    Note: Based on the listing, you can see that the tape drive accessed previously as /dev/rmt/5 is now accessed as /dev/rmt/0, the new medium changer is accessible as /dev/rmt/3smc.
  18. Complete validation of "configuration conflict" to avoid the device that is configured with more than one device driver.
    1. List the device special files in /dev/rmt and check if any unexpected device special file is created by non-IBMtape driver.
    2. Verify whether same SCSI address or WWNN is pointed to different device special files owned by the different device driver. For example, a same tape drive is configured by st driver with the special file of /dev/rmt/0 and by IBMtape driver with /dev/rmt/15st at the same SCSI address (target 0 and LUN 0).
      lrwxrwxrwx   1 root     root          49 Jul 28  2009 /dev/rmt/0 ->
      ../../devices/pci@81,2000/fibre-channel@1/st@0,0: 
      lrwxrwxrwx   1 root     sys           56 Jul 28  2009 /dev/rmt/15st ->
      ../../devices/pci@80,2000/fibre-channel@1/IBMtape@0,0:st
    3. Run the system command or other utility to verify whether the device can be opened by using both device special file names.

      With the device special files in above example, load the cartridge in the drive and run # mt -f /dev/rmt/* stat command

      (1) IBMtape opens the drive.
      # mt -f /dev/rmt/15stn stat
      IBM_ULT3580-TD5  tape drive:
         sense key(0x0)= No Additional Sense   residual= 0   retries= 0
         file no= 0   block no= 0 
      
      (2) st opens the drive.
      # mt -f /dev/rmt/0n stat
      IBM_ULT3580-TD5  tape drive:
         sense key(0x0)= No Additional Sense   residual= 0   retries= 0
         file no= 0   block no= 0
      
      (3) st fails to open the drive. 
      # mt -f /dev/rmt/0n stat
      /dev/rmt/0n: No such file or directory
  19. Verify operation of the newly installed or readdressed equipment.
  20. Notify users of any changed device special files numbers.