Redefining an entire setup (long)
Posted in 1999
Topics: Storage & Space Management, Server Administration, Logging & Checkpoints, Migration, Import/Export & Data Conversion, Platform-Specific Issues
Hi all !
I have a database which I'd like to more or less give a complete overhall in
terms of the layout of it's dbspaces, chunks, blobspaces, logs, tempdbs's,
etc... I've read the manuals and I've done the courses but I've never
actually made such sweeping changes on a production system (we have no
development system), so, let's just say I'm a bit wary ... :) I've decided
on how I want things laid out, and a plan of how to get there. I'd
reeeeeeeally appreciate any comments anyone might have about my plan. So
here goes:
System is:
* Informix ODS 7.24.UC6, on a Sun E450, running Solaris 2.6 with all the
latest patches.
* The E450 has 3 x 248 MHz CPUs, 1GB RAM, 2GB swap.
* Disk space available for Informix is 2 x 9GB 7200RPM disks on separate
controllers.
Current Informix setup is (beware, this is nAsty :):
* rootdbs in /dev/online_root which is a 1GB chunk
* 3 databases - all in rootdbs
* one blobspace with 2 x 1GB chunks.
* tempdbs not defined.
* rootdbs is 1GB and is 27% used.
* 3 blob chunks of varying sizes, at a total of 54% used.
* Unbuffered logging, and logical logs to /dev/null via alarmprog (client
acknowledges this is ok)
* onconfig params are ok - I've tuned it as much as poss. given the setup.
That's a fairly small database, but it is expected to grow in size fairly
soon, by a few gigs. The apps that uses the db stores most of it's data in
the blobspace. The app is predominantly read-intensive. The RDBMS hardly
does any disksorts (currently).
How I want it:
* rootdbs in /dev/online_root, which is a 100MB chunk.
* define a single dbspace for holding databases, and assign an initial 2GB
blob chunk to it.
* define a blobspace and assign an initial 2GB chunk to it.
* add a few tempdbs's and scatter these around separate disks/controllers.
* define a separate physlogdbs for physical logs
* define a separate loglogdbs for logical logs
How I plan to do it:
0. Do a backup. Verify the backup. :)
1. dbexport all databases to disk:
"dbexport db1 -o /scratch/export_dir/db1"
"dbexport db2 -o /scratch/export_dir/db2"
"dbexport db3 -o /scratch/export_dir/db3"
2. Edit onconfig and make the following changes:
* change the size of rootdbs to be 100MB.
* change the location of logical and physical logs to be in
loglogdbs, physlogdbs.
3. RAID-10 (DiskSuite 4.1) the two 9 giggers, and mount the resulting
metadevice as /db.
4. oninit -i (yikes!)
5. Create the cooked ufs files which will be the initial chunks for the
dbspace, blobspace, and tempdbs's:
"for CHUNK in dbchunk1 blobchunk1 tempchunk1 tempchunk2 tempchunk3
do
cat /dev/null > $CHUNK; chmod 660 $CHUNK; chown
informix:informix $CHUNK
ln -s /dev/$CHUNK /db/$CHUNK
done"
6. Create the data dbspace:
"onspaces -c -d dbspace1 -p /dev/dbchunk1 -s 2097152"
7. Create the blobspace:
"onspaces -c -b blobspace1 -p /dev/blobchunk1 -s 2097152"
8. Create the tmp dbspaces:
"onspaces -c -d tempspace1 -p /dev/tempchunk1 -s 10240 -t"
"onspaces -c -d tempspace2 -p /dev/tempchunk2 -s 10240 -t"
"onspaces -c -d tempspace3 -p /dev/tempchunk3 -s 10240 -t"
9. Import the previously exported databases into the new, single, data
dbspace:
"dbimport -i /scratch/export_dir/db1 dbspace1"
"dbimport -i /scratch/export_dir/db2 dbspace1"
"dbimport -i /scratch/export_dir/db3 dbspace1"
10. Update stats high.
11. Shutdown and restart ifx to verify it comes back up ok:
"oninit -ky; sleep 5; oninit -v"
12. Done !
Well that's it. If you've read this far - congratulations ! and thank-you !
Any comment much appreciated.
Cheers
Andrew
Andrew Reardon
UNIX/Informix Administrator
Aircraft Systems, Boeing Aust. Ltd.
Ph: +61 7 3306 3346 Mob: +61 0419 745 831
The plan looks sane to me just sprinkle several liberal level 0 archives about to be on the safe side. One other FYI: > 3. RAID-10 (DiskSuite 4.1) the two 9 giggers, and mount the resulting > metadevice as /db. I know RAID10 is my secret love (OK not secret) but a two pair stripe will be inefficient and certainly no better than two separate mirrored pairs would be. Either get a third pair or just do the mirroring. Art S. Kagel
In article <7np2i6$hmr$1@news.xmission.com>,
"Reardon, Andrew J" <Andrew.Reardon@australia.boeing.com> wrote:
>
> Hi all !
>
> I have a database which I'd like to more or less give a complete
overhall in
> terms of the layout of it's dbspaces, chunks, blobspaces, logs,
tempdbs's,
> etc... I've read the manuals and I've done the courses but I've never
> actually made such sweeping changes on a production system (we have no
> development system), so, let's just say I'm a bit wary ... :) I've
decided
> on how I want things laid out, and a plan of how to get there. I'd
> reeeeeeeally appreciate any comments anyone might have about my plan.
So
> here goes:
>
> System is:
>
> * Informix ODS 7.24.UC6, on a Sun E450, running Solaris 2.6 with all
the
> latest patches.
> * The E450 has 3 x 248 MHz CPUs, 1GB RAM, 2GB swap.
> * Disk space available for Informix is 2 x 9GB 7200RPM disks on
separate
> controllers.
>
> Current Informix setup is (beware, this is nAsty :):
>
> * rootdbs in /dev/online_root which is a 1GB chunk
> * 3 databases - all in rootdbs
> * one blobspace with 2 x 1GB chunks.
> * tempdbs not defined.
> * rootdbs is 1GB and is 27% used.
> * 3 blob chunks of varying sizes, at a total of 54% used.
> * Unbuffered logging, and logical logs to /dev/null via alarmprog
(client
> acknowledges this is ok)
> * onconfig params are ok - I've tuned it as much as poss. given the
setup.
>
> That's a fairly small database, but it is expected to grow in size
fairly
> soon, by a few gigs. The apps that uses the db stores most of it's
data in
> the blobspace. The app is predominantly read-intensive. The RDBMS
hardly
> does any disksorts (currently).
>
> How I want it:
>
> * rootdbs in /dev/online_root, which is a 100MB chunk.
> * define a single dbspace for holding databases, and assign an
initial 2GB
> blob chunk to it.
> * define a blobspace and assign an initial 2GB chunk to it.
> * add a few tempdbs's and scatter these around separate
disks/controllers.
> * define a separate physlogdbs for physical logs
> * define a separate loglogdbs for logical logs
>
> How I plan to do it:
>
> 0. Do a backup. Verify the backup. :)
>
> 1. dbexport all databases to disk:
>
> "dbexport db1 -o /scratch/export_dir/db1"
> "dbexport db2 -o /scratch/export_dir/db2"
> "dbexport db3 -o /scratch/export_dir/db3"
>
> 2. Edit onconfig and make the following changes:
>
> * change the size of rootdbs to be 100MB.
> * change the location of logical and physical logs to be in
> loglogdbs, physlogdbs.
>
> 3. RAID-10 (DiskSuite 4.1) the two 9 giggers, and mount the resulting
> metadevice as /db.
>
> 4. oninit -i (yikes!)
>
> 5. Create the cooked ufs files which will be the initial chunks for
the
> dbspace, blobspace, and tempdbs's:
>
> "for CHUNK in dbchunk1 blobchunk1 tempchunk1 tempchunk2
tempchunk3
> do
> cat /dev/null > $CHUNK; chmod 660 $CHUNK; chown
> informix:informix $CHUNK
> ln -s /dev/$CHUNK /db/$CHUNK
> done"
>
> 6. Create the data dbspace:
>
> "onspaces -c -d dbspace1 -p /dev/dbchunk1 -s 2097152"
>
> 7. Create the blobspace:
>
> "onspaces -c -b blobspace1 -p /dev/blobchunk1 -s 2097152"
>
> 8. Create the tmp dbspaces:
>
> "onspaces -c -d tempspace1 -p /dev/tempchunk1 -s 10240 -t"
> "onspaces -c -d tempspace2 -p /dev/tempchunk2 -s 10240 -t"
> "onspaces -c -d tempspace3 -p /dev/tempchunk3 -s 10240 -t"
>
> 9. Import the previously exported databases into the new, single, data
> dbspace:
>
> "dbimport -i /scratch/export_dir/db1 dbspace1"
> "dbimport -i /scratch/export_dir/db2 dbspace1"
> "dbimport -i /scratch/export_dir/db3 dbspace1"
>
> 10. Update stats high.
>
> 11. Shutdown and restart ifx to verify it comes back up ok:
>
> "oninit -ky; sleep 5; oninit -v"
^^^^^^
onmode surely ?? A silly little point, I know, but they can
make all the difference !! Does -ky have any impact on oninit ?
Anyone ? (Manuals not to hand).
Good Luck !!
(Agree with your comments re "rocking newsgroup" - been a boon to me).
Regards
Glyn Balmer
--
If it always works, why don't parachutists
pull the emergency 'chute first?
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Just a couple of small observations:
Reardon, Andrew J wrote in message <7np2i6$hmr$1@news.xmission.com>...
snip...
>That's a fairly small database, but it is expected to grow in size fairly
>soon, by a few gigs. The apps that uses the db stores most of it's data in
>the blobspace. The app is predominantly read-intensive. The RDBMS hardly
>does any disksorts (currently).
If this system is going to grow significantly you might need more than 2
disks for performance reasons.
>How I want it:
>
>* rootdbs in /dev/online_root, which is a 100MB chunk.
>* define a single dbspace for holding databases, and assign an initial 2GB
>blob chunk to it.
>* define a blobspace and assign an initial 2GB chunk to it.
>* add a few tempdbs's and scatter these around separate disks/controllers.
>* define a separate physlogdbs for physical logs
>* define a separate loglogdbs for logical logs
>
>How I plan to do it:
>
>0. Do a backup. Verify the backup. :)
>
>1. dbexport all databases to disk:
>
> "dbexport db1 -o /scratch/export_dir/db1"
> "dbexport db2 -o /scratch/export_dir/db2"
> "dbexport db3 -o /scratch/export_dir/db3"
>
>2. Edit onconfig and make the following changes:
>
> * change the size of rootdbs to be 100MB.
> * change the location of logical and physical logs to be in
>loglogdbs, physlogdbs.
You can't do this directly in the ONCONFIG file. You *must*
start off with physical and logical logs in rootdbs, initialise
IDS (oninit -i) and *then*, after creating the physlogdbs and
loglogdbs dbspaces use onparams to move the logs / add new
logs.
>3. RAID-10 (DiskSuite 4.1) the two 9 giggers, and mount the resulting
>metadevice as /db.
>
>4. oninit -i (yikes!)
>
>5. Create the cooked ufs files which will be the initial chunks for the
>dbspace, blobspace, and tempdbs's:
Use raw space *not* ufs space for all chunks.
> "for CHUNK in dbchunk1 blobchunk1 tempchunk1 tempchunk2 tempchunk3
> do
> cat /dev/null > $CHUNK; chmod 660 $CHUNK; chown
>informix:informix $CHUNK
> ln -s /dev/$CHUNK /db/$CHUNK
> done"
>
>6. Create the data dbspace:
>
> "onspaces -c -d dbspace1 -p /dev/dbchunk1 -s 2097152"
>
>7. Create the blobspace:
>
> "onspaces -c -b blobspace1 -p /dev/blobchunk1 -s 2097152"
>
>8. Create the tmp dbspaces:
>
> "onspaces -c -d tempspace1 -p /dev/tempchunk1 -s 10240 -t"
> "onspaces -c -d tempspace2 -p /dev/tempchunk2 -s 10240 -t"
> "onspaces -c -d tempspace3 -p /dev/tempchunk3 -s 10240 -t"
>
>9. Import the previously exported databases into the new, single, data
>dbspace:
>
> "dbimport -i /scratch/export_dir/db1 dbspace1"
> "dbimport -i /scratch/export_dir/db2 dbspace1"
> "dbimport -i /scratch/export_dir/db3 dbspace1"
>
>10. Update stats high.
>
>11. Shutdown and restart ifx to verify it comes back up ok:
>
> "oninit -ky; sleep 5; oninit -v"
onmode -ky, as someone else pointed out
>12. Done !