Operating System - HP-UX
1820072 Members
2732 Online
109608 Solutions
New Discussion юеВ

force deactivate volume group

 
SOLVED
Go to solution
navin
Super Advisor

force deactivate volume group

How to force the deactivation of volumeg group
vgchange -a n /dev/vg01
vgchange:could not deactivate volume group "/dev/vg12"
Device Busy

Thanks

NOte - none of the process or volumes or running on this volume group
thanks
Learning ...
9 REPLIES 9
Raj D.
Honored Contributor
Solution

Re: force deactivate volume group

Navin,

You have to unmount the Logical Volumes of the VG , before trying to deactivate the VG.

check if any LV is still open.

There is nothing like force deactivation, the theory is that you have to unmount all LV, and no one should be using the lvs before trying deactivate the vg.

http://docs.hp.com/en/B3921-90010/vgchange.1M.html


Check:
# vgdisplay -v vg01 | grep 'LV Name'
# DO : fuser -u to each LV , and see if they are in use. Also check if ther is any mounted LV.



Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
navin
Super Advisor

Re: force deactivate volume group

none of the volumes are mounted..

thanks
Learning ...
Raj D.
Honored Contributor

Re: force deactivate volume group

ok , if none of the lvs of that vg are mounted then still something is holding on that vg.

Try this one, (put in a file and execute) to find if any process still there on vg01:

################
for i in `vgdisplay -v vg01| grep 'LV Name' | awk '{print $3}'`
do
echo "checking processes for LV = $i"
fuser -u $i
fuser -u `echo $i | sed 's/lvol/rlvol'`
echo "--------------------------------"
done
################


Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: force deactivate volume group

Navin,

- What is the output of # vgdisplay vg12

-Is it under ServiceGuard? If yes did you tried to halt the package gracefully. Else, do have complicated BCV program that use the vg (activate / deactivates automatically during bcv script runs) , what other application use this vg/fs/lvol/raw lvols.
Do you see anything in lsof output , any lv from that vg. # lsof > lsof.txt

- If you find any process associated with that vg , kill it , and try to deactivate the vg using:# vgchange -a n vg12



Finally remember if nothing works , finally you have to reboot the box to clear this , and it will be fine . Before reboot (you can keep some log for future analysis if you want like: #crashinfo -v -ofiles or a kernel trace , sometime HP recomends a system crashdump.
After reboot check again with actiavting and deactivating the vg.

Hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Hakki Aydin Ucar
Honored Contributor

Re: force deactivate volume group

Navin,

just want to ask simple question ,did you get the same error when you try re-activate: ?

vgchange -a y /dev/vg01

if yes, you have 2 choice :
1-Raj suggestion (it is good and easy ,recommended)
2-Following: (not easy, no comment)

vgexport -m /vgxx.map -p -v vgxx

cat /vgxx.map
(to see volumes in it)

vgexport -m /vgxx.mapp vg01
cd dev
mkdir vgxx
cd vg01
mknod group c 64 0x010000
vgimport -m /vgxx.mapp vgxx
vgdisplay vgxx
vgdisplay -v /dev/vgxx

vgchange -a n vgxx

vgdisplay -v /dev/vgxx
Hasan  Atasoy
Honored Contributor

Re: force deactivate volume group

hi ;


new 11.31 version ( update 5 ) has a nice future. you can force vg deactivation.


Hasan
Raj D.
Honored Contributor

Re: force deactivate volume group

> Hakki
without deactivating the vg, vgexport is not going to work.!
You mentioned: vgexport -m /vgxx.mapp vg01
" If u think u can , If u think u cannot , - You are always Right . "
Hakki Aydin Ucar
Honored Contributor

Re: force deactivate volume group

>Raj D.

yes, first take it consideration that need to de-activate VG before go for vgexport,
thanks Raj D.
Raj D.
Honored Contributor

Re: force deactivate volume group

Tx. Hakki.

Navin ,
Pls review the thread , and asign points & close if done.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "