1833758 Members
2730 Online
110063 Solutions
New Discussion

tape stats

 
manu_9
Frequent Advisor

tape stats

Is there any way to find out , whether tape is empy or it has data and how much data it has ?
6 REPLIES 6
Michael Tully
Honored Contributor

Re: tape stats

Unless the tape has been created by a commercial backup package, then no.

tar: does not
cpio: does not
fbackup: does not

Normally you can't tell what is on a tape unless you know the format it was written in. You could obviously use some of the above mentioned tools to find out.
Anyone for a Mutiny ?
Steve Steel
Honored Contributor

Re: tape stats

Hi

Use dd somùething like

dd if=/dev/rmt/0mn of=/dev/null bs=5000k


Will show blocks in blocks out


Steve stee
If you want truly to understand something, try to change it. (Kurt Lewin)
manu_9
Frequent Advisor

Re: tape stats

Hi Michael ,
Cna u elaborate it further giving the commands for the same .
Petr Simik_1
Valued Contributor

Re: tape stats

1. copy block of data to disk
dd if=/dev/rmt/0mn of=/tmp/tape bs=5000k
2. check the format of data - by looking inside the file strings or more you will find what kind of data are stored on tape
fbackup, tar, cpio, dd ....
3. use proper command to list content and check its size
Michael Tully
Honored Contributor

Re: tape stats

If the tape is written in tar
# tar tvf /dev/rmt/0m 2>/tmp/tape.out

cpio ( I don't touch this one often and it is from memory)
# cpio -icd
fbackup
# frecover -I /tmp/index -f /dev/rmt/0m

As I said there is no real way to get the size of any of these archive backups.
Anyone for a Mutiny ?
Rodney Hills
Honored Contributor

Re: tape stats

If
1) you know the format of the tape
2) can read through the entire tape without restoring
3) The tape drive is a newer DDS/DLT/Ultrium drive

Then you could use the "tapeinfo" command. It is available from HP, but I've include a shell archive of the program and documentation as an attachment.

This tool talks to the tape drive controller, which maintains data transfer information. You can reset the counters, read through the tape, then display the counters. It will show both compressed and uncompressed.

HTH

-- Rod Hills
There be dragons...