Operating System - HP-UX
1757936 Members
3088 Online
108866 Solutions
New Discussion юеВ

Cannot lock "/etc/lvmconf//lvm_lock" still trying...

 
David Silvestri
Advisor

Cannot lock "/etc/lvmconf//lvm_lock" still trying...

I've seen the following threads
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=17315&admit=-682735245+1161631721362+28353475
and
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=135162

However, I don't think they answer my question... hopefully I'm not repeating work here.

I run a nightly clone script that mounts the clone on the same host as the source luns, as a different set of VGs.

I clone vgs 01, 02, 03, 04 and mount them as 11, 12, 13, 14, using an export of the source luns that is created nightly.

Twice now, in the last 4 months, we have had the job fail due to the /etc/lvmconf/lvm_lock being locked. Both times it occurred at the same step.

The step in question is a script that cleans up the previous night's work running, in a loop,

vgchange -a n vg1* (where * increments)
vgexport vg1*

both times the vgexport command of the final vg failed...

By the time we log onto the system, the /etc/lvmconf/lvm_lock file is no longer locked.

I know it's only twice, but it's a little annoying...

Is there a max number of concurrent commands that can be queued up for lvmconf? Should I be putting a delay in each of lopps?

Thanks in advance
6 REPLIES 6
Calandrello
Trusted Contributor

Re: Cannot lock "/etc/lvmconf//lvm_lock" still trying...

friend
normally when this happens and because ja exists some command using the LVM function that you this using, then it effects a Lock so that no error of sincronysmo does not exist. ef tries ps - |grep vgchange and verifies if some command in imprisoned air exists.
David Silvestri
Advisor

Re: Cannot lock "/etc/lvmconf//lvm_lock" still trying...

Calandrello,

Thanks for the quick response...

And yes, I am running many commands... but the error doesn't always occur...

I agree with you completely... but I was wondering if I should be putting some form of delay between the commands...

and if so, how much of one?
Steven E. Protter
Exalted Contributor

Re: Cannot lock "/etc/lvmconf//lvm_lock" still trying...

Shalom,

Its possible you are dealing with a bug. We've seen some odd behavior on unpatched machines with this kind of setup.

Perhaps the place to look is patching.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
David Silvestri
Advisor

Re: Cannot lock "/etc/lvmconf//lvm_lock" still trying...

[quote]
Shalom,

Its possible you are dealing with a bug. We've seen some odd behavior on unpatched machines with this kind of setup.

Perhaps the place to look is patching.

SEP

[/quote]

Yeah... thought of that... in fact we had a fairly big issue in September, with what I was told were "known & undocumented LVM issues" :(

Anyway we've applied patches recently... the error has occurred both before and after the last round of patching...

My sysadmin applied a "custom patch bundle" which he thinks put us to the September maintenance... he's checking on that...
Pradeep_29
Frequent Advisor

Re: Cannot lock "/etc/lvmconf//lvm_lock" still trying...

May be it is a known bug but I recommend using some delay of atleast 5 seconds.
I know in the script unless the command is completed it does not go to other one but I still prefer using some delay.

Thx,
Pradeep.
David Silvestri
Advisor

Re: Cannot lock "/etc/lvmconf//lvm_lock" still trying...

Thanks Pradeep... I have added the sleep command (I was originally going to use 2 seconds... but 5 is fine)

Wish there was something more "official"...

:)

Dave