C H A P T E R 8 |
Persistent Binding for Tape Devices |
To simplify management of servers in SAN-based data-centers, the Sun StorageTek SAN Foundation software stack in the Sun Solaris Operating System (OS) dynamically detects devices in a SAN and builds associated /dev tree entries without requiring you to edit configuration files.
In most cases, this greatly simplifies SAN management. However, for tape devices, you might like the ability to explicitly specify how that /dev entries are created and to ensure the /dev entries are identical across multiple servers on a SAN. This chapter describes how you can specify this tape binding in the Sun Solaris OS while retaining the benefits of automatic discovery and addition for disk-based devices.
The /dev/rmt directory contains links to physical devices under /devices for tape devices. Each tape LUN seen by the system is represented by 24 minor nodes in the form of /dev/rmt/N, /dev/rmt/Nb, and /dev/rmt/Nbn, where N is an integer counter starting from 0. This number is picked by devfsadm during enumeration of new devices. Every new tape logical unit number (LUN) found by devfsadm gets the next available number in /dev/rmt.
Since the /dev/rmt name depends on the order in which devices appear in the device tree, it changes from host to host. For a given tape drive that is seen by two or more different hosts, the /dev/rmt link can be different on each of these hosts. This breaks the most common usage of Symantec (VERITAS) NetBackup (SSO option). Also, if the drive is replaced the links change unless the vendor provides a way to retain the port World-Wide Name (PWWN) of the drive.
The /etc/devlink.tab file is called the default device table file. It specifies rules that devfsadm uses to create links in the /dev directory. Type man devlinks on the command-line interface (CLI) for more information. Currently there are no entries in this file for tapes, because devfsadm is already able to create links for tape drives, but rules can be added that will modify the default behavior for creating tape links.
The following is a sample entry for tape in the devlink.tab file.
Change the rmt # to whatever /dev/rmt/N is required. Then change the PWWN and LUN to match the desired tape device. You can obtain this by running the ls -l command on the existing /dev/rmt/ link as shown below.
# ls -l /dev/rmt/4 lrwxrwxrwx 1 root root 69 Oct 6 14:57 /dev/rmt/4 -> ../../devices/pci@1f,700000/SUNW,qlc@2/fp@0,0/st@w5005076300617717,0: # |
If, for example, you wanted the /dev/rmt/ number to be 40, you would create an entry in /etc/devlink.tab will look like that shown below.
You can then add this line to the devlink file on every Solaris server on the SAN that uses this drive so that it always appears as minor node 40.
1. For any tape drive visible to the Sun Solaris OS but not specified in the devlink file, devfsadm automatically assigns a minor node number starting from 0. These minor node numbers will conflict with any lower numbers assigned manually in /etc/devlink.tab, so be sure to assign numbers there that are high enough to avoid conflicts.
2. This approach can easily lead to duplicate links in /dev/rmt. Any tapes discovered before entries were specified in /etc/devlink.tab have automatically created links. When entries are added and devfsadm is run, the original links will remain in /dev/rmt, resulting in duplicate links. To remove the original links in /dev/rmt, run the rm /dev/rmt/* command before running devfsadm.
3. This approach cannot be used with multi-ported tape drives that are attached to multiple HBA ports. If there are multiple HBA ports attached to the same tape LUN, the system detects two tape drives instead of one. The one that appears last in the prtconf output gets the link generated by the /etc/devlink.tab.
1. Create the entries in /etc/devlink.tab as described in Approach.
If devfsadm has previously discovered the devices, you must determine the device address by running the ls -l command on the existing link.
Note - Be sure to assign /dev/rmt/N numbers to avoid conflicts with any automatically configured devices, as described above. |
2. Remove existing links from /dev/rmt by running the rm /dev/rmt/* command.
This creates new links as per the entries in /etc/devlink.tab in addition to automatically creating links for any unspecified devices.
Copyright © 2006, Sun Microsystems, Inc. All Rights Reserved.