1833758 Members
2549 Online
110063 Solutions
New Discussion

VG is still Active

 
SOLVED
Go to solution

VG is still Active

Mc Service Guard package is manually halted by using cmhaltpkg. But one of the VG is still active. I try to deactivate the volume group by using vgchange -a n vgname. It says device is busy. Even after halting the MC Service Guard, the VG is active.
1)How VG could be deactivated without shutdown my Server?
2) What is the reason behind this problem.

Thanks
Senthil
13 REPLIES 13
harry d brown jr
Honored Contributor

Re: VG is still Active

Do you have any processes that have any files open on that VG, or are any filesystems mounted on it?
Live Free or Die
Ralph Grothe
Honored Contributor

Re: VG is still Active

I think you can only deactivate a VG after the LVs in it have been unmounted.
Maybe this is the cause why the vgchange fails?
Madness, thy name is system administration
James R. Ferguson
Acclaimed Contributor

Re: VG is still Active

Hi:

I'd look with 'fuser' at the the mountpoint(s) to find what and who is using the logical volumes. Relate this to your package control scripts and you should have a better idea of what's wrong.

Regards!

...JRF...
Rainer von Bongartz
Honored Contributor

Re: VG is still Active

check if there still is a mounted logical volume on this VG.
This has to be unmounted before you can do vgchange.
Look at your cluster log files to find out why this lvol was not unmounted .
The reason might be that a process accessing this lvol could not be shutdown down by cmhaltpkg.

Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Jagadeesh Kumar
Advisor

Re: VG is still Active

Hi Senthil,

As stated earlier, the filesystems of that VG might be mounted.

To see what processes are using it:
fuser -cu

To kill all processes using that Fs and free it
fuser -cuk


After this try unmounting and then try deactivating the VG

Hope this helps

-Jagadeesh
Ralph Grothe
Honored Contributor

Re: VG is still Active

If your package is configured correctly ServiceGuard should take care of properly unmounting and deactivating VGs, because it usually kicks all processes out by sending an fuser with the kill flag.
Check in your packages' control scripts (i.e. usually /etc/cmcluster//.cntl ) that the mount point arrays LV[n], FS[n] are populated correctly, and comment those filesystems in your /etc/fstab
Madness, thy name is system administration

Re: VG is still Active

Hi All,
I am not mounting LV to any file system. It is used for the Informix Chunk. But the Informix is down. How we can check whether it is used by other users.

Thanks
Senthil
harry d brown jr
Honored Contributor

Re: VG is still Active

cd into your /dev/vg directory (where informix is using the raw volumes), and run the "fuser -u *" command.
Live Free or Die
Satish Y
Trusted Contributor

Re: VG is still Active

Hi Senthil,

There may be one of the 2 reasons for this:
1) Either any process is accesing one of mount points(LV) in ur VG and ur MC/SG script unable to kill it. In this case u need to manually find out these processes using
# fuser -cu
#fuser -ck
and kill the processes, then unmount the filesystem, run vgchange.

2) Because of the problem with shared memory, sometimes the shared memory will not get released by some of the processes and MC/SG will lack of shared memory to perform certain operations. In this case too u have to manuallu unmount the filesystem and then run vgchange.
But u should soon increase ur shmmmax parameter or findout the programs due to which this shared memory locking occurs and modify them inorder to avoid second situation.

Hope it is clear.........

Cheers...
Satish.
Difference between good and the best is only a little effort

Re: VG is still Active

Hi Satish,

I kill all the active users(Informix) bu using fuser command. Then
vgchange -a n vgname
vgchange -c n vgname

But the Package is unable to start up because the VG is not activated by the cluster. When the VG is manually started
vgchange -c y vgname - Sucessful
vgchange -a y vgname give me the following error message.
Activation mode requested for the volume group "/dev/vg_tz02" conflicts with configured mode

Could you let me know how I can resolve this issue.
Tim D Fulford
Honored Contributor
Solution

Re: VG is still Active

The reason for your second vgchange not working is because /dev/tz_vg02 is a clustered VG

try

vgchange -a e /dev/tz_vg02

Tim
-

Re: VG is still Active

Thanks Tom, It works.

How I can prevent it to be hppening again (Informix users hold the LV as a result the VG does not deactivated).

Informix IDS 2000 is running on HPUX 11.X,
Version IDS 9.21 FC4
SHMMAX = 4294967296 (Informix Recomended Valure)

Any one can help?
Tim D Fulford
Honored Contributor

Re: VG is still Active

Check your shutdown scripts (customer_halt_commands function) in /etc/cmcluster//.sh

I would a scripts similar to (I've just made this up so do test it):

INFORMIXSERVER=???
ONCONFIG=???

# do a nice kill!
onmode -yuk
sleep 30

# Check to see if it has worked, if not get nasty
ons=$(ps -fe | grep oninit | grep -v grep | wc -l)
if [ $ons -ne 0 ]
then
echo "error*** informix did not stop nicely"
echo "Using a hammer"
kill -9 $(ps -fe | grep oninit | awk '{print $2}'
sleep 30
for m in $(ipcs -mat | grep informix | awk '{print $2}'
do
ipcrm -m $m
done
fi


It sounds like to me that it was not shut down properly (hence the shared memory left lying 'round). You can actually just get away with onmode -yuk but if there are problems then this happens

Tim
-