LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 11-11-2010, 05:23 PM   #1
mervclel
LQ Newbie
 
Registered: Jun 2010
Posts: 9
Blog Entries: 1

Rep: Reputation: 0
weof at beginning of tape


I have a HP Ultrium 960 Tape Drive (800GB). I was having a few issues with an application reading the tape so I was doing some diags using the 'mt' command. I rewound the tape and then inadvertantly did a 'weof' command. So now I have an 'eof' at the beginning of the tape.

Is there any way of recovering from this? I need the data off the tape.

If I run mt -f /dev/rmt/2 status I get 'sense key = EOF'
If I run gtar -ztvf /dev/rmt/2 I get 'unexpected end of file'
Can I use the command mt -f /dev/rmt/2 fsf 1 ? And what would that do?
If I let the application try and restore from the tape it responds 'unable to find header'.

Thanks and regards
 
Old 11-11-2010, 06:02 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
If the mark is an end of file and NOT end of tape then you should be able to address the tape drive multiple times through the nonrewinding interface. Then name of that interface depends on your Linux distribution. Doing this the first time should move the tape past the EOF marker. Then you should be able to read whatever data is left on the tape.

Usually the nonrewinding interface for a tape device is the same as the tape device except that it begins with the letter n. If your tape drive is /dev/rmt1 then the nonrewinding interface should be /dev/nrmt1.

So you could use the dd command to move the tape past the EOF, then read the rest of the data.
Code:
dd if=/dev/nrmt/1 of=/dev/null
Now read the rest of the data.

You should always state the Linux distribution and version that you are working with.

Last edited by stress_junkie; 11-11-2010 at 06:07 PM.
 
Old 11-15-2010, 01:54 AM   #3
mervclel
LQ Newbie
 
Registered: Jun 2010
Posts: 9
Blog Entries: 1

Original Poster
Rep: Reputation: 0
Thanks stress_junkie for getting back to me.
This may be a solaris enquiry not a linux. When I run uname -X I get the following:-
System = SunOS
Node = pinn810-1
Release = 5.10
KernelID = Generic_118855-36
Machine = i86pc

I thought it was a linux OS because of the GRUB menu at boot up. I inserted the tape and did a mt -f /dev/rmt/2 fsr 1. A status here showed I was at EOF. If I do another mt -f /dev/rmt/2 fsr 1 I get 'failed I/O error". Don't know if this means anything? Now that I am at EOF I tried dd if=/dev/nrmt/2 of=/dev/null. Response was: 'dd: /dev/nrmt/2: open: No such file or directory'.

There is no nrmt in the /dev directory. If I do a dd if=/dev/rmt/2 of=/dev/null (without the 'n'), I get 0+0 records in 0+0 records out.

I had a look at the doc for 'tar' looking for a command that might be able to read the tape from the EOF point on, but could not see how to do this. If I can read the file info then my next move would be to try and extract it.
regards.....
 
  


Reply

Tags
tape, tape drive


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debugging slow tape: Big disparity between iostat and tape speed wsanders Linux - Server 2 05-23-2009 09:02 AM
Check tape drive availability (full tape) TripleOne Linux - Server 0 02-12-2009 03:45 AM
Unable to insert the DAT72 Tape in tape drive. peddip Red Hat 8 01-08-2009 09:27 AM
Tape Backups and How can i find out the Name (label) of the tape in the drive?? helptonewbie Linux - Newbie 2 10-27-2008 07:20 AM
Using a DDS5 tape drive to restore from a DDS3 backup tape. AndrewCAtWayofthebit Linux - Hardware 1 05-14-2006 09:15 AM


All times are GMT -5. The time now is 04:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration