On Friday 07 January 2005 15:40, Brian Cuttler wrote: >samar 5# /usr/local/sbin/amrestore -r /dev/sdlt2 >amrestore: 0: skipping start of tape: date 20050107 label SAMAR05 >amrestore: 1: restoring samar._usr5_amanda.20050107.1 >amrestore: read error: I/O error > >samar 6# mt -f /dev/sdlt2 rewind >samar 7# mt -f /dev/sdlt2 fsf 1 >samar 8# dd if=/dev/sdlt2 bs=32768 of=samar._usr5_amanda.20050107.1 > skip=1 Read error: I/O error >1+0 records in >1+0 records out > >samar 9# mt -f /dev/sdlt2 rewind >samar 10# mt -f /dev/sdlt2 fsf 1 >samar 11# dd if=/dev/sdlt2 bs=32768 of=samar._usr5_amanda.20050107.1 >Read error: I/O error >1+0 records in >1+0 records out > >samar 12# mt -f /dev/sdlt2 rewind >samar 13# mt -f /dev/sdlt2 fsf 1 >samar 14# cat -evt /dev/sdlt2 | more >Input error: Invalid argument (/dev/sdlt2) > >samar 15# mt -f /dev/sdlt2 rewind >samar 16# mt -f /dev/sdlt2 fsf 1 >samar 17# dd if=/dev/sdlt2 bs=32768| cat -evt | more >AMANDA: FILE 20050107 samar /usr5/amanda lev 1 comp .gz program > /usr/local/sbin/ gnutar$ >To restore, position tape at start of file and run:$ >^Idd if=<tape> bs=32k skip=1 | /usr/sbin/gzip -dc | > usr/local/sbin/gnutar -f... -$ >^L$ >[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@ >[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ > [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED] >@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ > > > ** many null characters removed. > > > >samar 18# mt -f /dev/sdlt2 rewind >samar 19# mt -f /dev/sdlt2 fsf 1 >samar 23# dd if=/dev/sdlt2 bs=32768 skip=1 | /usr/sbin/gzip -dc | > /usr/local/sbin/gnutar -tf - | more Read error: I/O error >0+0 records in >0+0 records out > >gzip: stdin: unexpected end of file > > >I had followed Gene's instructions and saved the label via DD and >restored it to the tape as shown in an earlier email. This was the >procedure to set the blksize in the tape and dd the label back. > >samar 24# mt -f /dev/sdlt2 blksize
This is querying the tape only, and I guess the bigger tapes like bigger blocksizes by default. > Recommended tape I/O size: 131072 bytes (256 512-byte blocks) > Minimum block size: 4 byte(s) > Maximum block size: 16777212 bytes > Current block size: Variable This I think, is not good. >I am using /dev/sdlt2 link to /dev/rmt/tps1d4nrns - no rewind, > non-byte swap device. I am no longer using the trailing 'v' device > which would normally provide variable length blocks. > >I will demonstrate with the next tape SAMAR06 in slot 5. > >samar 27# mt -f /dev/sdlt2 rewind >samar 28# dd if=/dev/sdlt2 of=./scratch >Read error: Invalid argument >0+0 records in >0+0 records out > >Remembering that I'd setblksize yesterday prior to running amlabel > -f > >samar 29# dd if=/dev/sdlt2 of=./scratch bs=32k >1+0 records in >1+0 records out > >samar 30# ls -las scratch > 64 -rw-r--r-- 1 root sys 32768 Jan 7 15:36 scratch Ok, what happens if you don't spec the blocksize, but just a count of 1 on a rewound tape. Then what size of scratch file do you get? >AMANDA: TAPESTART DATE X TAPE SAMAR06$ >^L$ >[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL >PROTECTED]@ >[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ > [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL > PROTECTED]@[EMAIL PROTECTED] >@[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED]@ > > ** many nulls removed > > >samar 32# mt -f /dev/sdlt2 blksize > > Recommended tape I/O size: 131072 bytes (256 512-byte blocks) > Minimum block size: 4 byte(s) > Maximum block size: 16777212 bytes > Current block size: 32768 byte(s) Aha, this one should be ok. >samar 33# mt -f /dev/sdlt2 rewind > >samar 34# mt -f /dev/sdlt2 blksize > > Recommended tape I/O size: 131072 bytes (256 512-byte blocks) > Minimum block size: 4 byte(s) > Maximum block size: 16777212 bytes > Current block size: 32768 byte(s) > >samar 35# dd bs=32768 if=scratch of=/dev/sdlt2 >1+0 records in >1+0 records out Which should have obtained the tapes label block, probably with about 32700 bytes of nulls appended. > >That out of the way I'll go back and see what the other outstanding >questions/tests where. I hope I haven't confused things here, but it seems you might be getting closer Brian. -- Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.31% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attorneys please note, additions to this message by Gene Heskett are: Copyright 2004 by Maurice Eugene Heskett, all rights reserved.