Tape backup - Ubuntu linux - HP 72GB internal USB DAT - ML350g6

Hi,
I'm having problem with tape backup. When I try " tar -czf /dev/st0 $SOURCE_DIRS", I get error: /bin/tar: /dev/st0: Cannot write: Input/output error.

mt -f /dev/st0 status
 returns:
SCSI 2 tape drive:
File number=-1, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x0 (default).
Soft error count since last status=0
General status bits on (50000):
 DR_OPEN IM_REP_EN

mt status returns:
  /dev/tape: Inappropriate ioctl for device
Which sounds bad.

My stinit.def:
manufacturer=HP model ="C7438A" {
can-bsr can-partitions auto-lock
mode1 blocksize=0 compression=1
mode2 blocksize=1024 compression=1
mode3 blocksize=0 compression=0
mode4 blocksize = 1024 compression=0 }

Any Ideas how to proceed?
veli-pekkaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
farzanjConnect With a Mentor Commented:
You need to check your driver.  Appears to me that your driver for the tape is not installed or not functioning
0
 
svsCommented:
DR_OPEN means there's no tape in the drive.
0
 
farzanjCommented:
Also do this:
 
mt -f /dev/st0 rewind

Open in new window

0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
veli-pekkaAuthor Commented:
Ok, new 'mt -f /dev/st0 status', this time with tape loaded:

SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x47 (DDS-5 or TR-5).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

I did rewind, but it didn't help (I didn't get any errors).
0
 
farzanjCommented:
So can you run your tar command now?
0
 
veli-pekkaAuthor Commented:
No I can't.
0
 
farzanjCommented:
Is $SOURCE_DIRS properly set with complete path?  What error message do you get when you try to run it?
0
 
veli-pekkaAuthor Commented:
Yes it is. I have also tried with single folder. Error message is:
 /bin/tar: /dev/st0: Cannot write: Input/output error.

If I try for example:
 dd if=/dev/zero of=/dev/st0
I get the same "Cannot write: Input/output error"

0
 
farzanjCommented:
Ok, first try setting the block size and then retry the dd command
mt -f /dev/nst0 setblk 0

Open in new window

0
 
veli-pekkaAuthor Commented:
I will continue with this on Friday.
0
 
veli-pekkaAuthor Commented:
Still no success:
  sudo mt -f /dev/st0 setblk 0
  sudo dd if=/dev/zero of=/dev/st0
dd: writing to 'dev/st0': Input/output error
dd: closing output file '/dev/st0': Input/output error
0
 
veli-pekkaAuthor Commented:

dmesg
[ 6153.745797] st0: Add. Sense: Write error
[ 6153.745801] st0: Error on write filemark.
0
 
veli-pekkaAuthor Commented:
Hi,

I checked the drivers and they should be fine (output was similar to this, I'm not at the server right now):
      lsmod | grep usb_storage
      usb_storage 61193 0

      lsmod | grep st
      st 35933 0

Should I check something else as well?
0
 
veli-pekkaAuthor Commented:
The problem was faulty drive.
0
 
farzanjCommented:
So my comment 35108197 was close
0
 
veli-pekkaAuthor Commented:
The drive itself wasn't functioning
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.