Amanda-Users

mount sessions, rewinding tape device and amverify lossage

2003-04-28 16:47:06
Subject: mount sessions, rewinding tape device and amverify lossage
From: Greg Troxel <gdt AT ir.bbn DOT com>
To: amanda-users AT amanda DOT org
Date: 28 Apr 2003 16:43:49 -0400
I run amanda on NetBSD with a SCSI tape drive.

NetBSD has the concept of a mount session, where a session is begun on
access to the drive, and ends when the tape is put offline or the
rewinding tape drive is closed, but not on an explicit 'mt rewind'.
If one uses the front-panel eject button, the media is ejected without
closing the mount session.  This might happen after someone notices
amcheck output that a new tape is needed.  The next access to the tape
drive will fail due to 'medium changed', since the mount session is
still active.  In this case, it might be amdump.

There are several solutions (not all tested):

  1) "Don't do that - use mt offline"
  2) Explicit 'mt offline' in cron after amdump
  3) Explicit 'mt rewind' on the _rewinding_ device to close the session
  4) put /dev/rst0 (not /dev/nrst0) as the tapedev in amanda.conf

Since I wanted the tape rewound after the dump when I wasn't waiting
for it, so amcheck/offline would be faster in the morning, I chose
option 4.  Dumps worked fine.

I ran amverify, and it was seeming to take forever.  I killed it, and
it turns out that it checked the first dump on the tape about 4000
times.  The problem was that amverify called 'amrestore -p' to get the
'next' dump, and since the rewinding tape drive  was used, it was
always the first one.

I may well have missed a FAQ etc., but the example amanda.conf (2.4.4)
does not clearly explain that amanda will break if one uses the
rewinding tape drive.  Given that rewinding or putting the tape
offline is a reasonable thing to want to do after dumps, it might be
nice to have a 'rewind' statement be allowed in amanda.conf.  Really,
it would be good for amanda to be able to end the mount session, but
that seems hard to do portably.

        Greg Troxel <gdt AT ir.bbn DOT com>

<Prev in Thread] Current Thread [Next in Thread>