Chunk path rename - is it possible?
Posted in 2009
A sysadmin change renamed Linux raw devices (/dev/hdb5 -> /dev/hdc5), so IDS chunk paths stored in the reserved pages no longer matched; editing ONCONFIG's ROOTPATH and the oncfg_ file didn't help, since the engine reads chunk paths from the reserved pages. Suggested fixes: quickest is to create symbolic links with the old device names pointing at the new devices; otherwise do a restore with chunk renaming (e.g. onbar -r -rename -f file listing old path/offset and new path/offset, then onmode -m if no logs to roll forward). Everyone stressed always using symbolic links for chunk paths. No confirmation from the poster is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Backup & Restore, Storage & Space Management, Server Administration, Platform-Specific Issues
Hello, friends!
I´m having some trouble here.
Our O.S. team had added some additional disks on our storage.
When they restarted the server, the storage has changed the device letters:
from
/dev/hdb5, for example, that´s our root dbspace,
it changed to /dev/hdc5.
Then I made my onconfig ROOTPATH change to the correct device, that´s fine.
But for the other dbspaces (/dev/hdb6 and on...) I couldn´t change these paths.
I´ve even tryed to edit the oncfg_[servername].[servernum] file, but it´s
worthless. When I start the database instance, the file´s re-created somehow.
All the problem it´s because we don´t use symbolic links anymore, the paths
are all pointing to the real linux devices.
Is there some way to change them to symbolic links "on the fly" ???
Or just doing a backup / restore (onbar with a rename option flag)???
Once more, thanks for all.
Well, "the horse is already out of the barn", but this is why every Informix
tech I've known says to use symbollic links for your device names. Before
useing a device, you would create a logical device name to use, that points to
the real device. For example, /dev/ifx/rootdbs1 -> /dev/hdb5.
Maybe someone else has a workaround, but you probably need the OS team to find
a way to change the disk names back. Either that or you rebuild your db with
new device names. If you have IDS 9.40 or above (you did NOT specify which
version!) you could "restore with rename"; a wonderful feature.
Bob
----- Original Message -----
From: "ALEXANDRE MARINI" <amarini@fazenda.ms.gov.br>
To: ids@iiug.org
Sent: Monday, March 30, 2009 10:49:03 AM GMT -05:00 US/Canada Eastern
Subject: Chunk path rename - is it possible? [15367]
Hello, friends!
Im having some trouble here.
Our O.S. team had added some additional disks on our storage.
When they restarted the server, the storage has changed the device letters:
from
/dev/hdb5, for example, thats our root dbspace,
it changed to /dev/hdc5.
Then I made my onconfig ROOTPATH change to the correct device, thats fine.
But for the other dbspaces (/dev/hdb6 and on...) I couldnt change these
paths.
Ive even tryed to edit the oncfg_[servername].[servernum] file, but its
worthless. When I start the database instance, the files re-created somehow.
All the problem its because we dont use symbolic links anymore, the paths
are all pointing to the real linux devices.
Is there some way to change them to symbolic links "on the fly" ???
Or just doing a backup / restore (onbar with a rename option flag)???
Once more, thanks for all.
*******************************************************************************
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org] On Behalf Of
> ALEXANDRE MARINI
> Sent: Monday, March 30, 2009 9:49 AM
> To: ids@iiug.org
> Subject: Chunk path rename - is it possible? [15367]
>
> Hello, friends!
> I´m having some trouble here.
> Our O.S. team had added some additional disks on our storage.
> When they restarted the server, the storage has changed the device
> letters:
> from
> /dev/hdb5, for example, that´s our root dbspace,
> it changed to /dev/hdc5.
> Then I made my onconfig ROOTPATH change to the correct device, that´s
> fine.
> But for the other dbspaces (/dev/hdb6 and on...) I couldn´t change these
> paths.
> I´ve even tryed to edit the oncfg_[servername].[servernum] file, but it´s
> worthless. When I start the database instance, the file´s re-created
> somehow.
> All the problem it´s because we don´t use symbolic links anymore, the
> paths
> are all pointing to the real linux devices.
> Is there some way to change them to symbolic links "on the fly" ???
> Or just doing a backup / restore (onbar with a rename option flag)???
Don't use symbolic links anymore... Hmmm. You deserve what you got. A quick
and dirty solution is to create new links with the old devices' names and the
new devices as the targets.
--EEM
>
> Once more, thanks for all.
>
>
> **************************************************************************
> *****
> Forum Note: Use "Reply" to post a response in the discussion forum.
That's why it is ALWAYS recommended to use symbolic links for chunk paths
NOT the actual device or file paths. What version of IDS do you have? If
you are running IDS 10.00 or later, you can restore your last archive and
remap the chunks during the restore (see the Backup and Restore Guide manual
for your version).
BTW, your root chunk is NOT working either. Changing ROOTPATH in the
ONCONFIG file only changes the initial file opening that the engine uses to
read the reserved pages. Once that's done, it closes ROOTPATH and opens all
of the chunks, including the initial root chunk, using the chunk table found
in the reserved pages which will be wrong even for the root chunk.
If you are running an earlier version that does not permit chunk renaming
using ontape/onbar, call us at Oninit (www.oninit.com) we may be able to
help.
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Mon, Mar 30, 2009 at 10:49 AM, ALEXANDRE MARINI <
amarini@fazenda.ms.gov.br> wrote:
> Hello, friends!
> I´m having some trouble here.
> Our O.S. team had added some additional disks on our storage.
> When they restarted the server, the storage has changed the device letters:
> from
> /dev/hdb5, for example, that´s our root dbspace,
> it changed to /dev/hdc5.
> Then I made my onconfig ROOTPATH change to the correct device, that´s fine.
> But for the other dbspaces (/dev/hdb6 and on...) I couldn´t change these
> paths.
> I´ve even tryed to edit the oncfg_[servername].[servernum] file, but it´s
> worthless. When I start the database instance, the file´s re-created
> somehow.
> All the problem it´s because we don´t use symbolic links anymore, the paths
> are all pointing to the real linux devices.
> Is there some way to change them to symbolic links "on the fly" ???
> Or just doing a backup / restore (onbar with a rename option flag)???
>
> Once more, thanks for all.
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0016364ee590e2d7ff0466581631
If you use onbar to archive the system you could do the following:
1. Create a file that lists every chunk, including root:
/old/path/to/root <offset> /new/path/to/root <offset>
/old/path/to/chunk2 <offset> /new/path/to/chunk2 <offset>
2. Run the onbar restore command:
onbar -r -rename -f <file you created above>
3. If you don't have logs to roll fwd when the physical restore is done run
onmode -m.
And yeah, use symbolic links this time - in the file you create to use for the
rename process that is.
MM
If you use onbar to archive the system you could do the following:
1. Create a file that lists every chunk, including root:
/old/path/to/root <offset> /new/path/to/root <offset>
/old/path/to/chunk2 <offset> /new/path/to/chunk2 <offset>
2. Run the onbar restore command:
onbar -r -rename -f <file you created above>
3. If you don't have logs to roll fwd when the physical restore is done run
onmode -m.
And yeah, use symbolic links this time - in the file you create to use for the
rename process that is.
Also read up on this process in the doc - I could be missing a step.
MM