Bug 170499 - mt exitcodes wrong with ide tapedrive
Summary: mt exitcodes wrong with ide tapedrive
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mt-st
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-12 13:25 UTC by koen05
Modified: 2013-07-02 23:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-31 11:11:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description koen05 2005-10-12 13:25:25 UTC
Description of problem:
mt always gives exitcode 0 

tapedrive is a Sony SDX-420C (ide) on /dev/hdd
drive is detected at boot, but /dev/hdd isn't created
modprobe ide-scsi detects drive as /dev/st0
  


Version-Release number of selected component (if applicable):
mt-st v. 0.8 and mt-st v. 0.9b

How reproducible:
Always


Steps to Reproduce:
1. read drivestatus
2. eject tape
3. read status, rewind, read exitcode, eject tape, read exitcode
    
Actual results:

Tape in drive:

[root@srv0000 ~]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x30 (AIT-1 or MLR3).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN


Eject tape:
[root@srv0000 ~]# mt -f /dev/st0 offline
[root@srv0000 ~]# echo $?
0

[root@srv0000 ~]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x30 (AIT-1 or MLR3).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

-> Tape is ejected, mt says "Online"

Try to rewind tape:
[root@srv0000 ~]# mt -f /dev/st0 rewind
[root@srv0000 ~]# echo $?
0

-> exitcode 0 

[root@srv0000 ~]# mt -f /dev/st0 offline
[root@srv0000 ~]# echo $?
0

-> again, exitcode 0

Expected results:

Redhat 9:
Read status:
[root@georgia root]# mt -f /dev/st0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x30 (AIT-1 or MLR3).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

Eject tape:
[root@georgia root]# mt -f /dev/st0 offline

[root@georgia root]# mt -f /dev/st0 status
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


-> status says "Door open"

[root@georgia root]# mt -f /dev/st0 rewind
/dev/st0: No medium found
mt: The device is offline (not powered on, no tape ?).
[root@georgia root]# echo $?
2

-> mt says tape cant be rewound, exitcode 2

ps
I have tried an Onstream drive as wel, same results.

/dev/st0 is created and removed with modprobe / rmmod ide-scsi

nb, tar -b64 -cvf /dev/st0 ~ does make a valid backup on the the tape.
It wil however also run without complaining if there's no tape in the drive.
 


Additional info:

Comment 1 koen05 2005-10-17 12:44:32 UTC
- FC4 lives on a SATA raid 1
- Tapestreamer is connected to the IDE port
- When connected to USB (via an IDEtoUSB-converter), mt wil give the correct
status (mt -f /dev/st0 status), but fails to detect that there is no tape in the
drive when doing a mt -f /dev/st0 rewind.


Comment 2 Jindrich Novy 2005-10-19 08:13:01 UTC
Do you see this behavior also with the rawhide mt-st installed?
(latest devel mt-st-0.9b is now built in devel)

I'll release FC updates if it solves the problem for you.

Comment 3 koen05 2005-10-19 10:39:54 UTC
I've compiled mt-st-0.9b from source, same results as FC4's mt-st-0.8
I suspect (after googl'ing for some time) it has got to do with the Intel
ICH6R/ICH6RW Sata controler being in dual mode (IDE for the dvdrom and
tapestreamer and SATA for the disks).

Perhaps i'll try to find a SATA to IDE converter later this week so i can attach
the tapestreamer to an Sata channel.







Comment 4 koen05 2005-10-21 14:51:45 UTC
I've just upgraded the box to kernel-2.6.13-1.1532_FC4.i686

mt exitcodes seem to be fixed!

mt -f /dev/st0 rewind does however take a very long time to discover that there's   
no tape in the drive.
Will do further tests on monday.

 

Comment 5 Jindrich Novy 2005-10-26 12:50:41 UTC
Ok, FC4 update is comming soon.

Comment 6 Fedora Update System 2005-10-26 17:20:59 UTC
From User-Agent: XML-RPC

mt-st-0.9b-1.fc4 has been pushed for FC4, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.