Tape Libraries and Drives
cancel
Showing results for 
Search instead for 
Did you mean: 

tar: /dev/nst0: Cannot write: Input/output error on Linux

SCL_2
Occasional Visitor

tar: /dev/nst0: Cannot write: Input/output error on Linux

Hi,
I'm very new at Linux and would love some assistance. I have been trying to get a backup working for our new HP Proliant ML150 server that is running Linux Open eSuse 10.3. We have a new HP Storageworks DAT160 drive and I am unable to backup up any file that is bigger than 1MB. I come up with the error

tar: /dev/nst0: Cannot write: Input/output error
tar: Error is not recoverable: exiting now

The command I am using is
tar cvf /dev/nst0

I have tried varies things from cleaning the tape drive, to using brand new tape (DAT160), rebooting the server and finally having the original tape drive replaced (as it was still under warranty). Following are results from commands I have issued to check tape drive status:

#dmesg | grep scsi
scsi0 : ahci
scsi1 : ahci
scsi2 : ahci
scsi3 : ahci
scsi4 : ahci
scsi5 : ahci
scsi 0:0:0:0: Direct-Access ATA GB0500C4413 n/a PQ: 0 ANSI: 5
scsi 2:0:0:0: Direct-Access ATA GB0500C4413 n/a PQ: 0 ANSI: 5
scsi6 : ata_piix
scsi7 : ata_piix
scsi 6:0:0:0: CD-ROM HL-DT-ST CD-ROM GCR-8486B 2.00 PQ: 0 ANSI: 5
scsi8 : ioc0: LSI53C1030, FwRev=01032700h, Ports=1, MaxQ=255, IRQ=16
scsi 8:0:3:0: Sequential-Access HP DAT160 WP82 PQ: 0 ANSI: 3
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 2:0:0:0: Attached scsi generic sg1 type 0
scsi 6:0:0:0: Attached scsi generic sg2 type 5
scsi 8:0:3:0: Attached scsi generic sg3 type 1
sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
sr 6:0:0:0: Attached scsi CD-ROM sr0
st 8:0:3:0: Attached scsi tape st0
mptscsih: ioc0: attempting task abort! (sc=f780ce40)
mptscsih: ioc0: Issue of TaskMgmt failed!
mptscsih: ioc0: task abort: FAILED (sc=f780ce40)
mptscsih: ioc0: attempting target reset! (sc=f780ce40)
mptscsih: ioc0: target reset: SUCCESS (sc=f780ce40)
mptscsih: ioc0: attempting task abort! (sc=f780c6c0)
mptscsih: ioc0: Issue of TaskMgmt failed!
mptscsih: ioc0: task abort: FAILED (sc=f780c6c0)
mptscsih: ioc0: attempting target reset! (sc=f780c6c0)
mptscsih: ioc0: target reset: SUCCESS (sc=f780c6c0)
mptscsih: ioc0: attempting task abort! (sc=e148b940)
mptscsih: ioc0: Issue of TaskMgmt failed!
mptscsih: ioc0: task abort: FAILED (sc=e148b940)
mptscsih: ioc0: attempting target reset! (sc=e148b940)
mptscsih: ioc0: target reset: SUCCESS (sc=e148b940)
mptscsih: ioc0: attempting task abort! (sc=ceb99480)
mptscsih: ioc0: Issue of TaskMgmt failed!
mptscsih: ioc0: task abort: FAILED (sc=ceb99480)
mptscsih: ioc0: attempting target reset! (sc=ceb99480)
mptscsih: ioc0: target reset: SUCCESS (sc=ceb99480)

