Subject: bin/9840: Unexpected mt behavior
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sbnoble@dei.dyn.dhs.org>
List: netbsd-bugs
Date: 04/08/2000 10:47:06
>Number:         9840
>Category:       bin
>Synopsis:       mt erase defaults to full zeroing of tape
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 08 10:20:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Seth Bradley Noble
>Release:        1.4.1
>Organization:
>Environment:
System: NetBSD dei 1.4.1 NetBSD 1.4.1 (DEI) #0: Fri Feb 11 13:41:57 CST 2000 sbnoble@dei:/usr/src/sys/arch/sparc/compile/DEI sparc


>Description:

The "mt" command when not provided with a count argument defaults to a
count of 1 [mt.c line 157].  For the "erase" command, this translates
into a "full" erase [st.c/st_erase line 1812].

The "mt" man page incorrectly states that count is ignored for "erase".

>How-To-Repeat:

Insert a tape into a scsi tape drive.  Type

	mt erase

wonder why your drive is whirring and unresponsive for several hours
(or until you get sick of it, power cycle the drive, and reboot the
machine).

>Fix:

To perform a brief erase, a count of 0 must be explicitly given:
	mt erase 0

A full tape erasure on a modern tape drive could take several hours
during which time the drive will be unresponsive.  Since this
behavior is not documented in the manual page, it is not clear what
the drive is doing.  The only way to stop it is to power cycle
the drive.  Since the driver still thinks the drive is busy, it
is then necessary to reboot the system.

Since a full erase will rarely be desired, it should not be the
default behavior.  "mt" should set a default count of 0 for "erase"
and the manual page should document the behavior.


>Release-Note:
>Audit-Trail:
>Unformatted: