• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1312
  • Last Modified:

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?
0
veli-pekka
Asked:
veli-pekka
  • 9
  • 6
1 Solution
 
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
 
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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
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
 
farzanjCommented:
You need to check your driver.  Appears to me that your driver for the tape is not installed or not functioning
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.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 9
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now