#dmesg | grep "st"
Linux version 2.6.22.17-0.1-default (geeko@buildhost) (gcc version 4.2.1 (SUSE Linux)) #1 SMP 2008/02/10 20:01:04 UTC
Allocating PCI resources starting at 50000000 (gap: 40000000:a0000000)
Built 1 zonelists. Total pages: 259874
Enabling fast FPU save and restore... done.
Checking 'hlt' instruction... OK.
CPU0: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz stepping 0b
CPU1: Intel(R) Xeon(R) CPU 5110 @ 1.60GHz stepping 0b
migration_cost=47
NET: Registered protocol family 16
ACPI: bus type pci registered
Setting up standard PCI resources
ACPI: bus type pnp registered
ACPI: ACPI bus type pnp unregistered
PCI: If a device doesn't work, try "pci=routeirq". If it helps, post a report
Time: tsc clocksource has been installed.
NET: Registered protocol family 2
TCP established hash table entries: 131072 (order: 8, 1572864 bytes)
TCP: Hash tables configured (established 131072 bind 65536)
TCP reno registered
Machine check exception polling timer started.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
vesafb: pmi: set display start = c00c7b52, set palette = c00c7bbe
NET: Registered protocol family 1
ACPI: Processor [CPU0] (supports 8 throttling states)
ACPI: Processor [CPU1] (supports 8 throttling states)
SCSI subsystem initialized
Fusion MPT SPI Host driver 3.04.05
target8:0:3: Domain Validation skipping write tests
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
sda8<6>USB Universal Host Controller Interface driver v3.0
ehci_hcd 0000:00:1d.7: EHCI Host Controller
ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
uhci_hcd 0000:00:1d.0: UHCI Host Controller
uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2
usb usb2: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: UHCI Host Controller
uhci_hcd 0000:00:1d.1: UHCI Host Controller
uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3
usb usb3: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb3: Product: UHCI Host Controller
uhci_hcd 0000:00:1d.2: UHCI Host Controller
uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4
usb usb4: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb4: Product: UHCI Host Controller
uhci_hcd 0000:00:1d.3: UHCI Host Controller
uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5
usb usb5: new device strings: Mfr=3, Product=2, SerialNumber=1
usb usb5: Product: UHCI Host Controller
usb 4-2: new device strings: Mfr=1, Product=2, SerialNumber=3
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
rtc_cmos 00:05: rtc core: registered rtc_cmos as rtc0
st: Version 20070203, fixed bufsize 32768, s/g segs 256
st 8:0:3:0: Attached scsi tape st0
st 8:0:3:0: st0: try direct i/o: yes (alignment 512 B)
osst :I: Tape driver with OnStream support version 0.99.4
osst :I: $Id: osst.c,v 1.73 2005/01/01 21:13:34 wriede Exp $
st0: Block limits 1 - 16777215 bytes.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
NET: Registered protocol family 17
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st0: Error 80000 (sugg. bt 0x0, driver bt 0x0, host bt 0x8).
target8:0:3: Domain Validation skipping write tests
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st0: Error 80000 (sugg. bt 0x0, driver bt 0x0, host bt 0x8).
target8:0:3: Domain Validation skipping write tests
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st0: Error 80000 (sugg. bt 0x0, driver bt 0x0, host bt 0x8).
target8:0:3: Domain Validation skipping write tests
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st 8:0:3:0: CDB: Write(6): 0a 00 00 28 00 00
st0: Error 80000 (sugg. bt 0x0, driver bt 0x0, host bt 0x8).
target8:0:3: Domain Validation skipping write tests

#lsmod
Module Size Used by
af_packet 29064 2
iptable_filter 6912 0
ip_tables 16324 1 iptable_filter
ip6_tables 17476 0
x_tables 18308 2 ip_tables,ip6_tables
microcode 15372 0
firmware_class 13568 1 microcode
apparmor 40736 0
loop 21636 0
osst 54172 0
st 40092 0
tg3 104068 0
container 9088 0
button 12560 0
rtc_cmos 12064 0
rtc_core 23048 1 rtc_cmos
shpchp 35092 0
rtc_lib 7040 1 rtc_core
e1000 167616 0
sr_mod 19492 0
pci_hotplug 33216 1 shpchp
cdrom 37020 1 sr_mod
sg 37036 0
usbhid 41300 0
hid 29184 1 usbhid
ff_memless 9352 1 usbhid
dm_mirror 19456 1
dm_log 13312 2 dm_mirror
uhci_hcd 27024 0
ehci_hcd 35340 0
sd_mod 31104 2
usbcore 124268 4 usbhid,uhci_hcd,ehci_hcd
dm_snapshot 20900 0
dm_mod 56880 18 dm_mirror,dm_log,dm_snapshot
edd 12996 0
ext3 131848 4
mbcache 12292 1 ext3
jbd 68148 1 ext3
fan 9220 0
mptspi 21512 0
mptscsih 24704 1 mptspi
mptbase 55888 2 mptspi,mptscsih
scsi_transport_spi 27008 1 mptspi
ata_piix 21380 0
ahci 28548 2
libata 139216 2 ata_piix,ahci
scsi_mod 140376 9 osst,st,sr_mod,sg,sd_mod,mptspi,mptscsih,scsi_transport_spi,libata
thermal 20872 0
processor 40876 1 thermal

#cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: GB0500C4413 Rev: n/a
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: GB0500C4413 Rev: n/a
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi6 Channel: 00 Id: 00 Lun: 00
Vendor: HL-DT-ST Model: CD-ROM GCR-8486B Rev: 2.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi8 Channel: 00 Id: 03 Lun: 00
Vendor: HP Model: DAT160 Rev: WP82
Type: Sequential-Access ANSI SCSI revision: 03

# mt -f /dev/nst0 status
drive type = Generic SCSI-2 tape
drive status = 1207959552
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 0 bytes. Density code 0x48 (unknown).
Soft error count since last status=0
General status bits on (41010000):
BOT ONLINE IM_REP_EN

Any help appreciated.
2 REPLIES
SCL_2
Occasional Visitor

Re: tar: /dev/nst0: Cannot write: Input/output error on Linux

Hi all,

Just wanted to give an update to this that it was an issue with the tape drive being faulty. Even though I had the tape drive replaced (a couple of times), the final replacement of the drive seemed to fix the issue!! :-)
SCL_2
Occasional Visitor

Re: tar: /dev/nst0: Cannot write: Input/output error on Linux

faulty tape issue.