Solved

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

Posted on 2011-03-08
16
1,220 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
  • 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
 
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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 500 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

AWS Glacier is Amazons cheapest storage option and is their answer to a ‘Cold’ storage service.  Customers primarily use this service for archival purposes and storage of infrastructure backups.  Its unlimited storage potential and low storage cost …
I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now