RE: Redefining an entire setup (long)
Posted in 1999
Andrew
For the dbexport, use the -ss option to conserve any specific table settings.
With 2 disks the best you can do is mirror.
I would (always on Solaris) create Raw chunks for the database. (Faster IO and keeps them away from playing children).
3 lots of 10Mb for temp spaces look small to me. (Maybe my prejudices coming out here). Does your application never sort large tables?
Murray Wood
-----Original Message-----
From: Reardon, Andrew J [SMTP:Andrew.Reardon@australia.boeing.com]
Sent: Thursday, July 29, 1999 7:41 PM
To: 'informix-list@iiug.org'
Subject: Redefining an entire setup (long)
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