Operating System - HP-UX
1834170 Members
2201 Online
110064 Solutions
New Discussion

Re: Everytime I Reboot my Database Doesn't Work !

 
Danny Baldono
Frequent Advisor

Everytime I Reboot my Database Doesn't Work !

Everytime I reboot my database does not work.
I need to activate by using vgchange -a y all
the vg's listed on my /etc/lvmtab for my database to work. How to configure my system
so that it will automatically activate the the databases vg's everytime it reboots.
Don't fix a good machine or you will end up fixing it.
14 REPLIES 14
Sudeesh
Respected Contributor

Re: Everytime I Reboot my Database Doesn't Work !

can you please check the AUTO_VG_ACTIVATE parameter in /etc/lvmrc. If it is set to 0, system will not activate all the VGs during startup. Set AUTO_VG_ACTIVATE to 1 for automatic vg activation.

I assume yours is not a cluster env.


Sudeesh
The most predictable thing in life is its unpredictability
vinod_25
Valued Contributor

Re: Everytime I Reboot my Database Doesn't Work !

hi danny

Check /etc/bcheckrc-->/sbin/bcheckrc ==> This is the script that
executes /sbin/lvmrc which is illustrated in the following lines of code:

if [ -x /sbin/lvmrc ]
then
echo "Checking for LVM volume groups and Activating (if any exists)"
/sbin/lvmrc
fi

Knowing that the above-code is looking for x (executable) permission,
if /sbin/lvmrc is not executable then this is the problem.
Checking /sbin/lvmrc:

ll /sbin/lvmrc

-r-sr--r-- ==> Notice there is no x (executable) permission to this script.

Changing permission:

chmod 544 /sbin/lvmrc
ll /sbin/lvmrc

-r-xr--r-- ==> Notice there is now x (executable) permission.

Rebooting the system fixes the problem.

regards

Vinod K
Patrick Wallek
Honored Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Actually, if you change the permission from -r-sr--r-- to -r-xr--r--, you could potentially mess something up. The 's', or Set-UID permission bit, DOES indicate that execute permission was set on the file. I would recommend that you NOT MESS WITH permission on that file. The set-uid bit was probably set for a reason.

The most likely reason is that AUTO_VG_ACTIVATE is OFF in the /etc/lvmrc file.

I would definitely check that first!
Danny Baldono
Frequent Advisor

Re: Everytime I Reboot my Database Doesn't Work !

Thank you very much on all your replies.
It is very encouraging that I got replies
immediately.

The present AUTO_VG_ACTIVATE=1.

I forgot to mention that during the boot-up process on activating each vg's, I got an
error of "no such device or address". I don't know exactly the exact error but as far as I can remember it is like "no such
device". When the system booted up and execute bdf, only the vg00 is active.
Don't fix a good machine or you will end up fixing it.
Mahesh Kumar Malik
Honored Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Hi

Is database vg on seperate disk? If yes, probably that disc has failed now. Please check the disk in ioscan and do dd to query the disk. If successful, vg configuartion has probably corrupted. Restore vg configuration from vgcfgbackup and edit lvmrc.

good luck
Mahesh

Re: Everytime I Reboot my Database Doesn't Work !

You don't mention it, but is this volume group by any chance on a HP EVA disk array? Are you using SecurePath software for load balancing?

Old versions of SecurePath didn't create their disk devices before /etc/lvmrc tried to activate the volume groups.

If this is the case, upgrading to the latest vesrion of SecurePath for HPUX (3.0F I think) should fix the problem.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Danny Baldono
Frequent Advisor

Re: Everytime I Reboot my Database Doesn't Work !

Hi Mahesh,

The database is on separate disk. I run ioscan the disk are all present/claimed.
How to "to restore vg from configuration
vgcfgbackup"? Also what part/item of lvmrc
needs editing. I just want keep the present working system configuration that once I reboot again, I will not activate manually
all the vg's related to the database.

Thanks,
Danny
Don't fix a good machine or you will end up fixing it.
Danny Baldono
Frequent Advisor

Re: Everytime I Reboot my Database Doesn't Work !

Hi Duncan,

Thanks for the input, but I am not using
HP EVA neither Securepath, I am just using
JBOD's.

Danny
Don't fix a good machine or you will end up fixing it.
Sudeesh
Respected Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Did u identify the disk device which is giving issue ?

You can use: strings /etc/lvmtab to identify all the volume groups and their attached disk devices. Once you have the disk devices use the following command to check the hard disk. This will ensure the disk is functional. This should show the disk size correctly (zero size means disk is bad).


vgcfgrestore -n
will do a vgcfg restore frm default configuration file. Do a man for additional options.

Sudeesh

diskinfo -v /dev/rdsk/cxtydz
The most predictable thing in life is its unpredictability
Sudeesh
Respected Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Last post is not properly displayed:

Did u identify the disk device which is giving issue ?

You can use: strings /etc/lvmtab to identify all the volume groups and their attached disk devices. Once you have the disk devices use the following command to check the hard disk. This will ensure the disk is functional. This should show the disk size correctly (zero size means disk is bad).
diskinfo -v /dev/rdsk/cxtydz

vgcfgrestore -n
will do a vgcfg restore frm default configuration file. Do a man for additional options.

Sudeesh
The most predictable thing in life is its unpredictability
V. Nyga
Honored Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Hi,

you said you got an error.
Please search in
/etc/rc.log
or
/var/adm/syslog/syslog.log
for the error message and post it here.

Volkmar
*** Say 'Thanks' with Kudos ***
Thayanidhi
Honored Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Hi,

Post the /etc/lvmrc and /sbin/lvmrc files.
Or compare it with other servers.

Regds
TT
Attitude (not aptitude) determines altitude.
Mahesh Kumar Malik
Honored Contributor

Re: Everytime I Reboot my Database Doesn't Work !

Hi

Follow the steps below:

pvcreate -f
vgcfgrestore -n vgname pv_path
restore db
reboot and check

Regards
Mahesh
Thayanidhi
Honored Contributor

Re: Everytime I Reboot my Database Doesn't Work !

If you are able to activate VG manually, check the lvmrc file under etc & sbin.
Also check the /etc/rc.log what is the error while booting (activating all vgs).
pvcreate -f will lead all data loss.
(you cannot pvcreate if disk is already recorded in lvmtab)
Regds
TT
Attitude (not aptitude) determines altitude.