Bug 189618

Summary: st0 device busy when using block size > 384k
Product: [Fedora] Fedora Reporter: Norco IS <sysadmin>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: pfrields, todd, vikas.j.chaudhary
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.6.17-1.2142_FC4smp Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-21 16:04:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
strace output
none
strace -f output none

Description Norco IS 2006-04-21 18:15:32 UTC
Description of problem:

When trying to access tape device (/dev/st0) get an error that indicates that
device is busy.


Version-Release number of selected component (if applicable):
star rpm: star-1.5a54-2
kernel: kernel-smp-2.6.16-1.2096_FC4

How reproducible:

Always

Steps to Reproduce:
1. star -tv -bs=512k -fs=32m -file=/dev/st0

(write to the tape with star produces the same result)
  
Actual results:
star: Device or resource busy. Error reading '/dev/st0'.
star: 0 blocks + 0 bytes (total of 0 bytes = 0.00k).

`echo $?`
gives: 16

Expected results:

Listing of tape contents

Additional info:

Does not seem to be a problem with the device as using:
tar tvf /dev/st0
and
tar cvf /dev/st0 ......
works fine.

Workaround - revert back to old kernel. Using kernel 2.6.15-1.1833_FC4smp works
fine.

Comment 1 Peter Vrabec 2006-04-24 08:41:12 UTC
Could you send strace output, please? Thx. 

Comment 2 Norco IS 2006-04-24 22:24:04 UTC
Created attachment 128168 [details]
strace output

Comment 3 Peter Vrabec 2006-04-25 12:57:06 UTC
use strace -f please  

Comment 4 Norco IS 2006-04-25 15:44:22 UTC
Created attachment 128207 [details]
strace -f output

Comment 5 Peter Vrabec 2006-04-26 09:50:02 UTC
does   
$dd if=/dev/zero of=/tmp/foo bs=512k count=1  
works for you?  
  
Could you try the latest star from devel?  

Comment 6 Peter Vrabec 2006-04-26 10:44:47 UTC
ooops,   
change command dd in comment #5 to 
$dd if=/dev/zero of=/dev/st0 bs=512k count=1  

Comment 7 Norco IS 2006-04-26 15:51:45 UTC
The dd command didn't work. Gave:
dd: writing '/dev/st0': Device or resource busy

I tried different 'bs=' values. Found that the dd command works when bs=384k but
not when it is bs=385k.
Perhaps this is not a star problem at all! Could it be a kernel or st module
problem?
I could try the latest devel star if you still think that it would be useful. 

Comment 8 Peter Vrabec 2006-04-26 18:02:27 UTC
Yes, it could be a kernel problem. I think it's not necessary to try another 
star. 

Comment 9 Norco IS 2006-07-21 16:04:19 UTC
This seems to have been resolved with installation of kernel 2.6.17-1.2142_FC4smp

Comment 10 Todd Zervas 2015-05-27 15:33:18 UTC
This problem has re-appeared(?) in RHEL 6.6    2.6.32-504.16.2.el6.x86_64

# mt -f /dev/nst0 rewind
# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x46 (LTO-4).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
# dd if=/dev/zero of=/dev/st0 bs=512k count=1
dd: writing `/dev/st0': Device or resource busy
1+0 records in
0+0 records out
0 bytes (0 B) copied, 4.18458 s, 0.0 kB/s

Comment 11 Vikas Chaudhary 2018-11-18 07:19:34 UTC
I am seeing the same issue 'CentOS release 6.5 (Final)'


# dd if=/dev/zero of=/dev/nst55 bs=512k count=1
dd: writing `/dev/nst55': Device or resource busy
1+0 records in
0+0 records out
0 bytes (0 B) copied, 0.024866 s, 0.0 kB/s

# uname -a
Linux system1 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Is there any workaround solution exist for this issue?

Comment 12 Todd Zervas 2018-11-19 15:37:57 UTC
Fixed in RHEL 7.6 (Maipo):

[root@ds-excelsior-04 ~]# mt -f /dev/nst0 load
[root@ds-excelsior-04 ~]# mt -f /dev/nst0 rewind
[root@ds-excelsior-04 ~]# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x46 (LTO-4).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN
[root@ds-excelsior-04 ~]# dd if=/dev/zero of=/dev/st0 bs=512k count=1
1+0 records in
1+0 records out
524288 bytes (524 kB) copied, 5.85549 s, 89.5 kB/s

Comment 13 Vikas Chaudhary 2018-11-19 17:02:55 UTC
Hi Todd,

Is it possible to point which patch fixed this issue on latest release?

Thanks,
Vikas.