ArGest Backup User Guide

⌘K
  1. Home
  2. Docs
  3. ArGest Backup User Guide
  4. Advanced Terminal Operati...
  5. Tape under OS X

Tape under OS X

Unlike other UNIX environments, OS X does not offer the standard /dev entries for tape drives. Therefore, we manage all tape I/O within the BRU application and its companion utility ‘tapectl’. To simplify tape discovery, the tapectl utility offers a ‘display’ option, which will discover and enumerate the available, compatible tape drives attached to your system. BRU and the provided tapectl utility will support tape drives connected to SAS, Fibre Channel, SCSI, Firewire, iSCSI, or USB interfaces with no special considerations on your part. No matter what the interface type, the first tape drive located will be named tape0/ntape0, the second – tape1/ntape1, and so on. We have tested the environment with 5 tape drives attached to a single system simultaneously, including 1 USB, 1 Firewire, and 3 SCSI drives. To discover the drives recognized by your system, use the tapectl command’s display mode:

An example of output within the Terminal window would be:

# tapectl display[ENTER]
Available Tape Devices:
ntape0: HP Ultrium 5-SCSI Z39W

For the tapectl command, we always access the non-rewinding version of each drive. Therefore, to get the status of the 2nd drive attached to your system, you would use the ntape1 device as an argument to tapectl:

Engineering-MP:~ tjones$ tapectl -v status
Vendor = HP , Model = Ultrium 5-SCSI
Revision Level = Z39W
BlockSize: 0
At block 0
Currently at BOT

In this case, we are querying the HP LTO-5 (ntape0—the default device) attached to the SAS bus and there is a tape inserted positioned at block 0, or the beginning of tape (BOT).

For most tape drives, you may use the default settings applied by both BRU and tapectl. However, if you have more than one tape drive attached to your system, the order of discovery will indicate the numeric value assigned. For instance, if I have a USB tape device and a SCSI tape device, the USB device will be discovered first, the Firewire device next, and any SCSI, SAS, or F-C devices last. This places it in the position we refer to as tape0. The SCSI tape device would then be attached as tape1. As you can see in the 'tapectl display' example above, there were 3 devices attached to our G4 – a USB OnStream ADR2-60, an HP DDS3 SureStore 24 DAT on a Firewire to SCSI adapter, and a Quantum/Benchmark VS80 DLT on the SCSI bus. Additionally, on the SCSI bus, drives with higher SCSI ID’s will be placed in our device list first. If we have two drives set at ID’s 5 and 4, the drive at ID 5 would be the lower numbered tape device.

The full array of tape management functions available with the provided tapectl version can be determined by typing ‘tapectl’ with no arguments:

# tapectl[RETURN]
tapectl [-V] [-v] [-f dev] arg [count]
Version 8.0
Devices are known by the names ntapeX where X is the device order number
starting with 0 and incrementing for each tape device found.
Options are:
display - displays available tape devices
status - display current drive status
header - read the first 4K of a tape and display on 
 stdout
fsf x - forward space filemark 
 (x = count; 1 is default)
bsf x - back space filemark 
 (like fsf, but backwards)
seod - space to end of data for appends
erase - short erase a tape
lerase - long (secure) erase - takes hours!
rewind - rewinds a tape
rewoff - rewind the tape and unload it
reten - retention a tape (QIC and Travan tapes)
tell - report current logical tape block
seek x - seek to logical tape block 'x'
setblk x - set drive block size to x 
 (x is required, 0 = variable block)
alert - display TapeAlert information if available
unload - same as rewoff
-f dev - device to access - (ntape0 is default)
-v - additional verbosity while working
-V - version and copyright information