LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LTO4 - tape data extraction problem (https://www.linuxquestions.org/questions/linux-newbie-8/lto4-tape-data-extraction-problem-4175437457/)

Preacherpj 11-16-2012 11:34 AM

LTO4 - tape data extraction problem
 
Hi everybody -

**Full disclosure, I'm a Linux beginner**

I work in an environment where we receive data in different formats, extract it and then manipulate it. Often the data comes on hard drives - but yesterday we recieved a chunk of information on an LTO-4 tape and I'm having a difficult time getting it off.

We have a CENTOS machine connected to a LTO-4 tape drive. I put the tape in and used

mt -f /dev/nst0 rewind (the drive activity light lit up and the tape rewound, so I know the connection is good and NST0 is the correct drive designation)

To get data off I tried
tar -xvf /dev/nst0 which results in:

tar: /dev/nst0: Cannot read: Cannot allocate memory
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

I tried manipulating the block size - tried
mt -f /dev/nst0 setblk 0
mt -f /dev/nst0 setblk 512

but I get the same error either way.

Would really appreciate any help in figuring out how to get this data off the tape!

thanks in advance,
Ryan

michaelk 11-16-2012 12:36 PM

Just for clarification device /dev/st0 should rewind the tape after the current operation is completed and /dev/nst0 should not rewind the tape.

Do you know how the data was written to tape? Try the following:

tar -t --blocking-factor=128 -xvf /dev/st0

Preacherpj 11-16-2012 01:12 PM

Michael -

Thanks for the help, I truly appreciate.

So I entered
tar -t --blocking-factor=128 xvf /dev/st0 and hit 'enter'

How long should that command take to process? I see the small blinking black square flashing underneath that command - but nothing else. I also don't hear the tape spinning. It's been doing this for about 20 mins now. Is this typical for this command?

Thanks again

michaelk 11-16-2012 01:18 PM

No it shouldn't. I would press Ctrl^c to cancel.

Do you know how the data was written to tape?

Preacherpj 11-16-2012 01:25 PM

Quote:

Originally Posted by michaelk (Post 4830955)
No it shouldn't. I would press Ctrl^c to cancel.

Do you know how the data was written to tape?

Unfortunately no, its off a system that is proprietary. We've gotten other tapes in the past DDS, AIT3 tapes that I've gotten data off of using this CENTOS deck, but this is my first crack at a LTO4 tape.

For various reasons it would be difficult to query the site to get more information on how the data was recorded.

michaelk 11-16-2012 02:09 PM

I would assume that the same basic process would work independent of the type of media. Is tar what you normally use?

Preacherpj 11-16-2012 02:15 PM

Yup, I always use tar.

Depending on what type of media we get in, I have to mess around with the block size until I find the right match - but that doesn't seem to be working here. Is there a way to determine what block size I need to set on the media?

michaelk 11-16-2012 03:04 PM

Well I thought the block size for the LTOs was 64k but it could be 32K which would make the block size factor 64 instead of 128.

Just curious have you tried writing and reading to a blank tape to verify the drive is functioning correctly?

Preacherpj 11-19-2012 08:18 AM

Mike -

I am able to read/write to LTO tapes using the drive - its practically brand new. I think its a block-size issue...........is there anyway that you know of to run some type of check to see what the block size might be? I thought there was a way to skip a block forward and then check to see how much data you skipped to see the block size?

michaelk 11-19-2012 09:16 PM

I've never tried this method so I do not know if it actually works.
http://www.cyberciti.biz/faq/rhel-ce...ape-blocksize/


All times are GMT -5. The time now is 09:00 AM.