FYI - an application for mirroring
Posted in 1993
I promised the Informix tech support fellow to post this. I gather he
didn't want to be identified - so I won't. It is sufficiently wierd that
some of you may benefit.
j.
Situation:
Last weekend we did a major upgrade of an application from SE to Online.
This involved creating two OnLine instances spread across 4 600MB drives.
Drives 1&2 belonged to instance 1. Drive 3 was split into 4 chunks; 2 rootdbs
(for each instance) and two data chunks. Drive 4 was half raw and half
unix file system. The application resided on the Unix file system, the
raw half was used as mirrors for rootdbs from drive 3. Each instance
was 4 databases all incorporated into a single synonym database. Instance 2
used one of the databases from instance 1 - since it was duplicate data.
It was interesting setting up, but let's cut to the chase.
To do the conversion, we dbexported from the original SE engine (spread across
5 drives) to a single 1.3 GB drive, and then dbimported onto the 4 new drives.
There was no room for the 4 new drives in the existing cabinet so they sat
on the data center floor in an aisle until the conversion was done. The intent
was to unplug them and replace the drives in the cabinet with them.
Everything worked fine - so far so good.
BUT
It turns out that the voltage requirements for the 'cabinet' drives is different
than that of the 'aisle' drives (as I will now call them). Bummer. This
means that we have to move all of the data from the aisle drives back to the
cabinet drives.
Oh by the way - people are using the system. Keep it up.
Option #1: Use HP_UX to mirror the drives and then bring up the cabinet
drives as the primaries. Sorry, these are HPIB's and you can't mirror them.
(est. 0 downtime)
Option #2: Use Informix mirroring to accomplish the same thing.
(est. 10 min downtime)
Option #3: do a tape archive, swap the symbolic links to point to the new
drives, re-gen the engines and restore. (est. 1.5 hrs downtime)
Option #4: dbexport/dbimport - yecccch. (est. 6 hrs downtime)
Option #5: Re-install from scratch - total yeccch. (est. 2 days work +
10-15 hrs downtime)
What we did.
Using the smaller of the two instances (#2) we dropped the rootdbs (on drive
aisle-3) mirror (to drive aisle-4) and re-mirrored it to cab-3. We
mirrored the data on drive aisle-3 to drive cab-3. OnLine was now making
a copy of the aisle drives onto the cabinet drives for this database.
(Note: whenever you futz with the rootdbs mirror it asks for a level 0 archive
- I like that).
(Other note: you can't bring the mirror up as the primary - unacceptable,
Jonathan - add that to your list)
Ok - went out to redo the symbolic link. Ooops, instance #1 also uses this
drive - we now have to do it's rootdbs and data space as well - so much for
trying it on just the small one first. Ok did that.
Now - take the engine to quiescent and take the mirror off.
take the engine offline.
exit and change the symbolic links.
re-start the engine. (total down time ca. 5 min.)
Check it out. Ooops! of the 4 chunks, I messed up and took the PRIMARY down
on one and left the mirror up. Not only that, but since I've changed the
symbolic link, they are now pointing to the same chunk on the same device!!!
NNNOOOOOoooooooooooooo.........!!! Well let's just try bringing the primary
back up. Logically that should be ok - since all the engine is doing is
reading from the mirror and writing the exact same data to the primary -
it shouldn't matter. Turns out it didn't matter - Thank you OnLine!
How we could do it.
1 - because we used symbolic links, we could just change the device name
(/application/dev/drive_1 --> /dev/rdsk/c16d0s10) to point to the
new drive (/application/dev/drive_1 --> /dev/rdsk/c10d0s10).
2 - because we had initially set up to mirror our rootdbs space we could
even bother. I understand that if you don't set up to mirror - EVEN IF
YOU DON'T actually mirror - you can't add it on later.
_____________________________________________________________________________
Jack Parker - Contractor |
Hewlett Packard, BSMC Boise, Idaho, USA| I've forgotten more than
jparker@hpbs2651.boi.hp.com | I ever knew
(208) 323-5388 (W) (208) 384-1623 (H) |
_____________________________________________________________________________