Re: changing bad location for root chunk
Posted in 2003
Below is a slightly edited email exchange between Peter Link and Art
Kagel regarding this issue.
----- Original Message -----
From: "Art S. Kagel" <kagel@bloomberg.net>
Date: Tuesday, May 14, 2003 10:06 am
Subject: Re: changing bad location for root chunk
>From: Peter Link <plink1@excite.com>
>At: 5/13 17:42
> Art,
> Thanks for the post.
>
> I've read some of your earlier posts on related issues, and you have
> been consistent in stating that the path of the root chunk is embedded
> in the reserved pages, thus the need to do the renaming/relinking.
Correct. The initial oninit opens the root chunk using the ROOTPATH
in the
ONCONFIG file. However, it is not clear whether the oninits that it
starts up
and which are the actual engine vps (that first oninit will exit once
the first
cpu vp has been started up) inherit that handle or open the file(s)
themselves
and if the latter whether they use ROOTPATH or the path read from the
reserved
pages chunk page which is now in memory. I did have that divergence
between
ROOTPATH and the recorded path once by accident many years ago but I
only have a
vague memory that the other VPs opened the path in the reserved pages
just like
all of the other chunks. I have no clear memory of what happened,
though, and
whether the ROOTPATH or the reserved page path were the current one,
so...
> Other posts suggest using dd or mirrors. Yet another thinks that I
> could just change the onconfig entry to point to the character-special
> device.
You can do the "mirror/drop primary/remirror/drop or keep mirror"
thing. It is
certainly doable and you get the option of keeping the mirror on the
root if you
like which is not an altogether bad thing.
> My AIX sysadmin is not at all thrilled about doing down-and-dirty
> tricks in the /dev directory, so I would like to hope that there is
> another way.
Nothing down or dirty about it. They are just files for heavens sake!
And you
are going to rename the device file not remove it.
> I received an email suggesting that I edit the reserved pages, and
> substitute a symlink name that has the same number of characters as the
> block-device name, to make it easier to change.
You can do that, but be VERY careful. The new path MUST be shorter or
the same
length as the current path. The entry is NULL padded to the next 4
byte
boundary so a 4 to 7 character pathname (for a ludicrous example) will
take up 8
bytes in the table) so you actually MAY have up to 3 free bytes to
make the
path a bit longer, or not. But if you make the path shorter you will
have to
NULL fill the existing space. You do not have to compress the table
if the
entry is shorter, IDS will do that the next time you add a chunk with
onspaces.
The problem is you will have to update the record length of the entry
in the
slot table at the end of the page and the name length in the chunk
entry itself
if the name is shorter.
<snip paragraph>
> What do you think of these alternatives?
KISS. Rename the links or use the mirror option. But, I cannot speak
too badly
of the muck-with-the-reserved-page option since I've done it myself
(had 10
servers on 5 machines with physical device names instead of links and
some
overlapping chunks between 2 instances on the same machine to cleanup
also each
instance had 35+ chunks and 5.06 was limited to 64 entries of 3 chars
each (or
56 of 4-7 chars, or well you see my problem. We needed shorter
names.)
<snip 1 line>
Art
> --pete link
>
>
>
>
> ----- Original Message -----
> From: "Art S. Kagel" <kagel@bloomberg.net>
> Date: Tuesday, May 13, 2003 4:24 pm
> Subject: Re: changing bad location for root chunk
>
> > [This is an email copy of a Usenet post to "comp.databases.informix"]
> >
> > On Mon, 12 May 2003 15:47:48 -0400, Peter Link wrote:
> >
> > Know that the Block device and the Character device both the same
> > physical device. So, what you need to do is:
> >
> > 1- shutdown the engine
> > 2- rename the Block device special file,
> > 3- create a link, named the same as the Block device, which points
> > to the
> > character device.
> > 4- restart the engine.
> >
> > I don't know about AIX but on DGUX and IB HPUX device special
> > files are
> > destroyed and recreated at boot time so your startup rc scripts
> > will have
> > to perform steps 2 & 3 again at boot time before starting the
> > engine.
> >
> > I had to do this when I took over our servers here. Worked like a
> > charm.
> > Like everything you have not tried before, make safety backups,
> > and have
> > fun.
> >
> > Art S. Kagel
> >
> > > I've inherited an IDS 7.31 UD4 database running on AIX 4.3.3
> > ML10, which
> > > unfortunately was set up 6 years ago with chunks pointing
> > directly (no
> > > symlinks) to the block devices instead of the character-special
> > devices.> This includes the root chunk.
> > >
> > > We are working with our application vendor's DBA to move our
> > > badly-interleaved tables to separate dbspaces that are correctly
> > defined> with symlinks, raw disk, properly-sized extents, etc.
> > >
> > > My question is: is there a safe way to get the root chunk re-
> > defined to
> > > point to the character-special device instead of the block
> > device, and
> > > better yet, with a symlink?
> > >
> > > A secondary question: is it worth the bother to change it now?
> > >
> > >
> > > Below are a few lines from onstat -d: Chunks
> > >
> > > address chk/dbs offset size free bpages flags pathname
> > >
> > > 60052210 1 1 125 62500 48881 PO-
> > /dev/root_chunk>
> > >
> > > Peter Link
> > > University of Michigan Health System
> > > Ann Arbor, MI USA
> >