?
Solved

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

Posted on 2011-03-08
16
Medium Priority
?
1,271 Views
Last Modified: 2012-06-21
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
Comment
Question by:veli-pekka
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 6
16 Comments
 
LVL 9

Expert Comment

by:svs
ID: 35068623
DR_OPEN means there's no tape in the drive.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35068637
Also do this:
 
mt -f /dev/st0 rewind

Open in new window

0
 

Author Comment

by:veli-pekka
ID: 35071203
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
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 31

Expert Comment

by:farzanj
ID: 35071330
So can you run your tar command now?
0
 

Author Comment

by:veli-pekka
ID: 35071399
No I can't.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35071470
Is $SOURCE_DIRS properly set with complete path?  What error message do you get when you try to run it?
0
 

Author Comment

by:veli-pekka
ID: 35071642
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
 
LVL 31

Expert Comment

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

Open in new window

0
 

Author Comment

by:veli-pekka
ID: 35086089
I will continue with this on Friday.
0
 

Author Comment

by:veli-pekka
ID: 35106597
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
 

Author Comment

by:veli-pekka
ID: 35107400

dmesg
[ 6153.745797] st0: Add. Sense: Write error
[ 6153.745801] st0: Error on write filemark.
0
 
LVL 31

Accepted Solution

by:
farzanj earned 1500 total points
ID: 35108197
You need to check your driver.  Appears to me that your driver for the tape is not installed or not functioning
0
 

Author Comment

by:veli-pekka
ID: 35108744
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
 

Author Comment

by:veli-pekka
ID: 35193955
The problem was faulty drive.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35193969
So my comment 35108197 was close
0
 

Author Closing Comment

by:veli-pekka
ID: 35339492
The drive itself wasn't functioning
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question