#505904 /bin/mt-gnu: 'mt -f /dev/nts0 status' hangs if the drive is empty

Package:
cpio
Source:
cpio
Description:
GNU cpio -- a program to manage archives of files
Submitter:
Glenn English
Date:
2025-08-28 13:15:02 UTC
Severity:
normal
#505904#5
Date:
2008-11-16 18:14:26 UTC
From:
To:
I use this command in my backup cron job to determine whether to back up to tape or disk.
My script doesn't work anymore (sometimes)...

#505904#10
Date:
2008-11-17 14:50:29 UTC
From:
To:
Does the mt-st package do what you want?
#505904#13
Date:
2009-02-24 19:56:12 UTC
From:
To:
Please confirm that this bug still applies to cpio 2.9.90-2.
#505904#18
Date:
2025-08-10 10:34:43 UTC
From:
To:
Control: found -1 2.13+dfsg-7.1
Control: found -1 2.15+dfsg-2

# time mt-gnu -f /dev/nst0 status
mt-gnu: /dev/nst0: rmtopen failed: No medium found

real	2m2.881s
user	0m0.004s
sys	0m0.000s


compare to mt-st:

# time mt-st -f /dev/nst0 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

real	0m0.002s
user	0m0.001s
sys	0m0.000s