[unix-pc.bugs] fixdisk 2.0: Tbackup.sh bug

bgbg@cbnewsd.ATT.COM (brian.g.beuning) (02/06/90)

In general fixdisk 2.0 has been working wonderfully,
however ...

Fixdisk 2.0 includes a fix to the tape backup script.
This fix (something about making sure the tape door
is not locked when the tape is done) does not appear
to work properly when making a multiple backup-set tape.

I was using "backup by name" to archive stuff I don't
use very often.  After I wrote about 2 meg of stuff to
the tape (that should hold 20 meg), the "Show tape contents"
said the tape was full!  It turns out, that the fixdisk
change made to Tbackup.sh causes the "backup by name"
to be recorded as a "broken" type backup (i.e., the last
tape of a multi-tape backup set) and nothing can be written
to a tape after a "broken" backup set.

I did not figure out how to fix the problem, I just went
back to the old Tbackup.sh (at least until I encounter the
problem the fixdisk intended to fix).

		Brian Beuning
		att!iexist!bgb

eed_wwhh@jhunix.HCF.JHU.EDU (William H Huggins) (02/08/90)

In article <13050@cbnewsd.ATT.COM> bgbg@cbnewsd.ATT.COM (brian.g.beuning) writes:
>In general fixdisk 2.0 has been working wonderfully,
>however ... change made to Tbackup.sh is (broken)...
>
After installing FIXDISK2,  I also tried to backup my file system 
onto floppy tape and found that the Tape  fix which replaces  
/usr/bin/Tbackup.sh  is itself broken.  

The OLD Tbackup.sh  has always worked perfectly for me using the
"UNIX PC -- Multiple Backup-Sets" option, which makes it possible 
to write successive partial backups on the same tape
cartridge.  The new version installed by  FIXDISK2  does not
allow Multiple Backup-Sets.  After writing any files, regardless
of how few, the tape is said to be 'Broken' and 100% full 
so that more than a single backup-set cannot be written.
Furthermore, the script warns the user that 'More than 1
tape may be needed', even when that is clearly not the case.

It is a simple matter after  FIXDISK2  is installed to
    # mv /usr/bin/Tbackup.sh.OLD /usr/bin/Tbackup.sh 
to restore the OLD version  which in my experience had
functioned without any difficulty and should continue to 
serve my needs.

The diff between the OLD and FIXDISK2  versions of  Tbackup.sh
reveals that these undesirable effects were apparently intended,
for reasons I don't understand:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
13a14,22
> #    DLM -- Modified 11/7/89 to fix the problem of tapes not
> #        being released and verify pass not working correctly
> #        which was caused by calculating NTAPES incorrectly.
> #        The drive was locked if only 1 tape needed when really
> #        it took 2 tapes.  Changed to add 1 to NTAPES and also
> #        to set FMORE=1 to always suppose more than 1 tape.
> #        Also, changed wording of some messages to avoid
> #        confusion.
> #
463c472,478
< FMORE=`expr $NTAPES \> 1`
---
> ##  DLM -- Comment following and set FMORE always - need to change
> ##    some messages also
> 
> #  FMORE=`expr $NTAPES \> 1`
> 
> FMORE=1
> NTAPES=`expr $NTAPES + 1`
466a482,484
> 
> #  Changed message to say 'may' require
> 
468c486
< This backup will require $NTAPES formatted tapes to complete.  \
---
> This backup may require $NTAPES formatted tapes to complete.  \
604a623,625
> 
> ##  DLM -- Change message below to add (if not already in drive)
> 
606,607c627,628
< Please reinsert the first tape.  Allow it to rewind before \
< continuing with the verify pass."
---
> Please reinsert the first tape (if not already in drive).  Allow it to \
> rewind before continuing with the verify pass."
620c641,644
< 	dbuf -iT124O$OFFSET"S"$NBLOCKS $TAPEDEVNAME > /dev/null
---
> ##  DLM -- Add tapecpio to check if data recorded in readable format
> 
> 	dbuf -iT124O$OFFSET"S"$NBLOCKS $TAPEDEVNAME |
> 		tapecpio -ictT124 > /dev/null 2>&1
701a726,729
> 
> #	DLM added the Tgetname -l to release the tape at the end
> 
> $SHROOT/Tgetname -l
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

vern@zebra.UUCP (Vernon C. Hoxie) (02/09/90)

In article <4158@jhunix.HCF.JHU.EDU> eed_wwhh@jhunix.UUCP (William H Huggins) writes:
>In article <13050@cbnewsd.ATT.COM> bgbg@cbnewsd.ATT.COM (brian.g.beuning) writes:
>>In general fixdisk 2.0 has been working wonderfully,
>>however ... change made to Tbackup.sh is (broken)...
>>
>After installing FIXDISK2,  I also tried to backup my file system 
>onto floppy tape and found that the Tape  fix which replaces  
>/usr/bin/Tbackup.sh  is itself broken.  
>


>> #        it took 2 tapes.  Changed to add 1 to NTAPES and also
>> #        to set FMORE=1 to always suppose more than 1 tape.
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	This was a very dumb assumption!!!!!!!

	The following may be a valid enhancement to the script as it
actually reads the tape during the verify pass rather than just passing
over looking for lack of signal.

>> ##  DLM -- Add tapecpio to check if data recorded in readable format
>> 
>> 	dbuf -iT124O$OFFSET"S"$NBLOCKS $TAPEDEVNAME |
>> 		tapecpio -ictT124 > /dev/null 2>&1
>701a726,729

	Definately needed.

>> #	DLM added the Tgetname -l to release the tape at the end
>> 
>> $SHROOT/Tgetname -l
>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


	I have added these two sections to the old Tbackup.sh and am
using it.  Edit in the two cammands above and remove the old cammand
from the verify pass and move the result to 'Tbackup.sh".

vern
-- 
Vernon C. Hoxie		       {ncar,nbires,boulder,isis}!scicom!zebra!vern
3975 W. 29th Ave.					voice: 303-477-1780
Denver, Colo., 80212				  TB+	 uucp: 303-455-2670