On Sunday 13 January 2002 05:28 pm, Gene Heskett wrote:
Yeah, he wrote all that, sorta like I can't believe I ate the
whole thing!
So lemme snip hugely:
>The odd thing, and maybe I'm getting macular degeneration or
>something, but I cannot find anyplace in the tapeio.c file where
>it actually issues a 'rewind', all these errors would appear to
>be coming from bogus slot numbers and such. And this has been
>holding me online for several hours now so I'm gonna hit send
> and go away.
And I still don't have a mental image of the connection between
this code, and actually telling the flippin drive to DO a %$#@
rewind!
However, this is what works here, 100%, like this:
[amanda@gene amanda-2.4.3b2-20020111]$ dd if=/dev/nst0 bs=32k
count=1 && amtape DailySet1 show && amcheck DailySet1
AMANDA: TAPESTART DATE 20011221 TAPE DailySet1-01
1+0 records in
1+0 records out
amtape: scanning all 3 slots in tape-changer rack:
slot 0: date 20011221 label DailySet1-01
slot 1: date 20011222 label DailySet1-02
slot 2: date 20011222 label DailySet1-03
Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps: 30895900 KB disk space available, using
28798748 KB
amcheck-server: slot 2: date 20011222 label DailySet1-03 (active
tape)
amcheck-server: slot 0: date 20011221 label DailySet1-01 (exact
label match)
NOTE: skipping tape-writable test
Tape DailySet1-01 label ok
Server check took 177.929 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.144 seconds, 0 problems found
(brought to you by Amanda 2.4.3b2-20020111)
You have new mail in /var/spool/mail/root
[amanda@gene amanda-2.4.3b2-20020111]$ mt -f /dev/nst0 tell
At block 0.
[amanda@gene amanda-2.4.3b2-20020111]$ amcheck DailySet1
Amanda Tape Server Host Check
-----------------------------
Holding disk /dumps: 30895800 KB disk space available, using
28798648 KB
amcheck-server: slot 0: date 20011221 label DailySet1-01 (exact
label match)
NOTE: skipping tape-writable test
Tape DailySet1-01 label ok
Server check took 34.872 seconds
Amanda Backup Client Hosts Check
--------------------------------
Client check: 1 host checked in 0.133 seconds, 0 problems found
(brought to you by Amanda 2.4.3b2-20020111)
[amanda@gene amanda-2.4.3b2-20020111]$
And I have uparrowed the prompt and repeated that 4 times.
And here is the modified tape_rdlabel() routine in tapeio.c:
char *
tape_rdlabel(devname, datestamp, label)
char *devname;
char **datestamp;
char **label;
{
int fd;
char *r = NULL;
if((fd = tape_open(devname, O_RDONLY)) < 0) {
r = errstr = newvstralloc(errstr,
"tape_rdlabel: tape open: ",
devname,
": ",
strerror(errno),
NULL);
} else if(fd >= 0)
tapefd_rewind(fd); /* a dummy rewind to make sure it is,
by G.eneHeskett. Doesn't always work. . . ): */
if(tapefd_rdlabel(fd, datestamp, label) != NULL) {
r = errstr;
}
if(fd >= 0) {
tapefd_rewind(fd); /* but this one does! */
tapefd_close(fd);
}
return r;
}
I'm sure I'll find out when amdump runs at 1am, if this is
actually workable. If it does, you _will_ hear me cheering from
there, wherever "there" is, at whatever local time I check. I'm
gmt -5:00 here in WV. :-)
--
Cheers, gene