HP Dds/Dat Drives: Unix, Linux and Openvms Configuration Guide
HP Dds/Dat Drives: Unix, Linux and Openvms Configuration Guide
30 Mar 07
Legal and notice information Copyright 2009 Hewlett-Packard Development Company, L.P. Hewlett-Packard Company makes no warranty of any kind with regard to this material, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance, or use of this material. This document contains proprietary information, which is protected by copyright. No part of this document may be photocopied, reproduced, or translated into another language without the prior written consent of Hewlett-Packard. The information is provided as is without warranty of any kind and is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.
Contents
About this guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Related documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . General documents and standardization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . USB specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SAS compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Drivers and backup software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UNIX applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Application software availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inquiry Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 5 6 6
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7 7 7 7 7
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Determining a suitable SCSI ID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Adding stape and schgr (autoloader driver) to the kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Add device files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Configuring an autoloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 What next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Determining attached devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring an autoloader on OpenVMS and MRU . . . . . . . . . . . . . . Verifying the configuration of an autoloader on OpenVMS and MRU . . What next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. .. . . . . .. .. .. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ... ... ... 19 19 20 20
Updating the tape driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Configuring an autoloader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 What next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Determining the SCSI ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring the device files . . . . . . . . . . . . . . . . . . . . . . . . . . If you are using a graphics terminal running X-Windows . If you are using a non-graphics terminal . . . . . . . . . . . . Device filenames under AIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . 25 25 25 27 28
Using the seek and tell features of mt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Configuring non-compression device files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Detecting autoloader LUNs in Linux. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing USB drivers on Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Verifying an autoloader has installed correctly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Determining the SCSI ID . . . . . . . . . . . . . . . . . . Driver configuration . . . . . . . . . . . . . . . . . . . . . HP-data values . . . . . . . . . . . . . . . . . . . . . . Configuring an autoloader . . . . . . . . . . . . . . . . What next? . . . . . . . . . . . . . . . . . . . . . . . . . . . .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. . . . . . .. .. .. .. .. .. .. .. .. .. . . . . . .. .. .. .. .. ... ... ... ... ...
30 31 31 32 32 32 33 33 34 36 36
Related documents
The following documents provide additional information:
Copies of General Documents can be obtained from: INCITS ISO ECMA 1 West 42nd Street, New York, NY 10036-8002, USA 1 CP 56, CH-121 Geneva 20, Switzerland 1 1 Rue du Rhne, CH-1204 Geneva, Switzerland 14 Tel: +41 22 849 6000 Web URL: http://.www.ecma.ch
Global Engineering 2805 McGaw, Irvine, CA 92714, USA Documents Tel: 800 854 7179 or 714 261 1455
USB specifications
Universal Serial Bus Specification Revision 2.0 April 27, 2000 Universal Serial Bus Mass Storage Class Specification Overview Revision 1.2 June 23, 2003 Universal Serial Bus Mass Storage Class SpecificationMass Storage ClassBulk Only Transport Revision 1.0 September 31, 1999 These can be obtained from: USB Implementers Forum, Inc. 5440 S.W. Westgate Drive, Suite 217 Portland, OR 97221 U.S.A. Tel: 503-296-9892 Fax: 503-297-1090 Web: www.usb.org Email: [email protected]
SAS compliance
SAS drives are compliant to: SAM2 ANSI INCITS.366:2003 SAS1.1 ANSI INCITS.417:2006 SPC2 ANSI INCITS.351:2001 SSC2 ANSI INCITS.380:2003
Introduction
UNIX applications
You can write scripts to control DDS/DAT drives in UNIX using standard backup utilities such as cpio and tar. To achieve more sophisticated control of the drives, and to exploit the full range of DDS features, it is worth considering software applications specifically designed for the task.
Inquiry Strings
Most backup applications identify HP DDS/DAT products by their inquiry strings. The inquiry strings for the products are shown in the following table:
Product Inquiry String C5683A C7438A DAT72X10 DAT160 DAT320
HP DDS-4 drive HP DAT 72 drive HP DAT 72 autoloader HP DAT 160 drive HP DAT 320 drive
Introduction
Introduction
Before you install your tape drive log on to the HP web site, www.hp.com, and download the latest hardware enablement (HWE) patch bundle for your operating system. This ensures that you will have the correct device driver for your tape drive. System Administration Management (SAM) tools have evolved with ongoing HP-UX version releases. As a result, the procedures for setting up with different HP-UX versions differ. They are described separately in this chapter.
/sbin/ioscan f
1. Note that HP does not support disk drives and tape drives sharing the same SCSI bus.
0 1 2 0 0 : 3 6 7 1 1 4 5 : 1
0/0/1/0 0/0/1/1 0/0/1/2 0/0/2/0 0/0/2/0.0 : 0/3 0/3/1/0 0/3/1/1 0/3/1/1.3 0/3/1/1.3.0 0/4 0/6 : 129
UsbOhci UsbOhci UsbEhci side_multi side : lba c8xx c8xx tgt stape lba lba : processor
CLAIMED CLAIMED CLAIMED CLAIMED CLAIMED : CLAIMED CLAIMED CLAIMED CLAIMED CLAIMED CLAIMED CLAIMED : CLAIMED
INTERFACE INTERFACE INTERFACE INTERFACE INTERFACE : BUS_NEXUS INTERFACE INTERFACE DEVICE DEVICE BUS_NEXUS BUS_NEXUS : PROCESSOR
PCI SerialBus (10330035) PCI SerialBus (10330035) PCI SerialBus (103300e0) CMD IDE controller IDE Primary Channel : Local PCI-X Bus Adapter (783) SCSI C1010 Ultra160 Wide LVD A6829-60001 SCSI C1010 Ultra160 Wide LVD A6829-60001 HP DAT160 Local PCI-X Bus Adapter (783) Local PCI-X Bus Adapter (783) : Processor
For a particular SCSI device in the ioscan listing, you can decode the SCSI bus ID and the drives SCSI ID and LUN ID from the H/W path (hardware path). For example:
Class tape I H/W Path 1 0/3/1/1.3.0 Driver stape S/W State CLAIMED H/W Type DEVICE Description HP DAT160
The H/W path for the tape drive is 0/3/1/1.3.0. SCSI bus ID is 0/3/1/1 (including all the numbers separated by /). From the remaining .3.0 portion: Tape drive SCSI ID = 3 Tape drive SCSI LUN = 0
ioscan -m lun
10
/dev/rtape/tape0_BEST /dev/rtape/tape0_BESTb /dev/rtape/tape0_BESTnb tape 12 64000/0xfa00/0x1a estape CLAIMED DEVICE online HP 0/2/1/0.0x3.0x0 /dev/rtape/tape12_BEST /dev/rtape/tape12_BESTb /dev/rtape/tape12_BESTnb
For a particular SCSI device, you can decode the SCSI bus ID and the drives SCSI ID and LUN ID from the lunpath hardware path. For example:
Class tape I 0 Lun H/W Path 64000/0xfa00/0x16 0/3/1/1.0x3.0x0 Driver estape S/W State CLAIMED H/W Type DEVICE Health online Description HP DAT160
The lunpath hardware path for the tape drive is 0/3/1/1.0x3.0x0. SCSI bus ID is 0/3/1/1 (including all the numbers separated by /). From the remaining 0x3.0x0 portion: Tape drive SCSI ID = 3 (decimal value from 0x3) Tape drive SCSI LUN = 0 (decimal value from 0x0)
11
Use the sam utility. Sam runs as a mouse-driven GUI (Figure 1) on a system with full graphics capability, or as a console text-based interface (Figure 2). If you use the text-based interface, use the Tab and arrow keys to navigate, and the Return key to select. Figure 1 SAM GUI
sam
12
3. Highlight the stape driver. If the driver has not been added to the kernel, both Current State and Pending State will read Out. 4. Select the following:
Actions Add Driver to Kernel
The Pending State will now read In. 5. To add the new driver to the kernel, select:
Actions Create a New Kernel
The stape or schgr driver is added to the kernel. 6. If you are going to attach an autoloader, use a similar procedure to change schgr to static. 7. Reboot the system.
sam
3. Highlight the stape driver. If the driver has not been added to the kernel, both Current State and Planned State will read unused. 4. Type m to modify the stape driver and s to set it to static. The Planned State will now read static. 5. If you are going to attach an autoloader, use a similar procedure to change schgr to static. 6. The stape and schgr drivers are now added to the kernel. 7. Reboot the system.
This will attempt to launch a web browser. Mozilla browser1 is the default when HP-UX 1 v3 is 1i installed.
1. If Mozilla is being invoked for the first time you may be asked to agree to license terms for the software.
13
2. From the SMH Tools page (see Figure 3), select Modules from the Kernel Configuration section. Figure 3 SMH web-based interface (HP-UX1 v3) 1i
3. In the Search box on the Kernel Configuration page, type stape and execute the search. The search results list will include both estape and stape modules. If either of these modules is not installed both Current State and Next Boot State will be shown as unused. A state of static indicates that the module is installed. 4. Select the estape module1 radio button. Its details will appear in a panel below the modules list. From the right hand panel on the web page, click the Modify Module link.
1. The estape and stape modules are linked, so it is sufficient to select the estape module alone for installation.
14
5. On the Modify Kernel Module: estape page, for Next Boot State, select the static radio button. Check the box entitled Backup to create a backup copy of the existing kernel (see Figure 4). Figure 4 Adding estape driver to the kernel
6. If you wish, type in a Reason for Change, such as Initial estape installation May 1st 2007 and then select the Modify tab. 7. Click the OK button at the Operation Successful page. Both estape and stape drivers will now be shown with Next Boot State as static. 8. For autoloaders, use a similar procedure to prepare the eschgr (with schgr) module. 9. From the right-hand panel on the Kernel Configuration page, click View Pending Changes and reboot and proceed to reboot the system as directed. 10. Following the reboot ,re-run SMH and search again for the driver as in step 3 above. Current State and Next Boot State should both be listed as static.
15
For example, when an HP DAT160 drive is found, it will be displayed as something like:
Hardware Path Driver Description =========================================================== 8/0/2/0.3.0 stape HP DAT160
3. Highlight the drive and select the following from the tool bar:
Actions Create Device Files Create Default Device Files
This will create default device files for the drive. To view the device files that have been created, select:
Actions Create Device Files Show Device Files 4. When you have exited sam, run ioscan to see the tape drive: %/sbin/ioscan fnC tape
All default device files displayed have compression enabled. NOTE: HP recommends the Berkeley device files for most applications: cXtYdZBESTnb = Berkeley, no rewind, best available density cXtYdZBESTb = Berkeley, with rewind, best available density where: X = card number Y = target number (drive SCSI ID) Z = LUN number
smh w
1. If Mozilla is being invoked for the first time you may be asked to agree to license terms for the software.
16
3. Select tape from the Class drop down box on the HP-UX Peripheral Device Tool page. Select the tape device (radio button) requiring device files from the resulting list. If device files are not already present this will be indicated under the Properties header (see Figure 5)1. Figure 5 Selecting a tape device to create its device files (Agile View)
4. From the right-hand panel on the HP-UX Peripheral Device Tool page, click on Reinstall Device Files. At the next page, click the Reinstall button. When the browser returns to the HP-UX Peripheral Device Tool page, click the Refresh button one or more times until the list of device files appears under the Properties header.
Configuring an autoloader
1. Reboot the system with the autoloader attached. 2. Run ioscan -funC autoch to find the device files for the autoloader. If there are no device files listed, proceed as follows: 3. Create /dev/rac if it does not exist. 4. Run ioscan -funC tape to find the tape device file. 5. Execute: ls -al /dev/rmt/<device_file> This will return an output similar to:
2 bin bin 205 0x0450c0
This example tells you that the card number is 4 and the target number 5. 6. Run mknod to create the device files:
mknod /dev/rac/c<X>t<Y>d<Z> c 203 0x0<X><Y><Z>00
where:
<X> is the card number <Y> is the target number <Z> is the LUN
1. Depending on how SMH was last used the HP-UX Peripheral Device Tool page will display either the Agile View or the Legacy View as referenced in the Introduction to this chapter (page 9). To switch between these views use the Toggle Global Device View link on the right hand side of the HP-UX Peripheral Device Tool page. In this chapter, the Agile View is assumed. The process is similar for the Legacy View.
17
For example, using values from the ls -al output above and a LUN of 1, you would execute:
mknod /dev/rac/c4t5d1 c 203 0x045100
To verify that the autoloader has installed correctly, run the following mc command:
mc -p /dev/rac/<device_file> -rIDSM
This will display the various elements in the autoloader. This will display the various elements in the autoloader. For more details of the mc command, run man mc.
What next?
Once the device files have been created, you should confirm that your new tape drive is working properly. Chapter 8, Verifying the installation provides instructions on backing up and restoring a sample file to test your installation.
18
$ sho dev MKA400/full Magtape MKA400:, device type HP C7438A, is online, record-oriented device, file-oriented device, available to cluster, error logging is enabled, controller supports compaction (compaction disabled), device supports fastskip (per_io). Error count Owner process Owner process ID Reference count Density Volume status: 0 "" 00000000 0 default Operations completed 222530 Owner UIC [1,4] Dev Prot S:RWPL,O:RWPL,G:R,W Default buffer size 512 Format Normal-11
If the DAT tape drive is at device ID mka400, the changer device will be gka401. The parts of the device name are as follows: gk a 4 01 SCSI changer First SCSI bus SCSI target ID 4 LUN 01
2. Enter the following, replacing gka401 with the changer device file you found in step 1:
$ mcr sysman io connect gka401: /driver=sys$gkdriver.exe/noadapter $ define/system mru_robot gka401
To maintain these changes across reboots, edit the sys$startup_vms.com file to include these two lines.
19
For further details on MRU and using the robot commands, see the MRU User Guide.
What next?
Once device files have been created, you should confirm that your new tape drive is working properly. Chapter 8 on page 37 provides instructions on backing up and restoring a sample file to test your installation.
20
2. Versions of Tru64 before v5.1B-2 only (v5.1B-3 for DAT 160 drives): Add the following entry to your /etc/ddr.dbase file:
DENSITY: # DensityNumber = 0,3,4,5,6,7 DensityCode = default CompressionCode = 0x0 Buffered = 0x1 DENSITY: # DensityNumber = 1,2 DensityCode = default CompressionCode = 0x1 Buffered = 0x1
DAT 72 drives:
SCSIDEVICE Type = tape Name = "HP" "C7438A" # PARAMETERS: TypeSubClass = TagQueueDepth = MaxTransferSize = ReadyTimeSeconds =
# (16MB - 1) # seconds
MODESELECT: ModeSelectNumber = 0 SavePage = No PageFormat = scsi2 BlockDescriptor = yes TransferLength = 16 Hdr.Tape.BufferMode = 0x1 Data.UBYTE[0] = 0x3D #Vendor Unique Page Code 0x3D Data.UBYTE[1] = 0x02 Data.UBYTE[2] = 0x01 DENSITY: DensityNumber = 0,3,4,5,6,7 DensityCode = default CompressionCode = 0x0 Buffered = 0x1 DENSITY: DensityNumber = 1,2 DensityCode = default CompressionCode = 0x1 Buffered = 0x1
DDS-4 drives:
SCSIDEVICE Type = tape Name = "HP" "C5683A" # PARAMETERS: TypeSubClass TagQueueDepth 22 HP (Tru64 5.1x) servers and workstations
= rdat = 0
MaxTransferSize ReadyTimeSeconds
= 0x0ffffff = 120
# (16MB - 1) # seconds
# # Mode select parameters for rewind after reset behavior # MODESELECT: ModeSelectNumber = 0 SavePage = No PageFormat = scsi2 BlockDescriptor = yes TransferLength = 16 Hdr.Tape.BufferMode = 0x1 Data.UBYTE[0] = 0x3D #Vendor Unique Page Code 0x3D Data.UBYTE[1] = 0x02 Data.UBYTE[2] = 0x01 Data.UBYTE[3] = 0x00 DENSITY: # DensityNumber = 0,3,4,5,6,7 DensityCode = default CompressionCode = 0x0 Buffered = 0x1 DENSITY: # DensityNumber = 1,2 DensityCode = default CompressionCode = 0x1 Buffered = 0x1
then reboot the system with the tape drive attached. The device files for the drive will be generated in /dev/tape and /dev/ntape when you reboot. 4. The names of the device files can be interpreted as follows: Devices in the /dev/ntape directory are "no-rewind" devices, those in /dev/tape will do a rewind on close. The device files then have the syntax, tapeX_dn where:
X is the instance of the drive n is the density number
For example, /dev/ntape/tape66_d1 is a device file for device 66, no-rewind using density number 1. Since all density numbers have the same parameters it does not matter which density number file is used.
23
Configuring an autoloader
Add the following entries to /etc/mcicap to configure an autoloader:
mc0:\ :mc=/dev/changer/mc1:\ :dn=/dev/tape/tape23:tc=DAT Autoloader: # Digital TLZ6L/TLZ7L 4mm DAT Tape Autoloader DAT Autoloader|tlz6l|tlz7l|Digital TLZ6L/TLZ7L|tsl9000|tsl10000:\ :it=scsi2:dt=tape:ae:re:
What next?
Once the device files have been created, you should confirm that your new tape drive is working properly. Chapter 8, Verifying the installation provides instructions on backing up and restoring a sample file to test your installation.
24
The SCSI ID is in the series 00-00-0S-X,0, where X is the SCSI ID. Review the list of existing SCSI IDs and choose an available ID to assign to the new tape drive.
If no device has been configured at this address before, select add a tape drive to set up the address. Otherwise, select change/show characteristics of a tape drive
HP Evolution II DDS/DAT drives: UNIX, Linux and OpenVMS configuration guide 25
Select ost or Other SCSI tape drive as the tape drive you wish to change. If no device has been configured at this address before, choose connection addresses as appropriate. 4. The following details are displayed:
Check the following values and change them if necessary: BLOCK Size = 0 Use EXTENDED file marks = no RESERVE/RELEASE support = yes Set maximum delay for the READ/WRITE command = 1200 Click on the DO button to apply the changes.
26
If no device has been configured at this address before, select add a tape drive to set up the address. Otherwise, select change/show characteristics of a tape drive. 3. A pop-up window is displayed:
Select ost or Other SCSI tape drive as the tape drive you wish to change. If no device has been configured at this address before, choose connection addresses as appropriate. 4. The following details are displayed:
Check the following values and change them if necessary: BLOCK Size = 0 Use EXTENDED file marks = no RESERVE/RELEASE support = yes Set maximum delay for the READ/WRITE command = 1200 Click on the DO button to apply the changes.
27
HP DDS-format drives will work with tar, cpio, backup, restore and dd. For systems other than the 43P, the drive is also boot-capable, provided a boot tape is generated using mkszfile and mksysb. Once device files have been created, you should confirm that your new tape drive is working properly. Chapter 8, Verifying the installation provides instructions on backing up and restoring a sample file to test your installation.
The n in the filename is the instance number assigned to the drive by the operating system, where 0 is the first device, 1 is the second and so on. Rewind on Close Normally, the drive repositions the tape to BOT (Beginning of Tape) when the device file is closed. Using the no rewind option is useful when creating and reading tapes that contain multiple files. Retensioning consists of winding to EOT (End of Tape) and then rewinding to BOT, in order to reduce errors. If this option is selected, the tape is positioned at BOT as part of the open process. Compression can be disabled or enabled.
Retension on Open
Compression
28
This will produce output similar to the following for each device:
Attached Devices Host: SCSI0 Channel: 00 Id:00 Lun:00 Vendor: HP Model -----------Type: Direct-Access ANSI SCSI Revision 02
Tape driver. Its presence shows the driver is loaded. SCSI chipset driver for the LSI Logic family of HBAs (among others). SCSI chipset driver for the Adaptec 79xx chipset family (such as Adaptec 29320).
Latest SCSI and SAS controller drivers for Linux will be available from the manufacturers web site. In order to communicate with a tape device, the operating system needs to have drivers for the tape and the underlying transport mechanism (the host bus adaptor) loaded. Ensure that both are
29
available as either loadable modules (for example, usable with insmod and visible with lsmod) or are statically built into your kernel. NOTE: To add drivers to the statically built kernel you need the Linux source code available on disk and knowledge of how to use the kernel building tools that ship with various Linux distributions. This should not be attempted by novice users. In order to determine if the drive has been detected by the tape driver at module load time, execute:
dmesg | grep "st"
to load it. This should happen naturally if your system is rebooted after attaching the drive. When the ST driver module has been added, a list of tape device files will be created automatically. They reside in the /dev/ directory and have the syntax:
/dev/stp or dev/nstp
where:
p n
Instance number of the device file (0 if only one drive is connected to the system) Indicates this is a no-rewind driver
To enable large transfers under Linux (>64 KB per write), edit the file /usr/src/linux/drivers/scsi/st_options.h and change the definition of ST_BUFFER_BLOCKS. If you want requests to space to end of data (EOD) to be faster, you should also enable ST_FAST_MTEOM in the same file. After changing this file, rebuild the modules and install the new binary. At the very least, this requires:
make modules make modules_install
30
this; see the relevant man page for more information. If you use this approach, set stinit.def as described in the next section, Configuring non-compression device files.
d. After editing the file, execute stinit or reboot the system. For more information on how to use stinit and stinit.def, see the man stinit page.
31
usb_storage driver
1. At the command prompt type:
lsmod | grep usb_storage
st tape driver
1. At the command prompt type:
lsmod | grep st
If the line is not present type: modprobe st at the command line to load the st driver.
This will display the various elements in the autoloader. For more details of the mtx command, run:
man mtx.
What next?
Once the device files have been created, you should confirm that your new tape drive is working properly. Chapter 8, Verifying the installation provides instructions on backing up and restoring a sample file to test your installation.
32
This indicates that there a GLM-based SCSI controller on the system. For the adapter to which the new tape drive is attached, you will need to determine what SCSI IDs are already used. 2. Determine the SCSI IDs of the existing devices attached to the SCSI controller: For all adapters:
% dmesg | egrep ".*xxx.*target" | sort | uniq where xxx = the type of adapter (esp, glm, fas or isp), as appropriate.
This indicates that SCSI ID 6 is used for an existing device. SCSI ID 7 is generally used for the adapter itself. In this situation, you would use a SCSI ID from 1 to 5 for the new tape drive.
Driver configuration
NOTE: Drives should work well with Solaris without modifications to the kernel, and you are recommended to try this. Only if necessary, make the following file modifications to enhance performance: 1. In the file /kernel/drv/st.conf, after these lines:
######## # Copyright (c) 1992, by Sun Microsystems, Inc. #ident "@(#)st.conf 1.6 93/05/03 SMI" add the following, where X is the SCSI target address of the device you have attached (the
33
where X is the SCSI target address of the device you have attached. See HP-data values on page 34 for the values of the parameters in these lines. 2. If you are replacing an existing tape device on the same SCSI ID, remove the contents of the /dev/rmt directory as follows:
% cd /dev/rmt % rm *
3. Instead of rebooting the device, follow these steps. a. Find the kernel module ID:
# modinfo | grep st ( 96 60dcc000 cdb0 33 1 st (SCSI Sequential Access Driver)
For further details, see How do you load st.conf changes without rebooting, SunSolve document 18010, on http://sunsolve.sun.com/search/document.do?assetkey=1-9-18010-1&searchclause=18010 This link is valid for registered SunSolve users with a valid Sun Service Plan. 4. You should now be able to use the drive. Use /dev/rmt/Xcb if you require a compression rewind device file, where X is the relevant device address. Use /dev/rmt/Xcbn when you require a compression non-rewind device.
HP-data values
The values for the parameters, which provide normal DDS mode, have the following meanings.
34
The syntax for HP-DDS-4, HP-DAT72 and HP-DAT160 on Solaris 9, 10 (and 8 with the latest st patch) is:
<drive type> = <version>, <type>, <bsize>, <options>, <no. of densities>, <density 0>, <density 1>, ..., <density n>, <default density>, <non-motion timeout>, <read/write timeout>, <rewind timeout>, <space timeout>, <load timeout>, <unload timeout>, <erase timeout>
where: Parameter
<version> <type> <bsize> <options>
Value
1 0x34 0
Meaning Indicates the format of the following parameters. The value for a DAT drive in /usr/include/sys/mtio.h. Indicates variable block size.
0xd639 Derived from constants in /usr/include/sys/scsi/targets/stdef.h. or The value determines which operations the driver can perform with the 0x18679 attached device by using a unique value for each feature and then
Options value: 0xd639 Device supports variable length records. Device can backspace over files (as in the mt bsf option). Device supports backspace record (as in mt bsr). Device requires a long time-out period for erase functions. Device will automatically determine the tape density. reached. Yes Yes Yes Yes No Yes Yes Yes Yes Yes No
0x18679
0x0200 Device knows when end of data has been 0x0400 Device driver is unloadable. 0x1000 Time-outs five times longer than normal. 0x4000 Driver buffers write requests and
0x8000 Variable record size not limited to 64 KB. 0x10000 Device determines which of the two mode
<no. of densities>
35
Parameter
<density n>
Value
Meaning
0x26, Supported density code. The value of 0x00 means use the default density 0x47 , chosen by the drivewhich is 0x26 for DDS-4, 0x47 for DAT 72 and 0x48 0x48 or for DAT 160. 0x00 0
Density 0 (0x26 for DDS-4, 0x47 for DAT 72 and 0x48 for DAT 160) is the default. All timeouts are in seconds
Value
X 0
Meaning
X specifies the SCSI ID (target) of the device.
Configuring an autoloader
No HP autoloader media moving utilities are currently supported on Solaris. Configure the drive as described above, and then see the manual supplied with the drive for instructions on how to move media manually.
What next?
Once the device files have been created, you should confirm that your new tape drive is working properly. Chapter 8, Verifying the installation provides instructions on backing up and restoring a sample file to test your installation.
36
the hardware installation may be faulty. Check the troubleshooting section of the Users Guide for help in identifying the problem. If the response in the command line is:
mt /dev/st0: No medium found
check that a tape is loaded in the drive. If tape drive information is returned, the tape drive has been detected correctly by the operating system. 2. Write a sample file to tape, using tar:
% cd / % tar cvf <archive name> <file> The options to tar have the following meanings: c v f
Create a new archive (backup file) on the device. Operate in verbose mode. Specify the archive name explicitly. The name of the archive name to be created. Example: /dev/st0 The name of the file to archive, prefixed with ./. Example: ./boot/vmlinuz
HP Evolution II DDS/DAT drives: UNIX, Linux and OpenVMS configuration guide 37
The arguments follow the cvf options in the command line. The arguments are as follows:
<archive name> <file>
NOTE: Make sure you prefix the file name with . when you back it up to tape. If you do not, the restore operation in step 3 will overwrite the original copy on disk. 3. Read the file back from tape:
% cd /tmp % tar xvf <archive name> The x option to tar here means extract from the archive.
Use the same value for the <archive name> argument as in step 2. 4. Compare the original with this retrieved file:
% cmp <original file> /tmp/<retrieved file>
This step compares the retrieved file and the original file byte by byte. If they are the same, there should be no output, and this verifies that the installation is correct. The arguments are as follows:
<original file> <retrieved file>
The name of the original file, prefixed with /. Example: /boot/vmlinuz The name of the file retrieved from the archive. Example: boot/vmlinuz
Example
Suppose you are verifying the installation of an HP DDS-format tape drive on a Linux system. The procedure would be as follows. See System-Specific Arguments below for the choice of <archive name> and <file> arguments: 1. Change directory to root:
% cd /
38
Glossary
AT&T mode Berkeley and AT&T functional modes differ in read-only close functionality. In AT&T mode, a device close operation will cause the tape to be repositioned just after next filemark on the tape (the start of the next file). Berkeley and AT&T functional modes differ in read-only close functionality. In Berkeley mode the tape position will remain unchanged by a device close operation. A logical unit of information. Called record in the DDS-format specification. Beginning Of Partition. The position at the beginning of the permissible recording region of a partition. A mode of data transfer in write operations that facilitates tape streaming. A procedure in which data is transformed by the removal of redundant information in order to reduce the number of bits required to represent the data. This is done by representing strings of bytes with codewords. Digital Audio Tape On a SCSI bus, devices put in requests to be able to transfer information. Once a device is granted its request, it and the target to which it wants to send information can transfer the data using one of three protocols (assuming both devices support them): asynchronous, synchronous, and wide. In asynchronous transfers, the target controls the flow of data. The initiator can only send data when the target has acknowledged receipt of the previous packet. All SCSI devices must support asynchronous transfer. In synchronous data transfer, the initiator and target work in synchronization, allowing transmission of a packet of data to start before acknowledgment of the previous transmission. In wide (16-bit) data transfer, two bytes are transferred at the same time instead of a single byte. HP DDS/DAT drives support asynchronous, synchronous and narrow (8-bit) wide transfers.
39
DDS
Digital Data Storage is a recording format that builds on the DAT format to support the storage of computer data. It was developed originally by Hewlett-Packard and Sony as an industry standard. The first generation standard was DDS-1 (or simply DDS), to which was added data compression to produce the DDS-DC standard. Further enhancements, notably narrower tracks and thinner tape, led to DDS-2, which can typically provide double the capacity of DDS-1. DDS-3 used a new magnetic coating on the tape that allows twice the recording density. Together with the use of time-tracking, this gives a DDS-3 tape approximately three times the capacity of a DDS-2 tape. DDS-4 uses longer tapes (150m). HPs DDS-4 drives, which are ultra-wide SCSI devices, allow transfer rates from 3 to 4 times greater than DDS-3 and capacities that are two-thirds as much again. DAT 72 tapes are 170m long and data is written in narrower tracks, again increasing data density, enabling tapes to hold 80% more data than DDS-4 tapes.
filemark
A mark written by the host to the tape that can be searched for, often using the drives fast-search capability. It does not necessarily separate files. It is up to the host to assign a meaning to the mark. A fixed capacity set of tracks written to or read from tape, defined in the DDS format. A mode of responding to SCSI commands where the drive or other peripheral does not wait until the command has finished before returning status information back to the host. For writing filemarks, Immediate mode can significantly improve the performance of systems that do not set the Immediate bit when sending a SCSI WRITE FILEMARKS command. On the other hand, data is not flushed to tape in response to a filemark command. By default, the buffer in the drive is flushed every 5 seconds. Infinite flush avoids frequent starting and stopping of the mechanism when using a very slow application. It also avoids losing capacity through the flushing of partly written groups. On the other hand, infinite flush means that data can remain in the buffer for very long periods of time, and could be lost in the event of a power failure. Logical Unit Number, by which different devices at a particular SCSI ID can be addressed individually. The drive has a fixed LUN of 0.
infinite flush
LUN
Media Recognition A method by which a drive can recognize data-grade tape. The tape has a series of System (MRS) stripes on its transparent leader tape that the drive can detect. By default, the drive treats a non-Media Recognition System tape as read-only and will not write data to it. partition SCSI sequential access A part of a tape that can be treated as a complete and independent whole. A tape can have one or two partitions. Small Computer System Interface Sequential access devices store data sequentially in the order in which it is received. Tape devices are the most common sequential access devices. Devices such as disk drives are direct access devices, where data is stored in blocks, not necessarily sequentially. Direct access allows for speed of retrieval, but is significantly more costly.
40
Index
A
agile addressing 9 AIX 25 applications 7 asynchronous data transfer 39 AT&T mode 39 autoloaders application software 7 detecting LUNs in Linux 31
G
group 40
H
HP HP-UX workstations and servers 9 HP OpenVMS servers and workstations 19 HP Tru64 5.1x servers and workstations 21 HP-data values for Sun Solaris 34 HP-UX systems 9 HP-UX systems:determining attached devices 9
B
backup software 7 Berkeley mode 39 blocks 39 BOP 39 buffered mode 39
I
IBM (AIX) device files 25 IBM (AIX) workstations 25 determining SCSI ID 25 immediate mode 40 infinite flush 40 inquiry strings 7 installation, verifying 37
C
compression 39
D
DAT 39 DAT 72 40 data compression 39 data transfer 39 DDS 40 device files AIX 28 IBM (AIX) 25 direct access 40 documents, related 5 drivers 7 configuring for Solaris 33 dsf formats 9
L
Linux servers and workstations 29 configuring non-compression device files 31 detecting autoloader LUNs 31 determining SCSI ID 29 LUN 40 LUNs, detecting in Linux 31
M
Media Recognition System 40 mode AT&T 39 Berkeley 39 immediate 40 MRS 40
F
filemarks 40 filenames under AIX 28
O
OpenVMS and MRU configuring an autoloader 19
HP Evolution II DDS/DAT drives: UNIX, Linux and OpenVMS configuration guide 41
verifying autoloader configuration 20 OpenVMS servers and workstations determining attached devices 19
P
partitions 40 persistent dsf 9
R
records 39 related documents 5
S
SAS compliance 6 SCSI 40 SCSI ID, determining IBM (AIX) 25 Linux 29 Sun workstations 33 sequential access 40 servers HP 9 HP OpenVMS 19 IBM AIX 25 Linux 29 software, backup 7 Solaris 33 Sun workstations 33 determining SCSI ID 33 synchronous data transfer 39
U
UNIX scripts 7
V
verifying installation 37
W
wide data transfer 39 workstations HP OpenVMS 19 HP-UX 9 IBM AIX 25 Linux 29 Sun 33
42