automatic database startup on Unix [message #117487] |
Wed, 27 April 2005 08:54 |
Michael Hartley
Messages: 110 Registered: December 2004 Location: West Yorkshire, United Ki...
|
Senior Member |
|
|
Hi Folks,
I'd like to take a sample of opinions and suggestions for this question.
Here we go, some background first:
On a clustered Unix system the client requires the databases to be automatically started or shutdown when the init state changes, essentially on system reboots.
They also have a collection of file system types, some journalled file systems and some clustered file systems.
I don't want to start a database if the file system is not available. Whether the file system is slow mounting because it is being fsck'd or whether there's a slow cluster interconnect delay, I don't care for the reason of the delay in the file system mounting, it may even be broken and never mount again.
So, how would I check the file systems are available. The answer has to be simple and uncomplicated.
Many thanks for your comments
Michael Hartley
http://www.openfieldsolutions.co.uk
|
|
|
Re: automatic database startup on Unix [message #117504 is a reply to message #117487] |
Wed, 27 April 2005 10:51 |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
An aproach we take here is that some essential part of the stuff to happen on the active cluster node is on the file systems that only the active cluster node has.
For example the scripts to startup the database, or scripts necesary for the sheduled cron jobs to run.
That way we make shure nothing can happen unless the file system is mounted.
|
|
|
|
Re: automatic database startup on Unix [message #117574 is a reply to message #117511] |
Thu, 28 April 2005 05:52 |
girish.rohini
Messages: 744 Registered: April 2005 Location: Delhi (India)
|
Senior Member |
|
|
One way is to check for all file systems availability before starting Oracle.
This can be done by calling Oracles startup script from another script which checks for the file system.
It'll work this way:
Check for all file systems intactness.
If everything ok, start oracle else quit.
|
|
|
Re: automatic database startup on Unix [message #117634 is a reply to message #117574] |
Thu, 28 April 2005 11:43 |
Michael Hartley
Messages: 110 Registered: December 2004 Location: West Yorkshire, United Ki...
|
Senior Member |
|
|
Hi,
That's not such an easy task.
1. although /etc/fstab should be populated with the mount points correctly, this cannot be assumed.
2. knowing which file systems would be expected by any of the databases is not trivial either. It would be possible to scan /etc/oratab to get all oracle homes (which is an assumption) then scan all oracle homes to get the distinct list of spfiles, then scan the spfiles for the distinct list of control files, then scan the control files for the distinct list of database files, but that doesn't get us the mount points. Sure we could make assumptions and presuppose the first directory in every database file pathname is the mount point, but that's not the case for all systems.
I suspect the answer to my question is "it depends on the system" in other words we have to assume that all file systems correctly mounted and were available before the databases started.
So it falls to the Unix administrators to create a robust mechanism that guarentee's the file systems have mounted correctly before attempting to run the /etc/init.d/dbora script for starting databases. And so they have to build into their working practises certain rigours, like ensuring /etc/fstab is always upto date and syntactically valid.
Michael Hartley
http://www.openfieldsolutions.co.uk
|
|
|