tar xvf not working right

tar xvf not working right

Post by Bob Holtzm » Sat, 01 Jun 2002 13:38:29



Hi,
I looked thru the archives and found a bunch of stuff on tar xvf
but nothing that addressed my problem directly.

After creating a tape archive with tar cvf /dev/ht0 /home/username
I tried restoring it in a tmp directory using tar xvf /dev/ht0.
The error messages were:

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

I also tried tar xvf /dev/ht0 /home/username with the same results.
What am I missing? Any help appreciated. Thanks.

--

Bob Holtzman
"If you think you're getting free lunch,
 ........check the price of the beer!"
to reply by email remove "spamfree"

 
 
 

tar xvf not working right

Post by Malcolm Scot » Sat, 01 Jun 2002 18:02:42



> Hi,
> I looked thru the archives and found a bunch of stuff on tar xvf
> but nothing that addressed my problem directly.

> After creating a tape archive with tar cvf /dev/ht0 /home/username
> I tried restoring it in a tmp directory using tar xvf /dev/ht0.
> The error messages were:

> tar: Cannot read: Input/output error
> tar: At beginning of tape, quitting now
> tar: Error is not recovreable: exiting now

> I also tried tar xvf /dev/ht0 /home/username with the same results.
> What am I missing? Any help appreciated. Thanks.

Could be a problematic tape (or drive) - I've been getting this problem
myself with a few old tapes recently. Due to the unreliable nature of
tapes, I always recommend doing a verify on tape backups, using:

tar cvWf ...

When you try to restore the backup, is there any activity on your tape
drive? Or does nothing happen at all?

--Malcolm

 
 
 

tar xvf not working right

Post by Charles Sulliva » Mon, 03 Jun 2002 13:12:09








>> > Could be a problematic tape (or drive) - I've been getting this
>> > problem myself with a few old tapes recently. Due to the unreliable
>> > nature of tapes, I always recommend doing a verify on tape backups,
>> > using:

>> > tar cvWf ...

>> You're right. cvWf yields a whole bunch of: tar:/dev/ht0:Cannot
>> read:Input/output error Followed by:
>> tar:Too many errors,quitting
>> tar:Error is not recoverable:exiting now

>> > When you try to restore the backup, is there any activity on your
>> > tape drive? Or does nothing happen at all?

>> Nothing, however I don't think this means the drive is shot (trying to
>> second guess you) because it works well in W95.

>> While I've got your attention, since HP no longer manufactures or
>> supports Colorado drives, do you have any opinions on QIC IDE drives?
>> DAT drives are over my head $wise.

>> Thanks for the reply

> I seldom follow up my own posts but I thought I'd tell you that the
> mystery has deepened. The tape that gave me all the errors works
> perfectly in W95, both backup and restore. Sooooo...if it's not the
> drive or the tape what the heck could be going on? I should mention that
> I'm running RH7.2 and that tape backups and restores worked when I was
> running RH6.0 last year.

> I'm really at sea on this and would appreciate any help I can get.
> Thanks.

I was about to post on a similar problem.

I can 'tar -cvf /dev/tape <list>' and it seems to work OK.  However if I
add the verify, i.e., 'tar -cvWf /dev/tape <list>', tar never starts the
verify stage, seemingly*.  'gtop' shows it using an increasing
pecentage of CPU time, reaching 95% or so after a few minutes.  The same
thing happens if I attempt to append files using 'tar -rvf /dev/tape
<list>'.  Interestingly, all these operations work fine if the tar is
written to a file rather than to the tape drive.

I am running RH 7.2 (i386) and have a Seagate ST20000 ATAPI IDE drive.
With the more recent versions of Linux, the drive is /dev/st0 - I think
it's using the ide->scsi driver.

Given that tar works when writing to a file, I suspect that the problem
is with the RH 7 driver for the tape drive rather than with tar.

Regards,
Charles Sullivan

 
 
 

tar xvf not working right

Post by Charles Sulliva » Thu, 06 Jun 2002 12:17:19





>> I was about to post on a similar problem.

>> I can 'tar -cvf /dev/tape <list>' and it seems to work OK.  However if
>> I add the verify, i.e., 'tar -cvWf /dev/tape <list>', tar never starts
>> the verify stage, seemingly*.  'gtop' shows it using an
>> increasing pecentage of CPU time, reaching 95% or so after a few
>> minutes.  The same thing happens if I attempt to append files using
>> 'tar -rvf /dev/tape <list>'.  Interestingly, all these operations work
>> fine if the tar is

> I use /dev/ht0 or /dev/nht0 instead of /dev/tape and the W option works.
> I've done that ever since RH6.0. Let me know if it works for you.

/dev/tape is just a link to /dev/st0.

Somewhere along in the progression from RH 6 to RH 7 the device
for the tape unit changed from /dev/ht0 to /dev/st0.  So now under
RH 7.2 if I try to use /dev/ht0, I get this:
  tar: /dev/ht0: Cannot open: No such device

(even though 'ls -l /dev/ht0' shows there is an entry under /dev for it).

If there's a way of forcing the old /dev/ht0, I don't know what it is.

 
 
 

tar xvf not working right

Post by Charles Sulliva » Fri, 07 Jun 2002 09:24:15





>> > I use /dev/ht0 or /dev/nht0 instead of /dev/tape and the W option
>> > works. I've done that ever since RH6.0. Let me know if it works for
>> > you.

>> /dev/tape is just a link to /dev/st0.

>> Somewhere along in the progression from RH 6 to RH 7 the device for the
>> tape unit changed from /dev/ht0 to /dev/st0.

> Not true. I was using /dev/ht0 with RH7.2.

