veli-pekka
asked on
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?
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?
DR_OPEN means there's no tape in the drive.
Also do this:
mt -f /dev/st0 rewind
ASKER
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).
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).
So can you run your tar command now?
ASKER
No I can't.
Is $SOURCE_DIRS properly set with complete path? What error message do you get when you try to run it?
ASKER
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"
/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"
Ok, first try setting the block size and then retry the dd command
mt -f /dev/nst0 setblk 0
ASKER
I will continue with this on Friday.
ASKER
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
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
ASKER
dmesg
[ 6153.745797] st0: Add. Sense: Write error
[ 6153.745801] st0: Error on write filemark.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
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?
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?
ASKER
The problem was faulty drive.
So my comment 35108197 was close
ASKER
The drive itself wasn't functioning