08-28-2007
How to reach files from tape drive using dd
Hi all!
I have problem with copying files from tape drive.
The contents of tape:
silverman# tcopy /dev/sa1
file 0: block size 10240: 21 records
file 0: eof after 21 records: 215040 bytes
file 1: block size 10240: 20712 records
file 1: eof after 20712 records: 212090880 bytes
file 2: block size 10240: 7 records
file 2: eof after 7 records: 71680 bytes
file 3: block size 10240:
file 3: eof after 44991 records: 460707840 bytes
file 4: block size 10240: 34298 records
file 4: eof after 34298 records: 351211520 bytes
file 5: block size 10240:
file 5: eof after 127911 records: 1309808640 bytes
Copy first file:
silverman# dd if=/dev/sa1 of=/tmp/1 bs=10240 count=21
Excelent first file copied.
Copy second file:
(skipping first file + mark EOF - maybe here is something wrong?)
silverman# dd if=/dev/sa1 of=/tmp/2 bs=10240 count=20712 skip=22
dd: skip reached end of input
silverman#
The size of 2 is 0.
Could you know how to reach tha second, third, etc files from tape using dd? or you have any other suggestion how to read it?
Many thanks for help!
8 More Discussions You Might Find Interesting
1. Filesystems, Disks and Memory
What is the unix command to move files/backups from the Os to tape.
Thanx in advance,
Kavita (3 Replies)
Discussion started by: knarayan
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I need to restore my tape backup, when I type "tape status" it gives;
status : ready beginning-of-tape write-protected
soft errors : 0
hard errors : 0
underruns : 3
but... (4 Replies)
Discussion started by: alisevA3
4 Replies
3. Solaris
Server 1 - Sun Solaris 5.8 sparc SUNW,Sun-Fire-480R with attached DLT tape drive /dev/rmt/0n
Server 2 - Old DG-UX box which has restore command on it compatible with the files on the backyup tape - backed up with dump2
Server 3 - Sun solaris 5.9 sparc SUNW,Sun-Fire-V490 with lots of free space... (4 Replies)
Discussion started by: lindab
4 Replies
4. UNIX for Dummies Questions & Answers
We have 2 UNIX machines,
1.HP-UX 11i where oracle database running on it.
2.AIX 5 with Ultrium LTO3 tape drive connected.
My query is, i want to send oracle database archive files from HP machine to the tape drive which connected on AIX machine, everyday.
These files should be appended.
I... (3 Replies)
Discussion started by: yashdbad
3 Replies
5. Filesystems, Disks and Memory
I've starting playing with a tape drive for the first time. Its a new one, an IBM Ultrium LTO 4. After initially copying a file to the tape with tar cvf /dev/st0 /root/dummy, all subsequent files appended take an increasing amount of time with tar rvf /dev/st0 /root/dummyX. Is it normal for each... (2 Replies)
Discussion started by: jeriryan87
2 Replies
6. Solaris
Hi,
I want to take backup of files older than 20 days from a directory onto a tape drive on remote machine on Solaris.
The files are of format abc-20100301000000.gz on my local machine.
I know the below commands for searching files older than x days and command for backup procedure.
solar1 #... (7 Replies)
Discussion started by: jyothi_wipro
7 Replies
7. Solaris
Hey folks,
Linux admin here, forced to use Opensolaris to try to use ufsdump/ufsrestore to get some data of some old tapes.
I've got Opensolaris 2009.06 on x86 and a Sony SDX-700V.
As a "control" experiment, I booted the system with a Linux live CD and the tape drive worked perfectly.
... (2 Replies)
Discussion started by: eddy_sysad
2 Replies
8. HP-UX
I have used ioscan -fnC tape and the system identified the tape drive. what is the command to show a listing of what is on the tape? I have used ls /dev/rmt/rmt0 to no avail. can anyone help?
Thanks in advance (10 Replies)
Discussion started by: Randydog
10 Replies
mtx(8) System Manager's Manual mtx(8)
Name
mtx - generic magtape exerciser
Syntax
/usr/field/mtx [ options ] -adev
/usr/field/mtx [ options ] -sdev
/usr/field/mtx [ options ] -ldev
/usr/field/mtx [ options ] -vdev
Description
The exerciser will write, read, and validate random data on the specified magnetic tape device from beginning of tape (BOT) to end of tape
(EOT). There are four record length modes in which to run the exerciser. The modes are short (512 bytes), long (10240 bytes), variable
(512-20480 bytes), and all of these three in sequence.
The exerciser will run until or a kill -15 pid is sent to the process.
A logfile is made in for you to examine and then remove. If there are errors in the logfile, check the file, where the driver and kernel
error messages are saved.
An enhanced tape exerciser called provides more comprehensive tape testing than this exerciser. Refer to for a complete description.
Options
The mtx options are:
-h Print help message for the command.
-ofile Save diagnostic output in file.
-ti Run time in minutes (i). The default is to run until the process receives a or kill -15 pid.
-rj Record length for long-record test. May range from 1 - 20480; the default is 10240 bytes.
-fk Size of file in records. The default is -1, go to end-of-tape.
Arguments
You must specify one of the following function flags and its argument to the exerciser.
-adev Perform short, long, and variable-length record tests on the dev, a raw device name and unit number. For example, -armt0h.
-sdev Perform short (512-byte) record length test. The dev argument is a raw device name and unit number. For example, -srmt0h.
-ldev Perform long (10240-byte) record length test. The dev argument is a raw device name and unit number. For example -lrmt0h.
-vdev Perform variable record length test (records vary from 512 bytes to 20480 bytes). The dev argument is a raw device name and unit
number. For example, -vrmt0h.
Restrictions
If there is a need to run a system exerciser over an NFS link or on a diskless system there are some restrictions. For exercisers that
need to write into a file system, such as the target file system must be writable by root. Also the directory, in which any of the exer-
cisers are executed, must be writable by root because temporary files are written into the current directory. These latter restrictions
are sometimes difficult to overcome because often NFS file systems are mounted in a way that prevents root from writing into them. Some of
the restrictions may be overcome by copying the exerciser to another directory and then executing it.
The following restrictions apply to the SCSI tape drives. The Magnetic Tape Exerciser (MTX) runs the tape in start/stop mode; that is, the
tape does not stream. Therefore, MTX should not run for extended periods of time (two hours maximum run time). In addition, MTX does not
handle the end of tape properly.
Examples
This example runs short, long, and variable-length tests on rmt0h until the process receives a or kill -15 pid:
% /usr/field/mtx -armt0h
The following example runs a long-record length test on rmt0h for 240 minutes in the background:
% /usr/field/mtx -lrmt0h -t240 &
See Also
tapex(8)
Guide to System Exercisers
mtx(8)