[comp.sys.hp] HP/UX and the 9144 cartridge tape drive

jkrauspe@coral.whoi.edu (John Krauspe) (05/22/91)

I am new (about two weeks) to the HP/UX environment and have only recently
started to read this group so I apologize if this is a FAQ. Also, please
forgive me if I sound ignorant. It happens alot!

I am working on a HP9000/300 that has a 9144 cartridge tape unit. We want to
backup the disk to the ct. I started a dump but at 1% every 6 minutes I soon
realized that the procedure would take about 10 hours which is a lot of down-
time. So, I stopped. I then attempted to rewind the tape using
"mt -t /dev/rct/0s0 rew".  This returns rewind 1 failed: invalid argument.
I get similar results for different commands and messing with the arguments
gives other, more obvious errors such as the device is not a typewriter (go
figure). I got around this, I removed the tape. Then I tried using the tcio
command (after trying backup first) in conjunction with ls and cpio, much like
the man pages show. This allowed me to write the directories and files to the
tape (or appeared to) but won't let me read them. I get a variety of messages
depending on whatever. I have used tcio -u stuff too and that sometimes "seems
to work". tar works fine as far as I can tell. I was able to write and read
files; that means it's working to me. I am getting pretty annoyed.

Does anyone have any clues or suggestions about what is going on? Any help at
all will be much appreciated. E-mail preferred. Thanks.

John K.
jkrauspe@whoi.edu

franks@hpuamsa.neth.hp.com (Frank Slootweg CRC) (05/22/91)

  If you use "tcio -o" for writing, then you *must* also use "tcio -i"
for reading. A simple example :

echo "Hello, world!" >file
echo file | cpio -o | tcio -o /dev/update.src
rm file
tcio -i /dev/update.src | cpio -i
cat file

>		      This allowed me to write the directories and files to the
> tape (or appeared to) but won't let me read them. I get a variety of messages
> depending on whatever.

  Please be specific. Which commands, options, messages?

Frank Slootweg, HP, Dutch Customer Response Center.

P.S. It is better to use "tcio -oVS 8 /dev/update.src" and
     "tcio -iS 8 /dev/update.src" in the above examples. See the manual
     page as to why.

ken@hpcupt3.cup.hp.com (Kenneth M. Sumrall) (05/23/91)

>[Various problems with backing up a system to a 9144]
>
Using tcio is the only efficient way I know of to use a 9144 tape drive.
Tcio turns on the streaming mode of the device, and when invoked with the
correct parameters, streams continuously.  The backup script I use is uses
the following pipeline as its core:
 cd /; find . -hidden -fsonly hfs -print | cpio -ocxa | tcio -oV -S 8 /dev/rct

The V option to tcio uses hardware verify (which is MUCH faster) and the -S 8
uses a 8k buffer which causes the 9144 to continually be presented with
data so it streams continuously.

To get data off the tape, try
  cd /; tcio -i -S 8 /dev/rct | cpio -icdv <file_pattern>

Since the files are stored with relative path names, you must specify relative
path names to retrieve them, i.e., to retrieve the file "/etc/passwd", specify
"etc/passwd" on the command line.  Wildcards can be used, but they must
be escaped from the shell.

BTW, mt(1) is for 9 track tape drives only.

Hope this helps.

| Ken Sumrall                          |     Internet: ken%hpda@hplabs.hp.com |
| HP California Language Labs          |           UUCP:  ...!hplabs!hpda!ken |
|    "I'd stomp desert dope heads for some gas in my moped!" - Bill the Cat   |
|              "What a stupid world" -Calvin (speaking to Hobbes)             |

alan@km4ba.uucp (Alan Barrow) (05/23/91)

Checkout tcio(1) in your handy HP-UX reference.

Have Fun!


 Alan Barrow  km4ba | I've seen things you people wouldn't believe. Attack
                    | ships on fire off the shoulder of Orion. I watched
                    | C-beams glitter in the dark near the Tannhauser gate.
 ..!gatech!kd4nc!   | All those moments will be lost in time -
         km4ba!alan | like tears in rain. Time to die.          Roy Batty