Amanda-Users

RE: problem labelling tapes

2003-10-24 02:04:52
Subject: RE: problem labelling tapes
From: "Dana Bourgeois" <em-lists AT netgods DOT us>
To: <gene.heskett AT verizon DOT net>, "'Tony'" <td_miles AT yahoo DOT com>, <amanda-users AT amanda DOT org>
Date: Thu, 23 Oct 2003 22:59:03 -0700
Or you could check for a DIP switch and force compression off.  My Sony DDS4
drive can start with compression either on or off and can either be switched
under software control or locked in one mode.  I locked compression off so I
don't have this hassle.


Dana Bourgeois


> -----Original Message-----
> From: owner-amanda-users AT amanda DOT org 
> [mailto:owner-amanda-users AT amanda DOT org] On Behalf Of Gene Heskett
> Sent: Thursday, October 23, 2003 3:00 PM
> To: Tony; amanda-users AT amanda DOT org
> Subject: Re: problem labelling tapes
> 
> 
> On Thursday 23 October 2003 05:48, Tony wrote:
> >Hi all,
> >
> >I am still having trouble trying to label tapes and Amanda 
> recognising 
> >them.
> >
> >I label a tape:
> >
> >bash-2.05a$ /usr/sbin/amlabel daily daily01fri
> >rewinding, reading labelamlabel: strange amanda header: "AMANDA: T"
> >, not an amanda tape
> >rewinding, writing label daily01fri, checking label, done.
> >
> >I then check the tape:
> >
> >bash-2.05a$ dd bs=32k if=/dev/st0
> >AMANDA: TAPESTART DATE X TAPE daily01fri
> >
> >1+0 records in
> >1+0 records out
> >
> >So I then run amcheck:
> >
> >bash-2.05a$ /usr/sbin/amcheck daily
> >Amanda Tape Server Host Check
> >-----------------------------
> >Holding disk /tmp: 521540 KB disk space available, that's plenty
> >amcheck-server: strange amanda header: "AMANDA: T"
> >ERROR: /dev/nst0: not an amanda tape
> >       (expecting tape daily01tue or a new tape)
> >
> >
> >If I continually run amcheck, about maybe 5% of the time I 
> will get the 
> >response "Tape daily01fri label ok", to indicate that it was 
> actually 
> >able to read the label on the tape. This is VERY strange !
> >
> >I have downloaded and installed 2.4.4p1 and it is a RH7.3 machine.
> >
> >As an aside, I did manage to work out the stinit stuff and 
> the drive is 
> >no longer using hardware compression. I did another tapetype and got 
> >the following:
> >
> >define tapetype dds4 {
> >  comment "produced by tapetype prog (HW compresssion off)"
> >  length 19503 mbytes
> >  filemark 0 kbytes
> >  speed 2693 kps
> >}
> >
> >which is a lot more like what it should be.
> >
> >
> >Any suggestions on why it is not recognising the label ?
> >
> The only idea I keep coming up with is that for DDS tapes, the status 
> of the tapes compression is recorded in a hidden header on the tape.  
> Simply turning off the compression and relabeling the tape will turn 
> it back in in the initial label read, so you wind up with the 
> compression on regardless.  The workaround I've used is to read out 
> the label with dd and save it to a scratch file.  Rewind the tape and 
> issue the compression off commands, then dd the label file back to 
> the tape useing the non-rewinding device.  This will not normally 
> move the tape, or flush the buffers as its not a big enough write, 
> and you'll only succeed if you force the drive to flush its buffers 
> which will then record the compression off state in the header.  So 
> one must, in addition to dd'ing the label back, follow that up with 
> another dd from /dev/zero thats big enough to force the buffer flush, 
> use at least a meg of /dev/zero more than the drives rated buffer 
> size.
> 
> I have a script around here someplace, and which has also been posted 
> to this list on 2-3 occasions, that does all this in one swell foop 
> per tape MOST of the time.
> 
> >Thanks,
> >Tony.
> >
> >
> >____________________________________________________________________
> >____ Want to chat instantly with your online friends?  Get the FREE  
> >Yahoo! Messenger http://mail.messenger.yahoo.co.uk
> 
> -- 
> Cheers, Gene
> AMD K6-III@500mhz 320M
> Athlon1600XP@1400mhz  512M
> 99.27% setiathome rank, not too shabby for a WV hillbilly 
> Yahoo.com attornies please note, additions to this message by 
> Gene Heskett are: Copyright 2003 by Maurice Eugene Heskett, 
> all rights reserved.
> 
>