Sponsored Content
Full Discussion: Load Tape
Operating Systems HP-UX Load Tape Post 302304352 by choogendyk on Monday 6th of April 2009 08:17:28 AM
Old 04-06-2009
I believe that Bacula script is a manual loader script that relies on an operator to load the tape and just notifies the operator to do so and then confirms it was done.

What you want is the actual mtx code. mtx is to libraries as mt is to the tape drive. You can find it here SourceForge.net: MTX: Media Changer Tools. Then you can open a terminal session, and do things like

# mt status
# mtx -f /dev/scsi/changer/c2t0d0 status
# mtx -f /dev/scsi/changer/c2t0d0 unload 10 0
# mtx -f /dev/scsi/changer/c2t0d0 load 16 0
# mt status

The above would see that a tape is in the drive, show the contents of all drives and slots with their barcodes, unload the tape in drive 0 to slot 10, then load the tape in slot 16 to drive 0, and finally double check the status of the drive.

Both Amanda and Bacula use mt and mtx and then have their own scripts for tying into those.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help in wrting Load Script for a Load-Resume type of load.

hi all need your help. I am wrting a script that will load data into the table. then on another load will append the data into the existing table. Regards Ankit (1 Reply)
Discussion started by: ankitgupta
1 Replies

2. UNIX for Advanced & Expert Users

Space free on tape /delete a single file on tape

Hi, I' using a sun solaris server, I would like to known if there is the possibility to control how many space is free on a tape and how I can delete a single file on a tape. Thanks DOMENICO (3 Replies)
Discussion started by: Minguccio75
3 Replies

3. UNIX for Dummies Questions & Answers

Mounting DLT tape and to backup file to tape

Hi there: I'm new here Can anyone help me: I have DS15 Alpha server : Unix 5.1B Now i need to connect a DLVT VS80 1U Rackmount Tape Drive unit. What is the exact comman to mount the DLTape IV?? How do i make backuo @ copy file to the tape? Thanx to all (0 Replies)
Discussion started by: ayzeayem
0 Replies

4. SCO

Tape Status shows 2 Hard errors and 5 Underruns on new tape

when I do a tape status /dev/rStp0 I get the following on a new tape and I have tried several: Status : ready beginning-of-tape soft errors : 0 hard errors: 2 underruns: 5 My BackupEdge has stopped backing up my system because it asks for a new volume yet my total system data is under 20... (5 Replies)
Discussion started by: psytropic
5 Replies

5. AIX

How to make a copy of a tape to another tape?

Hello, We need to make a copy of a backup tape, using the 2 tape recorders in IBM 3582 Tape Library We tried tu use "tcopy", it seems to work fine (no error messages) but we aren't sure if we can rely on it. my question is how to check if the copy succeded or not, but i also want to know... (3 Replies)
Discussion started by: fastlane3000
3 Replies

6. UNIX for Dummies Questions & Answers

Copying tape-to-tape on UNIX

