Raw log size checking

Jon Pope (jpope@balrog) wrote:

: I have sat around watching this for long enough - I want to DO
: something about it! When I run iibuild, or startup - init, Ingres goes
: out and checks the raw log size. My raw log is 1.5 Gbytes - this takes
: a while to do. 

: I have taken a look at the scripts that perform the build and the size
: check, and both are basically just performing a 'dd' of the raw
: device, then multiplying the blocks read by the block size. The block
: size is 32k - if I were to modify the scripts to use buffers of
: 1Mbyte, the check will go a lot faster. My main concern is that the
: 32k may be there for a reason - does Ingres expect the log file to be
: in 32k chunks??

: I'm sure all of you have some very quick way of determining the exact
: number of bytes available in a raw partition - couldn't that be part of
: the unique version of Ingres for each platform?

: I'll be performing some tests today to try this out, but I would
: welcome any other comments on this subject.

Jon,

It would be better to comment out the following lines from mkrawlog:

echolog ""
echolog "Checking size of raw device..."

if dd if=$path of=/dev/null bs=32k 2>&1 | grep "+" > /tmp/mkraw.$$
then
|                                                                       |
 -----------------------------------------------------------------------

|                                                                       |
| Error determining size of raw device.                                 |
|                                                                       |
 -----------------------------------------------------------------------

!
        exit 6
fi


The following line:

kbytes=`expr $devsize \* 32`

should be changed to

kbytes=`cat $II_CONFIG/rawlog.size`

The file $II_CONFIG/rawlog.size contains the size of the raw log partition in
kbytes and assuming that your raw log partition isn't resized regularly then
why not use this file instead of a wasteful 'dd' all the time.

I've just skimmed through the mkrawlog script and I don't think the rawlog.size
file is deleted.  But if it is then create your own.

The checking of the raw log partition would be instantaneous as a result.

You will need to keep the original mkrawlog script handy just in case to do
resize your raw log partition.


Riaz
----
	
				The ASK Group - UK Ingres Technical Support,
    _/_/     _/_/_/ _/  _/      220 Wharfedale Road,
   _/ _/    _/     _/ _/        Winnersh,
  _/_/_/   _/_/_/ _/_/_/        Wokingham, RG11 5TP.
 _/   _/      _/ _/   _/        United Kingdom.
_/    _/ _/_/_/ _/     _/       Tel:   (+44) 734 496453
				Email: riaz@ingres.com



    [Digital Unix users:]
    The mkrawlog script assumes you are running v3.2 of the OS and not the 
    Y2K compliant 4.0d or better versions.
    That may sound silly but unfortunately some Laser Brain decided to change
    the output format of 'dd' in the process. The mkrawlog script processes
    the output with a sed script that just wont work anymore, ergo it screws
    up a few things! Change all the sed calls in the mkrawlog script that
    process the dd output:

    from: sed -e 's/+.*//' -e '2,$d' ...
    to:   sed -e 's/[^0-9]*\([0-9][0-9]*\)/\1/' -e '2,$d' ...

    Martin Bowes
Ingres Q & A
To William's Home Page

© William Yuan 2000

Email William