Subject: Re: st0 and "Medium May Have Changed"
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-help
Date: 07/23/2003 09:55:41
You didn't say how you were changing the tape, but I bet you used the
eject button.  If you use 'mt offline' you won't have a problem.

The issue here is the concept of "mount session".  When a tape is
opened, a mount session is begun.  This is ended by doing offline, but
not rewind.  When the tape is unloaded by the front panel button, and
a mount session is still in progress, an error is generated so that a
group of processes using the mount session won't write in the wrong
place.

Some programs, like amanda, view this whole mount session concept as
unreliable (not necessarily in NetBSD - in general), and have a single
process open the tape once, write the whole backup stream, and close
it.
You are relying on subsequent invocations of "dump" to write
sequential files; this means the tape can't be rewound in the middle -
or changed.  If there is an operator-caused change, or a scsibus
reset, the wrong thing happens.  This is the issue that mount sessions
are trying to prevent.

My solution: use mt offline.


-- 
        Greg Troxel <gdt@ir.bbn.com>