Please enter search query.
Search <product_name> all support & community content...
Article: 100022865
Last Published: 2013-10-23
Ratings: 0 0
Product(s): NetBackup & Alta Data Protection
Problem
How to read a tape header to verify the recorded volume serial numberSolution
1. Use the
Example:
The tape is loaded into an available drive, and a link is created from /tmp/292 to the device such as /dev/rmt/0cbn. The link is used to "talk" to the drive/tape.
2. Issue the following command to rewind the tape:
Example:
3. Issue the following command to read the header:
Example:
The output of this command will look like this:
0000 0000 0000 0000 0000 0000 0000 0000
*
*
Note: If in doubt as to which block size to use in the above command, verify the header block size by running the "
Example:
The output looks like this:
Cntl' C (^C) out of the command after verifying file1, then rewind the tape again.
4. Issue the following command to rewind the tape:
Example:
5.Use "
tpreq
command to load a tape. The format is:
/usr/openv/volmgr/bin/tpreq -ev <external volume serial number> -d <density> -p <poolname> -f <filename>
Example:
/usr/openv/volmgr/bin/tpreq -ev CHM292 -d dlt -p NetBackup -f /tmp/292
The tape is loaded into an available drive, and a link is created from /tmp/292 to the device such as /dev/rmt/0cbn. The link is used to "talk" to the drive/tape.
2. Issue the following command to rewind the tape:
mt -f <file name> rewind
Example:
mt -f /tmp/292 rewind
3. Issue the following command to read the header:
dd if=<file name> bs=1024 | od -cx
Example:
dd if=/tmp/292 bs=1024 | od -cx
The output of this command will look like this:
0000000 V O L 1 C M H 2 9 2 \0 \0 \0 \0 \0 \0
<--------------This is the recorded volume serial number.
564f 4c31 434d 4832 3932 0000 0000 0000
0000020 \0 \0 \0 \0 \0 \0 \0 001 \0 \0 \0 \r 9 346 4 324
0000 0000 0000 0001 0000 000d 39e6 34d4
0000040 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000 0000 0000 0000 0000 0000 0000 0000
0000060 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 001 \0 \0 \0 001
0000 0000 0000 0000 0000 0001 0000 0001
0000100 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 004 \0 \0 \0 \0 \0
0000 0000 0000 0000 0000 0400 0000 0000
0000120 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000 0000 0000 0000 0000 0000 0000 0000
*
0000160 T h I s I s A B P t A p
5468 4973 2049 7320 4120 4250 2074 4170
0000200 E h E a D e r \0 \0 \0 \0 \0 \0 \0 \0
4520 6845 6144 6572 0000 0000 0000 0000
0000220 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000 0000 0000 0000 0000 0000 0000 0000
*
1+0 records in
1+0 records out
0002000
Note: If in doubt as to which block size to use in the above command, verify the header block size by running the "
tcopy
" command. On the Solaris platform the command format is:
tcopy <file name>
Example:
tcopy /tmp/292
The output looks like this:
file 1: record 1: size 1024
file 1: eof after 1 records: 1024 bytes.
Cntl' C (^C) out of the command after verifying file1, then rewind the tape again.
4. Issue the following command to rewind the tape:
mt -f <file name> rewind
Example:
mt -f /tmp/292 rewind
5.Use "
tpunmount
" command to unmount the tape. The format is:
/usr/openv/volmgr/bin/tpunmount -f <file name>
Example: /usr/openv/volmgr/bin/tpunmount -f /tmp/292