Вы находитесь на странице: 1из 4

Document Type Document Title

Filename/Document Identifier Persistent Binding.Doc

Configuration Persistent Binding for Tape Devices


Version / Author
01/ Manoj Siricilla

Creation Date
07/14/2007

Modified Date
07/14/2007

Page No

1 of 4

1. Introduction This Document is designed to implement persistent binding for tape devices on intended servers running on a Solaris Platforms. This is a generic document until the specific server details are mentioned. This document provides detailed instructions in configuring and un-configuring persistent binding and does not provide any support related or troubleshooting information. 2. Need and Scope The Sun StorEdge SAN Foundation software stack on a Solaris system dynamically detects devices in a SAN and builds associated /dev entries. 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). Binding the devices with a specific number across servers enables us to explicitly specify how that /dev/rmt entries are to be created and further ensures the /dev entries are identical across multiple servers on a SAN. 3. Prerequisite a. It is recommended to have the Sun StorEdge San Foundation Patch 4.4.12 Installed. Follow the link for release notes http://www.sun.com/products-n-solutions/hardware/docs/pdf/819-5604-14.pdf b. If using LTO drives please install the st patch. The patch 108725-21 has fixes for LTO devices but it is recommended to install patch 108725-27. Please Note: This document in no way authorizes or certifies that the above mentioned recommendations. They are based on detailed study of various environments and what seemed to have worked for the author. 4. Target Environment The targeted environment should be Sun solaris 8, 9, 10. 5. Approach 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. You might not find any entries for tapes as devfsadm can create links for tape devices and specifying rules is only optional and needs to be taken on case to case basis. The following is a sample entry for tape in the devlink.tab file.

type=ddi_byte:tape;addr=w<PWWN>,<LUN>; rmt/<rmt #>\M0

Document Type Document Title


Filename/Document Identifier Persistent Binding.Doc

Configuration Persistent Binding for Tape Devices


Version / Author
01/ Manoj Siricilla

Creation Date
07/14/2007

Modified Date
07/14/2007

Page No

2 of 4

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. If, for example, you wanted the /dev/rmt/ number to be 40 for a tape device with PWWN 500104f00079bca2, you would create an entry in /etc/devlink.tab will look like that shown below.

type=ddi_byte:tape;addr=w500104f00079bca2,0; rmt/40\M0

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. 6. Additional Notes a. 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. b. 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. c. 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. d. 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. 7. Complete Configuration of Tape devices on a Solaris Box for Veritas Netbackup

forceload: drv/st forceload: drv/sg

Check to see if the following entries are present in the /etc/system file These statements prevent st and sg drivers being unloaded from memory

forceload: drv/fcaw

Entry needs to be present in /etc/system file for Fiber channel drivers Check if the entries are present in the /etc/system file if there are more than 16 tape drives. These statements increase the maximum no. of messages that can be created and the number of bytes per queue.

set msgsys:msginfo_msgtql=512 set msgsys:msginfo_msgmnb=65536

Document Type Document Title


Filename/Document Identifier Persistent Binding.Doc

Configuration Persistent Binding for Tape Devices


Version / Author
01/ Manoj Siricilla

Creation Date
07/14/2007

Modified Date
07/14/2007

Page No

3 of 4

/usr/openv/volmgr/bin/driver/st.conf /usr/openv/volmgr/bin/driver/sg.conf /usr/openv/volmgr/bin/driver/sg.links /kernel/drv/st.conf /kernel/drv/sg.conf

Make a copy of all these files by creating a directory and copying all those files to that directory Use mkdir to create directory and cp to copy

Sun StorEdge devices require additional configuration on a solaris system for use by Veritas Netbackup. On performing/checking the above mentioned points follow the steps to perform a initial configuration for Reconfiguration please look at the Section no. 8 a. Building the st.conf, sg.conf and sg.links files a. Browse to the directory /usr/openv/volmgr/bin/driver b. Execute the following ../sg.build all mt 15 ml 12 Where mt stands for max targets and ml for max luns b. The below lines adds support for Fibre Channel Tapes and need to be included in the /kernel/drv/st.conf name="st" parent="fp" target=0; name="st" parent="fp" target=1; Comment out the existing entries in the /kernel/drv/st.conf and append the file with the entries from /usr/openv/volmgr/bin/driver/st.conf c. Append the /etc/devlink.tab with intended minor number for specific tape devices based on their PWWN and Luns. Please Note, The numbers assigned for binding of tape devices should be high enough to avoid conflicts. Please Note: It is highly recommended to make a copy of the devlink.tab Here is a sample of entries that needs to be appended to the devlink.tab file. Important: The minor numbers needs to be identical across servers or else persistent binding cannot be achieved. In short, the appended details of tape devices to the devlink.tab file need to be identical across servers. type=ddi_byte:tape;addr=w500104f00079bca2,0; type=ddi_byte:tape;addr=w500104f00079bc7e,0; type=ddi_byte:tape;addr=w500104f00079bc72,0; type=ddi_byte:tape;addr=w500104f00079bc4e,0; type=ddi_byte:tape;addr=w500104f00079bc4b,0; type=ddi_byte:tape;addr=w500104f00079bc1e,0; rmt/65\M0 rmt/66\M0 rmt/67\M0 rmt/68\M0 rmt/69\M0 rmt/70\M0

d. Run devfsadm. This creates new links as per the entries in /etc/devlink.tab in addition to automatically creating links for any unspecified devices. e. Check if the device entries are created as desired by doing a ls l /dev/rmt/* f. Rename the existing sg.conf in /kernel/drv. Vertias Netbackup requires this to be done as it uses a Generic SCSI Pass through driver to communicate with the tape devices mv /kernel/drv/sg.conf /kernel/drv/sg.conf.old

Document Type Document Title


Filename/Document Identifier Persistent Binding.Doc

Configuration Persistent Binding for Tape Devices


Version / Author
01/ Manoj Siricilla

Creation Date
07/14/2007

Modified Date
07/14/2007

Page No

4 of 4

g. Install the Veritas SCSI pass through driver /usr/openv/volmgr/bin/driver/sg.install h. perform a sgscan to make sure the StorEdge devices are properly built and the tape devices are been recognized by the intended minor numbers.

8. Reconfiguration a. If devfsadm has previously discovered the devices, you must determine the device address by running the ls -l command on the existing link. (Using 0 as the OS starts discovering the minor number 0)

# ls -l 0 lrwxrwxrwx 1 root other 71 May 15 18:07 0 -> ../../devices/pci@1c,600000/SUNW,qlc@1,1/fp@0,0/st@w500104f00079bca2,0: b. Include an entry in the /etc/devlink.tab as follows type=ddi_byte:tape;addr=w500104f00079bca2,0; rmt/65\M0 Repeat step a and b for all the tape devices already discovered by the OS and for which minor numbers have been assigned. d. Remove existing links from /dev/rmt by running the rm /dev/rmt/* command. e. Run devfsadm. This creates new links as per the entries in /etc/devlink.tab in addition to automatically creating links for any unspecified devices. f. On completion of the above process you would see links created for tape devices based on the entries specified in devlink.tab # ls -l 65 lrwxrwxrwx 1 root other 71 May 15 18:07 65 -> ../../devices/pci@1c,600000/SUNW,qlc@1,1/fp@0,0/st@w500104f00079bca2,0: 9. Backout plan a. b. c. d. e. Copy all the originals files back to their original locations Remove all the entries appended to the devlink.tab file Run devfsadm Rename the /kernel/drv/sg.conf.old to /kernel/drv/sg.conf Run /usr/openv/volmgr/bin/driver/sg.install deinstall c.

Вам также может понравиться