| toyou 回复于:2004-07-20 09:59:39 |
| Configuring an External SCSI Tape Drive on a Sun Enterprise Server
By Carl Grammer Not every shop running the Solaris Operating System has the resources -- or even the need -- for backup solutions like fancy tape auto-changers, libraries, or silos. Often all that is needed is a backup, or ufsdump, of the root file system, an important database, or the code from a small development project. In these cases, an external device such as a SCSI DDS tape drive will often suffice. The following information should aid in configuring your external device on most Sun Enterprise servers that have an external SCSI connection. This information applies to Solaris 7 OS or later versions. Configuring the Solaris Operating System for the Tape Drive When adding an external SCSI tape drive, it is necessary to modify the Solaris OS configuration file /kernel/drv/st.conf. As root, go to the /kernel/drv/ directory and make a backup of the st.conf file. # cp st.conf st.conf.bak Using an editor such as vi, open the file and go to the following line: # tape-config-list= If it has not already been uncommented, remove the # to uncomment the line. The following section of the file consists of the configuration settings for some commonly used tape drives. They are presented as three quoted and comma-delimited fields. If you happen to be installing a drive that is on this list, scroll down to that line and uncomment it. For example, if you are installing a WangDAT 3400, the line will look like this: # "WangDAT Model 3400", "WangDAT 4mm DAT", "WangDAT", If it has not already been uncommented, remove the # to uncomment the line. Also, if this is the last or the only tape drive to be configured, change the comma at the end of the line to a semicolon. Important note: The configuration line of the last tape drive enabled (that is, the last uncommented line) must end in a semicolon. The semicolon indicates the end of the list of enabled drives. All enabled drives that appear before the last enabled drive must end in a comma. Otherwise, you will get errors when performing a reconfiguration reboot. Scroll down to the next section of the file, to find the line in which the field preceding the equal sign (=) matches the previously noted third field in quote marks from the enabled tape drive's configuration line. Continuing with the example of the WangDAT drive, you would search for the line that begins with WangDAT, like this: #WangDAT = 1,0x2b,0,0x659,1,0x00,0; Uncomment this line. Note that if there is more than one matching entry, you may have to experiment to find the entry that produces the best results. Now save the edited file. Please note: If the st.conf file does not contain configuration information for the type of drive you are installing, it will be necessary to get the configuration entries from the manufacturer. Determining and Setting the Drive's SCSI ID Devices on a SCSI bus must be configured with a unique SCSI ID, often called the target ID. When adding a SCSI device, it must be assigned an unused ID. It is therefore necessary to determine which IDs are already in use on the server. Sun Enterprise servers will typically reserve the following IDs for specific internally connected devices: 5 for Internal Tape Drive 6 for CD-ROM 7 for Host Adapter In addition, the boot disk device will typically use ID 0, although it is not reserved for this purpose. To determine which IDs are in use, follow the steps below: Boot the system to the ok prompt. Set the NVRAM auto-boot? parameter to false. ok setenv auto-boot? false This will save time by preventing the system from booting into the Solaris OS until you want it to. If you used the Solaris OS halt command or the Stop-a key sequence to get to the ok prompt, run the reset command to clear all buffers and registers before entering any other commands. If you do not do this, the system may lock up. ok reset The system will do a hardware reset and return to the ok prompt (assuming the auto-boot? parameter is set to false). If you plan to connect the tape drive to the external connector of the primary on-board SCSI bus, run the following command to determine the targets in use on this bus: ok probe-scsi On systems with OpenBoot 3.x or later, the following warning will be displayed: Shutting down the Solaris Operating System abruptly with the Stop-a sequence, or with the halt command, creates a condition where running the probe command hangs the system unless you run the reset-all command first. If you have run the reset command, respond with "y" when prompted. You will be presented with a display similar to the following: Primary UltraSCSI bus: Target 0 Unit 0 Disk IBM DDYST1835SUN18G S94A Target 1 Unit 0 Disk IBM DDYST1835SUN18G S94A Removable-Media/External SCSI bus Target 6 Unit 0 Removable Read Only Device Disk TOSHIBA XM6201TASUN32XCD1103 This display indicates that targets 0, 1, and 6 are in use, and any of the unused targets may be used for the external tape drive. Remember: Although it is not displayed here, target 7 is always reserved for the SCSI host adapter. Also, as mentioned before, target 5 is reserved for an internal tape drive. If an internal drive is not currently installed you may use target 5 for the external drive. However, if you install an internal tape drive at some point in the future, you will have to assign it to target 5, and you will be forced to reconfigure the external drive with a different target ID. For this reason, in the current scenario the recommended ID would be 4. If you plan to connect the tape drive to the external connector that is attached to a separate SBus or PCI controller, run the following command to determine the targets in use on all SCSI controllers: ok probe-scsi-all A display will be presented, allowing you to determine the target IDs in use on all controllers. Once you have determined which ID you wish to use, follow the manufacturer's documentation to set the tape drive to this ID. Attaching the Drive When adding SCSI devices you must observe proper bus termination for proper operation. The SCSI bus must be terminated at each end. Adding devices to an external connector extends the bus and, therefore, the point of termination is also extended to the last connected device. A typical configuration of Sun Enterprise servers has the primary SCSI bus extend to an external 68-pin connector, which is located on the rear panel. The external connector can support several different external devices with both narrow, Fast/Wide, and (often) UltraSCSI interfaces. The bus is also auto-terminating; as such, you do not need to worry about enabling or disabling termination when attaching an external device. You need only be concerned with termination of the device itself. When attaching the external drive, make sure the server has been shut down and powered off. Also, when connecting, ensure that the tape device is not powered up. If the tape device is to be the only external device, simply attach the cable to the connector. Since it is the last device on the bus, make sure it is properly terminated. Then confirm that the device has power, turn the device on, and then turn on the server. If other devices are already attached to the external connector, the situation gets more complicated. It is advisable that you consult the Sun Enterprise Server Owner's Guide for more detailed installation information. In any case, if you are unfamiliar with SCSI devices, bus length, bus termination, and so on, it is recommended that you read the section that discusses the external SCSI port to gain a better understanding of the requirements for attaching external devices. Reconfiguration Reboot Turn on the power to the tape drive and then the server. If you have set the auto-boot? parameter to false, as described above, the system will come up to the ok prompt. Enter the boot command to perform a reconfiguration reboot, as in the following example: ok boot -r If the auto-boot? parameter was not set to false and the server continues to boot into the Solaris OS, log in as root and then create a file named reconfigure in the root directory. # touch /reconfigure Reboot the server. The system will check for the existence of the reconfigure file and perform a reconfiguration boot if it exists. Watch for any boot messages that would indicate a problem with the st.conf file. If problems are found, make note of any line numbers displayed. If errors oclearcase/" target="_blank" >ccur, edit the st.conf file again and perform the reconfiguration reboot again. The reconfiguration reboot will create the necessary device entries in the /devices and /dev directories. Testing the Drive Once the tape device entries have been created successfully, test the tape drive with the mt command. Make sure a tape has been inserted in the drive and run the following command: # mt -f /dev/rmt/0 status If other tape devices have been configured in the past, you may have to replace the 0 with a 1, 2, and so on, until you find the number associated with your new drive. Again continuing with the example of the WangDAT drive, a successful response to the mt command will look something like this: WangDAT 4mm DAT tape drive: sense key(0x0)= No Additional Sense residual= 0 retries= 0 file no= 0 block no= 0 Notice that the text displayed on the first line, before "tape drive," should match the second quoted field of the device configuration line in the st.conf file. Also, note that the specific sense key returned is usually not an issue. mt may return a message similar to the following: /dev/rmt/0: No such device or address This means you should try substituting the 0 with 1, 2, and so on, as mentioned previously. Any other message may indicate a problem with the configuration in the st.conf file. Edit the st.conf file and reboot until the mt command returns the proper status. When the mt command returns the proper status, the tape drive is correctly configured and ready for use. For more information, consult the man pages on the mt command. About the Author Carl Grammer is a Sun Certified System Administrator with more than 15 years of IT industry experience. He is currently employed by an international IT consulting firm supporting the telecommunications sector. |
| C.Arthur 回复于:2004-07-20 10:18:51 |
| 好文 |
| hcjia 回复于:2004-07-20 10:54:25 |
| 好东西啊!收藏啊! |
| race 回复于:2004-07-20 11:05:00 |
| 当添加一个外部 SCSI 磁带机时,必须修改 Solaris OS 配置文件 /kernel/drv/st.conf
这句话不是必须的,SUN对磁带机兼容还是很好的,不修改这个文件一般都可以识别到磁带机。对于这个文件的修改,不是参考这个安装指南,而是参照磁带机的安装手册。 HP的DDS磁带机上面也带跳线,需要开盖才能找到,对于SGI、IBM、SUN等机器有不同的跳线办法,实际使用中,不做跳线修改也能识别。 |
| 予默 回复于:2004-07-20 11:07:55 |
| 因为不是sun兼容的才这么麻烦吗? |
| steellyz 回复于:2004-07-22 01:36:01 |
| 谢谢,收了! |
| niathws 回复于:2005-01-15 13:10:10 |
| SUNL25磁带机类型的配置信息,哪位有啊?
st.conf里好像没有 |
| leeyonggang 回复于:2005-01-17 17:33:23 |
| post a wrong message |
| cqvrboy 回复于:2005-01-18 10:08:34 |
| 不错,正好用的上。谢谢! |
| melonm 回复于:2005-01-18 11:16:53 |
| 烂鱼充数一下:
1. 外接磁带机常为HVD Differential SCSI卡,SCSI线也要注意为HVD的; 2. 一般磁带驱动器通常易于识别,常常不要编辑st.conf,当做能用的SCSI设备加上就可以了(boot -r)。当通过光纤连接磁带库时,要修改st.conf因为有多个磁带驱动器在同一目标(target上)。 3. 如果有机器臂操纵多个驱动器的话,要安装专门的驱动程序,可以从备份程序里找到。也可以用通用的scsi驱动程序sgen,取决于驱动程序,要修改的文件可能是sgen.conf或者sst.conf等等(要更新devicelink.tab文件)。 4. 如果通过无主机光纤直接备份,每个光纤转换器上必须至少接一个介质服务器(media server)以控制机器臂和磁带。 5. 安装光纤卡通常要重启,但安装外接磁带机(库)不用。 |