>> So now under
>> RH 7.2 if I try to use /dev/ht0, I get this:
>>   tar: /dev/ht0: Cannot open: No such device

>> (even though 'ls -l /dev/ht0' shows there is an entry under /dev for
>> it).

>> If there's a way of forcing the old /dev/ht0, I don't know what it is.

> Try changing the link to from /dev/st0 to /dev/ht0 assuming your tape
> drive works with IDE ATAPI and not SCSI.

The link shouldn't come into play if I specify the actual device, i.e.,
/dev/st0 or /dev/ht0, rather than /dev/tape.  But I changed it anyway and
it didn't make a difference.

There may be a simpler way by fiddling with /etc/modules.conf, but what I
found I had to do to use /dev/ht0 as the tape device is append
"hdd=ide-tape" to the kernel in lilo.  I previously had appended
"hdc=ide-scsi" for my CD burner and it appears that the system used it for
the tape drive as well.

However 'tar -cvWf /dev/ht0 xxxx' and 'tar -rvf /dev/ht0 xxxx' still don't
work.  But now I'm seeing messages to the effect "unable to write EOF
mark".  (Just using 'tar -cvf /dev/ht0 xxxx' seems to backup correctly,
with no error messages.)

When /dev/st0 was the tape device, 'dmesg' showed this message:
 "st0: Error with sense data: Current st09:00: sense key Illegal Request
  Additional sense indicates Invalid command operation code"

Are you using ide-scsi for any devices on your system?

My drive is identified by Linux as "Seagate STT20000A  ATAPI TAPE Drive".

 
 
 

tar xvf not working right

Post by Charles Sulliva » Sun, 09 Jun 2002 13:48:43





>> The link shouldn't come into play if I specify the actual device, i.e.,
>> /dev/st0 or /dev/ht0, rather than /dev/tape.  But I changed it anyway
>> and it didn't make a difference.

>> There may be a simpler way by fiddling with /etc/modules.conf, but what
>> I found I had to do to use /dev/ht0 as the tape device is append
>> "hdd=ide-tape" to the kernel in lilo.  I previously had appended
>> "hdc=ide-scsi" for my CD burner and it appears that the system used it
>> for the tape drive as well.

>> However 'tar -cvWf /dev/ht0 xxxx' and 'tar -rvf /dev/ht0 xxxx' still
>> don't work.  But now I'm seeing messages to the effect "unable to write
>> EOF mark".  (Just using 'tar -cvf /dev/ht0 xxxx' seems to backup
>> correctly, with no error messages.)

> That's what mine showedn too, but when I tried to restore I got errors.
> Also, when I used the W option it showed "too many errors." does your
> box detect the tape drive as /dev/ht0 when booting? If so, that's what
> *should* work (it says here in fine print).

I suppose it does - if I don't use the ide-scsi kernel append for my
CD-RW, or if I do and use the ide-tape kernel append for the TBU, then I
can use /dev/ht0 for the TBU.  Otherwise, using /dev/ht0 results in the
error message "No such device" and I have to use /dev/st0.

Quote:>> When /dev/st0 was the tape device, 'dmesg' showed this message:
>>  "st0: Error with sense data: Current st09:00: sense key Illegal
>>  Request
>>   Additional sense indicates Invalid command operation code"

>> Are you using ide-scsi for any devices on your system?

> Not to my knowledge.

That explains why your TBU was always mapped to /dev/ht0.  I thought my
TBU changing to /dev/st0 had something to do with the kernel upgrade, but
it was more likely my adding the ide-scsi kernel append when I installed
my CD-RW.

I'm going to be out-of-town for the next week but will fiddle with this
problem some more when I get back.  I'm getting the impression that the
buffers are somehow not flushed to the drive.

 
 
 

1. tar xvf not working on new RH6.1 install

I consider this part of setup of my new machine so post it
here. Please let me know if it should be in a different group.

Very strange. Now that my RH6.1 disk is up and running I do a tape
backup of my RH5.2 disk /usr/local and /home. Swap disks out and boot
up RH6.1.

Quickly do a

root> tar tvf /dev/ht0

Lists out all the files from /usr/local and /home BUT without the
leading /

For example

home/pfohl/.login

Not idea why but I'm glad to see all the files there.

Next:

root> cd /home
root> tar xvf /dev/ht0 home

starts listing out all the home/* files so I assume it is
working. After it is done I check the directories and none of them
were created and none of the files are there.

WHY does it not restore my files from tape?? And why does it archive
to tape without the leading / ?

Thanks!

PS I tried a

root> tar xvf /dev/ht0 /home

but got the error:

tar: /home: Not found in archive
tar: Error exit delayed from previous errors

--
                                JEFF PFOHL

                                PHONE : (505) 844-7033  work
                                        (505) 299-9516  home
                                        (505) 844-6729  fax
                                http://nucalf.physics.fsu.edu/pfohl

"My grandfather once told me that there are two kinds of people:
 Those who do the work and those who take the credit. He told me to
 try to be in the first group; there was much less competition."

 - Indira Ghandi, the late Prime Minister of India

2. Desperatly seeking CVS Interface

3. tar -xvf mozilla.tar = tar: directory checksum error

4. DHCP server available for Linux?

5. Wanted: rcmd host tar x_?_vqf file.tar file1 ... fileN | tar xvf -

6. Need some suggestions

7. ? tar xvf my.tar | compress

8. XFree 3.1 and SPEA Mirage P64 VLB (864)

9. tar xvf /dev/rmt0 file.* - how does it work?

10. Re-Re- ? tar xvf my.tar | c

11. tcp wrappers not working right - Solaris 8 - not an IPV6 problem

12. rsh remote dd if=/dev/rmt/0 bs=1024k | tar -xvf -

13. tar -xvf