Solved

Copy raw data from a LTO-3 tape with dd

Posted on 2014-09-03
5
898 Views
Last Modified: 2014-09-09
I am trying to read the content of a LTO tape in Linux using the 'dd' and 'mt' tools. I am at the beginning of a file an run this command:

dd if=/dev/nst0 of=file bs=64k

and get an i/o error and the tape drive head moves 1 block. Now, I ran again the above command and the file is being copied from the tape, but the header is incomplete (I guess because of that 1st block I cannot read).

I may be missing something. Can you please help me with this ?
0
Comment
Question by:Nosfedra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 3

Author Comment

by:Nosfedra
ID: 40301136
It looks like it's a file preamble, 312 bytes in size. Now I can read them both, and concatenate the files in the end.
0
 
LVL 40

Accepted Solution

by:
noci earned 334 total points
ID: 40302315
tapes are written with a fixed header part followed by a parity error block (signaling EOF)
then a data block according to the data in the header. then an EOF marker.
then a datablock (trailer) which is the same as the header with some extra fields filled in. (EOF) marker, and another (EOF) marker to signal then of tape or another header/data/trailer set.
0
 
LVL 17

Assisted Solution

by:Gerald Connolly
Gerald Connolly earned 166 total points
ID: 40303392
Looks like standard tape layout. File split into blocks followed by tape-mark, repeat until hit logical end of tape
0
 
LVL 40

Assisted Solution

by:noci
noci earned 334 total points
ID: 40303945
Actually the tape hardware knows only about datablocks (up to a certain size)  and EOF markers.
you need to specify the sizes of block and be happy to get an EOF message.

the actual format of the headers may vary.
ISO dictates that the HDR1,HDR2, up to HDR4 headers are all 80 bytes long and are either ASCII of EBCDIC.
those headers specify how the data blob after the EOF can be read.
The traler has the same records as HDR1..4 but they are aptly named: EOF1..EOF4.  In those records the counts are filled in here in the HDR the count fields are 0.
0
 
LVL 3

Author Closing Comment

by:Nosfedra
ID: 40311431
Guys, thanks for your feedback. That's what I did:

while EOD
do
  read preamble
  read file
  goto next EOF -- which is actually the beginning of the next file
done
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. Theā€¦
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question