1

I've been handed an LTO3 which has been written with content, but I have no idea how it was made. I've been given the task of finding out what is actually stored on the tape. I've tried the usual tar command but the errors suggest the tape wasn't written using tar. What would be the simplest way of me discovering what type of content is on the tape? I am quite new to all this so a step by step would be appreciated! Thanks in advance!

I have used the following commands:

This is an attempt to get a list of the contents- Input1 :

dd if=/dev/nst0 bs=256k skip=1 | /bin/tar -tf - > file.txt

Output 1:

dd: ‘/dev/nst0’: cannot skip to specified offset
dd: warning: partial read (65536 bytes); suggest iflag=fullblock
/bin/tar: This does not look like a tar archive
/bin/tar: Skipping to next header
dd: error reading ‘/dev/nst0’: Input/output error
0+357469 records in
0+357469 records out
23427088384 bytes (23 GB) copied, 260.175 s, 90.0 MB/s
/bin/tar: Exiting with failure status due to previous errors

Input 2:

tar -b 512 -tf /dev/st0 > file.txt

Output 2:

tar: Record size = 128 blocks
tar: This does not look like a tar archive
tar: Skipping to next header
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: /dev/nst0: Cannot read: Input/output error
tar: Too many errors, quitting
tar: Error is not recoverable: exiting now

Attempt to extract:

Input 3:

tar -b 512 -xvf /dev/nst0

Output 3:

tar: /dev/nst0: Cannot read: Input/output error
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

I've now tried tihs to dd some of the contents into a file:

Input 4:

dd if=/dev/nst0 of=file.dat bs=8k count=1

Output 4:

dd: error reading ‘/dev/nst0’: Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.000700687 s, 0.0 kB/s
neilH
  • 937
  • 1
  • 6
  • 16
  • 1
    Please show us what you have actually tried and what happened when you tried it. – user9517 Jul 19 '16 at 10:42
  • I've added some additional info regarding the commands I've tried. – neilH Jul 19 '16 at 11:34
  • 1
    If you *need* this done (meaning, someone is willing to pay for it), you can approach a data recovery service to get a quote. If you find out that this is a Legato Networker tape and you don't have Legato Networker, you won't be doing anything with it anyway. – mfinni Jul 19 '16 at 13:14

1 Answers1

2

I would just dd the first say 8k to a file dd if=/dev/nst0 of=file.dat bs=8k count=1, then use file, or strings, or hexdump, or od, or something to examine the contents. Perhaps there is some header information that will tell you what the was used to write the tape. Otherwise it could be almost anything, and getting the information out in a way that you can use might be pretty improbable.

lsd
  • 1,653
  • 10
  • 8
  • Hello, i've tried dd if=/dev/nst0 of=file.dat bs=8k count=1 and got this error - dd: error reading ‘/dev/nst0’: Cannot allocate memory 0+0 records in 0+0 records out 0 bytes (0 B) copied, 2.18601 s, 0.0 kB/s – neilH Jul 19 '16 at 12:48
  • I believe /dev/nst0 is the non tape rewinding device. You may need to rewind using `mt -f /dev/nst0 rewind` – lsd Jul 19 '16 at 14:26
  • Thanks, but I'm still getting the same error after rewinding the tape :( – neilH Jul 19 '16 at 17:01
  • This page: http://askubuntu.com/questions/96159/tar-dev-nst0-cannot-read-cannot-allocate-memory-with-tar-pv-and-tape-driv suggests that block size is wrong (other pages I have found say the same thing). Perhaps if written with 512b blocks, read with `dd if=/dev/nst0 of=file.dat bs=512 count=16` to see if it works, and maybe experiment with different block sizes. – lsd Mar 16 '17 at 17:16