Bug 170499 - mt exitcodes wrong with ide tapedrive
mt exitcodes wrong with ide tapedrive
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mt-st (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-12 09:25 EDT by koen05
Modified: 2013-07-02 19:09 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-31 06:11:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description koen05 2005-10-12 09:25:25 EDT
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 08:44:32 EDT
- 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 04:13:01 EDT
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 06:39:54 EDT
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 10:51:45 EDT
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 08:50:41 EDT
Ok, FC4 update is comming soon.
Comment 6 Fedora Update System 2005-10-26 13:20:59 EDT
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.