tape block size, savevg & restore

tape block size, savevg & restore

Post by Chris Site » Fri, 18 Feb 2000 04:00:00



From reading the mksysb/savevg script, I see that mksysb always writes with
a block size of 512, whereas savevg uses whatever size the tape drive is
currently set to.

How does one decide what block size to use for savevg (or for anything)?
512, 1024, 0, etc?

Also I see that to read the tape with the restore command (instead of
restvg), the block size must be either 0 or equal to the size that was
used to write the tape.  And that reading with 0 when the tape was
written with non-0, is very slow.  And that reading with 0, when the
tape was written with 0 is ok.  Would I ever want to write and read with
0?

Thanks.

--Chris Sites
"Problems cannot be solved at the same level of awareness
 that created them." -Einstein

 
 
 

tape block size, savevg & restore

Post by Chris Site » Fri, 18 Feb 2000 04:00:00


From reading the mksysb/savevg script, I see that mksysb always writes with
a block size of 512, whereas savevg uses whatever size the tape drive is
currently set to.

How does one decide what block size to use for savevg (or for anything)?
512, 1024, 0, etc?

Also I see that to read the tape with the restore command (instead of
restvg), the block size must be either 0 or equal to the size that was
used to write the tape.  And that reading with 0 when the tape was
written with non-0, is very slow.  And that reading with 0, when the
tape was written with 0 is ok.  Would I ever want to write and read with
0?

Thanks.

--Chris Sites
"Problems cannot be solved at the same level of awareness
 that created them." -Einstein

 
 
 

tape block size, savevg & restore

Post by peter_rei.. » Sun, 20 Feb 2000 04:00:00




Quote:> From reading the mksysb/savevg script, I see that mksysb always
writes with
> a block size of 512, whereas savevg uses whatever size the tape drive
is
> currently set to.

> How does one decide what block size to use for savevg (or for
anything)?
> 512, 1024, 0, etc?

> Also I see that to read the tape with the restore command (instead of
> restvg), the block size must be either 0 or equal to the size that was
> used to write the tape.  And that reading with 0 when the tape was
> written with non-0, is very slow.  And that reading with 0, when the
> tape was written with 0 is ok.  Would I ever want to write and read
with
> 0?

> Thanks.

> --Chris Sites
> "Problems cannot be solved at the same level of awareness
>  that created them." -Einstein

If you look closer, you should see that mksysb only writes the first 3
files to tape with bs=512.  The backup file of the vg contents is file
4, and I think this is written at bs=1024.

BTW, You can get file1, file 2 and file 3 from the tape using
chdev -a block_size=512 -l rmt0
mt -f /dev/rmt0 rewind
dd if=/dev/rmt0.1 of=file1 bs=512
dd if=/dev/rmt0.1 of=file2 bs=512
dd if=/dev/rmt0.1 of=file3 bs=512

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

tape block size, savevg & restore

Post by Chris Site » Tue, 22 Feb 2000 04:00:00


Thanks.  I have tested this and you are correct.  Whatever size I set
using chdev is the size used to write file 4 (rootvg).  I can tell by
setting the device to bs=256 and finding that I can only read it if it's
set to 256 (just a bogus test size).

But how does the mksysb know what to set the block size to during a real
system restore - booting from tape, not using restore command ?



>> From reading the mksysb/savevg script, I see that mksysb always writes with
>> a block size of 512, whereas savevg uses whatever size the tape drive is
>> currently set to.

> *** not true.  mksysb SAVES the original block size, changes to 512 to write
> out 3 important files.  The blocksize is then RESET to your default or changed
> according to the block specification on the smit screen.
>> How does one decide what block size to use for savevg (or for anything)?
>> 512, 1024, 0, etc?

>> Also I see that to read the tape with the restore command (instead of
>> restvg), the block size must be either 0 or equal to the size that was
>> used to write the tape.  And that reading with 0 when the tape was
>> written with non-0, is very slow.  And that reading with 0, when the
>> tape was written with 0 is ok.  Would I ever want to write and read with
>> 0?

>> Thanks.

>> --Chris Sites
>> "Problems cannot be solved at the same level of awareness
>>  that created them." -Einstein
> --
> Norman Levin

 
 
 

tape block size, savevg & restore

Post by Chris Site » Tue, 22 Feb 2000 04:00:00


I found the answer to my own question.  The second file contains the
block size in some non-text oriented form which you can retreive with
the following:

chdev -a block_size=512 -l rmt0
tctl -f /dev/rmt0.1 rewind
tctl -f /dev/rmt0.1 fsf 1
dd if=/dev/rmt0.1 bs=512 count=2 of=./blkchk
strings ./blkchk | grep NONE


> Thanks.  I have tested this and you are correct.  Whatever size I set
> using chdev is the size used to write file 4 (rootvg).  I can tell by
> setting the device to bs=256 and finding that I can only read it if it's
> set to 256 (just a bogus test size).
> But how does the mksysb know what to set the block size to during a real
> system restore - booting from tape, not using restore command ?


>>> From reading the mksysb/savevg script, I see that mksysb always writes with
>>> a block size of 512, whereas savevg uses whatever size the tape drive is
>>> currently set to.

>> *** not true.  mksysb SAVES the original block size, changes to 512 to write
>> out 3 important files.  The blocksize is then RESET to your default or changed
>> according to the block specification on the smit screen.
>>> How does one decide what block size to use for savevg (or for anything)?
>>> 512, 1024, 0, etc?

>>> Also I see that to read the tape with the restore command (instead of
>>> restvg), the block size must be either 0 or equal to the size that was
>>> used to write the tape.  And that reading with 0 when the tape was
>>> written with non-0, is very slow.  And that reading with 0, when the
>>> tape was written with 0 is ok.  Would I ever want to write and read with
>>> 0?

>>> Thanks.

>>> --Chris Sites
>>> "Problems cannot be solved at the same level of awareness
>>>  that created them." -Einstein
>> --
>> Norman Levin

--Chris Sites
"Problems cannot be solved at the same level of awareness
 that created them." -Einstein
 
 
 

tape block size, savevg & restore

Post by Norman Levi » Wed, 23 Feb 2000 04:00:00



> Thanks.  I have tested this and you are correct.  Whatever size I set
> using chdev is the size used to write file 4 (rootvg).  I can tell by
> setting the device to bs=256 and finding that I can only read it if it's
> set to 256 (just a bogus test size).

> But how does the mksysb know what to set the block size to during a real
> system restore - booting from tape, not using restore command ?

** check the 2nd file on the tape.  It consists of several files.
One of them is ./tapeblksz and it contains the blocksize of the 4th file.
--
Norman Levin
 
 
 

1. df display wrong value after restoring a savevg tape

hi all,

after restoring a savevg tape on a system df display the wrong values of
space on file systems.
this backup contains oracle datafiles...

any idea?

regards

JMB
--
-----------------------------------------------------------
Jean-Marc BOUCHER         Tel   : +33 (0)2 97 88 02 02
    SYDEL R&D             Fax   : +33 (0)2 97 37 41 06

                          http://www.sydel.com

2. DAT drive compatibility

3. Finding the block size of a file on tape - block.c (0/1)

4. scrambled Console

5. HELP: scsi tape and tape block size - how to user control

6. set local host name

7. Appropriate size of dump tape blocks for high density tape

8. Adobe Acrobat on RH6/Gnome -- Color Depth?

9. EXT2: Defualt block-size & super-block pos.

10. Quantum DLT 7000 Block Size and back/restore problems

11. restoring a single file in a savevg??

12. restoring files from savevg

13. restoring files and directories from 'savevg' archive