I am using a 4mm tape to backup my Unix system. However, I wanted to make a copy all of the files and archive headers (or just the archive headers if that's possible) created on one of my tapes to another 4mm tape. I only have one tape drive. Is there a command that will complete such task? ... (1 Reply)
Discussion started by: acoco
1 Replies

7. AIX

Ejecting tape on AIX & Some Tape commands

I am trying to use this command to eject the tape mt -f /dev/rmt/0 unload but it gives me error mt -f /dev/rmt/0 unload mt: 0511-575 unload is not a recognized subcommand. Usage: mt Subcommand Valid subcommands are: weof eof fsf bsf ... (5 Replies)
Discussion started by: filosophizer
5 Replies

8. UNIX for Dummies Questions & Answers

VPS has load 200, httpd load no activity, netstat nothing

Hello, on my hostserver i see one VPS of mine got load of 200.00 and netstat nothing (not a single blank line on netstat command) after some time, netstat started showing connections, but i see no excessive IP connections. tail -f /var/log/httpd/access_log shows no activity /var/log/messages ;... (1 Reply)
Discussion started by: postcd
1 Replies
SCSITAPE(1)						      General Commands Manual						       SCSITAPE(1)

NAME
scsitape - control SCSI tape devices SYNOPSIS
scsitape [-f <scsi-generic-device>] commands DESCRIPTION
The scsitape command controls SCSI tape drives in a platform-independent manner. As long as 'mtx' works on the platform, so does 'scsi- tape'. Note that 'scsitape' and your OS's native tape driver may stomp on each other. In particular, if you use 'setblk' and your OS's native tape driver has a different notion of the block size, you may get evil results. It is recommended to use 'scsitape' only for software where you've written your own low-level READ and WRITE routines that use the SCSI command set to directly talk to tape drives (i.e., you do not use the OS's native tape driver at all). OPTIONS
The first argument, given following -f , is the SCSI generic device corresponding to your tape drive. Consult your operating system's doc- umentation for more information (for example, under Linux these are generally /dev/sg0 through /dev/sg15, under FreeBSD these are /dev/pass0 through /dev/passX. Under Solaris this is usually the same as your tape drive (Solaris has a SCSI passthrough ioctl). You can set the STAPE or TAPE environment variable rather than use -f. COMMANDS
setblk <n> Set the tape drive's SCSI block size to <n> bytes. (NOTE: if you are using your OS's native tape driver, THIS IS EVIL!). fsf <n> Go forward by <n> tapemarks. bsf <n> Go to immediately previous the <n>th previous tapemark. (WARNING: This probably doesn't do what you expect -- e.g. if you are immediately after a tapemark and type 'bfs 1', it moves to immediately *before* that tape mark, for a sum total of zero effective movement!). eod Go to end of data. rewind Rewind the tape drive. eject Eject the tape currently in the drive. erase Does a *short* erase (warning: does NOT work on all drives!). mark <n> write <n> filemarks ( 'mark 0' flushes the drive's buffers ). seek <n> Seek to a logical position <n> that was reported by a previous 'tapeinfo' command. write <blocksize> write blocks from stdin to the tape. Chunk the data into <blocksize>-sized chunks. *DOES NOT WRITE OUT A TAPEMARK!* (you will need to use a subsequent mark 1 command to write out a tape mark). read [<blocksize>] [ <#blocks/#bytes> ] read blocks from the tape, write them to stdout. If we are in variable block mode, <blocksize> should be zero (note: The maximum block size we currently support in variable block mode is 128K, MAX_READ_SIZE will need to be turned into a settable variable to allow bigger reads). If <blocksize> is ommitted, we assume that we're in variable block mode, and that we are going to read from tape until we hit a tapemark or end of partition or end of tape. AUTHORS
This program was written by Eric Lee Green <eric@badtux.org>. Major portions of the 'mtxl.c' library used herein were written by Leonard Zubkoff. The SCSI read and write routines are based upon those that Richard Fish wrote for Enhanced Software Technology's BRU 16.1 product, substan- tially modified to work in our particular environment (in particular, all the variable block stuff is new since BRU only does fixed block reads and writes, and the BRU code uses bitmasks rather than bitfields for the various flags and such in return values, as well as the BRU code having a different SCSI API and having variable names considerably shorter than the rather sesquipedalian 'mtx' identifiers). As required by 'mtxl.c', these routines are licensed under the GNU General Public License. HINTS
Under Linux, cat /proc/scsi/scsi will tell you what SCSI devices you have. You can then refer to them as /dev/sga, /dev/sgb, etc. by the order they are reported. Under FreeBSD, camcontrol devlist will tell you what SCSI devices you have, along with which pass device controls them. Under Solaris 7 and 8, /usr/sbin/devfsadm -C will clean up your /devices directory. Then find /devices -name 'st@*' -print will return a list of all tape drives. /dev on Solaris is apparently only of historical interest. BUGS AND LIMITATIONS
for scsitape read 0 <n> where you are doing variable-block-size reads and wish for <n> bytes, it instead reads one and exactly one block from tape and prints that (no matter what its size). Use 'dd' on the output of scsitape if you want finer control. scsitape read 0 attempts reads of MAX_READ_SIZE, which is currently 128K. If blocks on tape are larger than 128K, only the first 128K will be read -- the remainder will be silently dumped in the toilet. This program does not interact well (or at all :-) with your OS's native tape driver. You will likely see weird things happen if you attempt to intermingle scsitape commands with native tape driver operations. Note that BRU 16.1 for Solaris (and possibly others, but Solaris I know about) will have a 'scsi' keyword to bypass the native tape driver and write via direct uscsi commands, so if you use 'scsi- tape' to bypass the flaws of the native Solaris driver, you can use BRU 16.1 to write your actual tape archives. (Assuming that BRU 16.1 has been released at the time that you read this). AVAILABILITY
This version of scsitape is currently being maintained by Robert Nelson <robertnelson@users.sourceforge.net> as part of the 'mtx' suite of programs. The 'mtx' home page is http://mtx.sourceforge.net and the actual code is currently available there and via SVN from http://sourceforge.net/projects/mtx. SEE ALSO
loaderinfo(1),tapeinfo(1),mtx(1) SCSITAPE1.0 SCSITAPE(1)
All times are GMT -4. The time now is 06:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy