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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.