Professional Web Applications Themes

Closing /dev/st0 return EIO error, /dev/nst0 not - Linux Setup, Configuration & Administration

Hello, I have a old tape streamer Exabyte EXB-8200. Backup and restore work fine. However, when I use the device file /dev/st0 (rewind on close),i get the error EIO on close() and the streamer doesn't rewind the tape : $ dd if=/dev/zero of=/dev/nst0 bs=4096 count=1 works fine, no error $ strace dd if=/dev/zero of=/dev/st0 bs=4096 count=1 dd write the block, and failed when it close /dev/st0 : .... close(0) = 0 open("/dev/zero", O_RDONLY|O_LARGEFILE) = 0 close(1) = 0 open("/dev/st0", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 1 rt_sigaction(SIGINT, NULL, {SIG_DFL}, 8) = 0 rt_sigaction(SIGINT, {0x80493b0, [], SA_RESTORER, 0x40048988}, NULL, 8) = 0 rt_sigaction(SIGQUIT, NULL, ...

  1. #1

    Default Closing /dev/st0 return EIO error, /dev/nst0 not

    Hello,

    I have a old tape streamer Exabyte EXB-8200.
    Backup and restore work fine. However, when I use the device file
    /dev/st0 (rewind on close),i get the error EIO on close() and the
    streamer doesn't rewind the tape :

    $ dd if=/dev/zero of=/dev/nst0 bs=4096 count=1
    works fine, no error

    $ strace dd if=/dev/zero of=/dev/st0 bs=4096 count=1
    dd write the block, and failed when it close /dev/st0 :
    ....
    close(0) = 0
    open("/dev/zero", O_RDONLY|O_LARGEFILE) = 0
    close(1) = 0
    open("/dev/st0", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 1
    rt_sigaction(SIGINT, NULL, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGINT, {0x80493b0, [], SA_RESTORER, 0x40048988}, NULL, 8) = 0
    rt_sigaction(SIGQUIT, NULL, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGQUIT, {0x80493b0, [], SA_RESTORER, 0x40048988}, NULL, 8) = 0
    rt_sigaction(SIGPIPE, NULL, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGPIPE, {0x80493b0, [], SA_RESTORER, 0x40048988}, NULL, 8) = 0
    rt_sigaction(SIGUSR1, NULL, {SIG_DFL}, 8) = 0
    rt_sigaction(SIGUSR1, {0x8049410, [], SA_RESTORER, 0x40048988}, NULL, 8) = 0
    brk(0) = 0x8051000
    brk(0x8053000) = 0x8053000
    read(0, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0"...,
    4096) = 4096
    write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0"...,
    4096) = 4096
    write(2, "1+0 records in\n", 151+0 records in
    ) = 15
    write(2, "1+0 records out\n", 161+0 records out
    ) = 16
    close(0) = 0
    close(1) = -1 EIO (Input/output error)
    write(2, "dd: ", 4dd: ) = 4
    write(2, "closing output file `/dev/st0\'", 30closing output file
    `/dev/st0') = 30
    write(2, ": Input/output error", 20: Input/output error) = 20


    There is no errors from kernel.

    To rewind the tape I must use "mt -f /dev/nst0 rewind".
    "mt -f /dev/st0 status" also works fine, the streamer rewinds the tape.

    $ uname -a
    Linux darkstar 2.4.22 #4 Thu Oct 30 22:11:45 CET 2003 i686 unknown
    unknown GNU/Linux
    $ cat /proc/scsi
    cat: /proc/scsi: Is a directory
    $ cat /proc/scsi/scsi
    Attached devices:
    Host: scsi0 Channel: 00 Id: 04 Lun: 00
    Vendor: EXABYTE Model: EXB-8200 Rev: 2618
    Type: Sequential-Access ANSI SCSI revision: 01
    $ cat /proc/scsi/tmscsim/0
    Tekram DC390/AM53C974 PCI SCSI Host Adapter, Driver Version 2.0f 2000-12-20
    SCSI Host Nr 0, DC390 Adapter Nr 0
    IOPortBase 0xe000, IRQ 10
    MaxID 7, MaxLUN 1, AdapterID 7, SelTimeout 250 ms, DelayReset 1 s
    TagMaxNum 32, Status 0x00, ACBFlag 0x00, GlitchEater 24 ns
    Statistics: Cmnds 4695, Cmnds not sent directly 0, Out of SRB conds 0
    Lost arbitrations 0, Sel. connected 0, Connected: No
    Nr of attached devices: 1, Nr of DCBs: 1
    Map of attached LUNs: 00 00 00 00 01 00 00 00
    Idx ID LUN Prty Sync DsCn SndS TagQ NegoPeriod SyncSpeed SyncOffs MaxCmd
    00 04 00 Yes No Yes No No (100 ns) 01
    Commands in Queues: Query: 0:

    Any ideas ?

    Gilles Guest

  2. #2

    Default Re: Closing /dev/st0 return EIO error, /dev/nst0 not

    I have compiled the tape driver (st.c) with DEBUG=1. I get the following
    trace :

    Nov 8 17:26:41 darkstar kernel: st: segment sizes: first 32768, last
    32768 bytes.
    Nov 8 17:27:48 darkstar kernel: st0: Error: 28000002, cmd: 0 0 0 0 0 0
    Len: 0
    Nov 8 17:27:48 darkstar kernel: st0: Mode sense. Length 16, medium 81,
    WBS 10, BLL 8
    Nov 8 17:27:48 darkstar kernel: st0: Density 0, tape length: 46720, drv
    buffer: 1
    Nov 8 17:27:48 darkstar kernel: st0: Block size: 0, buffer size: 32768
    (1 blocks).
    Nov 8 17:27:48 darkstar kernel: st0: File length 4096 bytes.
    Nov 8 17:27:48 darkstar kernel: st0: Async write waits 1, finished 0.
    Nov 8 17:28:31 darkstar kernel: st0: Buffer flushed, 1 EOF(s) written
    Nov 8 17:28:31 darkstar kernel: st0: Rewinding tape.
    Nov 8 17:28:31 darkstar kernel: st0: Error: 27070008, cmd: 1 0 0 0 0 0
    Len: 0



    Gilles Hamel wrote: 

    Gilles Guest

  3. #3

    Default Re: Closing /dev/st0 return EIO error, /dev/nst0 not

    "Gilles Hamel" <fr> wrote in message
    news:3fad1a95$0$6980$club-internet.fr... 

    Ah, memories from the past... I think your problem may be that the drive
    reports 'BUSY' when receiving the rewind, while it's flushing data from it's
    memory buffer to tape. Most programs wait a short while and retry the
    command upon busy status. Others like dd do not retry and fail.

    There's a DIP switch on the MX boards, the second logic board from the back
    of the drive. One of the switches is the 'No Busy Enable' switch, which
    changes the behaviour of the drive to disconnect and wait for the flush to
    complete. I don't remember which one it was (hey, last one I touched was
    years ago), but you may want to browse the manuals which you can still
    download from our website:
    http://www.exabyte.com/support/online/doentation/tp_manuals.cfm?prod_id=104

    Rob


    Rob Guest

  4. #4

    Default Re: Closing /dev/st0 return EIO error, /dev/nst0 not

    GREAT, Problem solved !

    Thank you very much.


    "Rob Turk" <nl> wrote in message news:<3fad6964$0$18487$news.xs4all.nl>... 
    >
    > Ah, memories from the past... I think your problem may be that the drive
    > reports 'BUSY' when receiving the rewind, while it's flushing data from it's
    > memory buffer to tape. Most programs wait a short while and retry the
    > command upon busy status. Others like dd do not retry and fail.
    >
    > There's a DIP switch on the MX boards, the second logic board from the back
    > of the drive. One of the switches is the 'No Busy Enable' switch, which
    > changes the behaviour of the drive to disconnect and wait for the flush to
    > complete. I don't remember which one it was (hey, last one I touched was
    > years ago), but you may want to browse the manuals which you can still
    > download from our website:
    > http://www.exabyte.com/support/online/doentation/tp_manuals.cfm?prod_id=104
    >
    > Rob[/ref]
    Gilles Guest

Similar Threads

  1. While Closing the Timestamp doc Acrobat9.0 throws error
    By Gnanaprakash@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: January 26th, 01:05 PM
  2. Getting an error when return an XmlElement
    By Maersa in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 11th, 08:58 PM
  3. CLOSING MIAW IML32.DLL ERROR
    By VirginiaM webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 1
    Last Post: September 25th, 11:08 AM
  4. Movie Closing?? & Windows Closing??
    By JPrice in forum Macromedia Director Lingo
    Replies: 0
    Last Post: July 29th, 01:17 AM
  5. How do I return to the top of a file without closing and reopening?
    By Joseph Ellis in forum PERL Miscellaneous
    Replies: 1
    Last Post: July 25th, 05:44 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139