Operating System - HP-UX
1753396 Members
7175 Online
108792 Solutions
New Discussion юеВ

Re: lvreduce error (lvm_lock)

 
new2008
Advisor

lvreduce error (lvm_lock)

Hello,

When i try to reduce the mirror we get the below error.

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

Details are as below.

$ ls -lt /etc/lvmconf/lvm_lock
---------- 1 root root 0 Jan 16 2003 /etc/lvmconf/lvm_lock

There are currently 2 lvreduce commands and one lvextend command running on server which are in hang state as shown below.

$ ps -eaf|grep -i lv|more
root 16041 15666 0 00:12:00 pts/17 0:00 lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c1t0d0
root 14957 1 0 23:47:13 pts/tb 0:00 lvextend -m 2 /dev/vg00/lvol6 /dev/dsk/c2t0d0
root 18027 17522 0 00:58:06 pts/tc 0:00 lvreduce -m 1 /dev/vg00/lvol6 /dev/dsk/c2t0d0

Please help us resolve this issue.

Regards
23 REPLIES 23
Michal Kapalka (mikap)
Honored Contributor

Re: lvreduce error (lvm_lock)

Hi,

that's normal, if you are working with LV* commands they are access /etc/lvmtab, lvm_lock is there for security reasons, that inform other app that, some command is changing the lvmtab.

Only one application in the same time can change LVMTAB.

mikap

Sajjad Sahir
Honored Contributor

Re: lvreduce error (lvm_lock)

Dear New2008

u are running more than one LVM commands running. thats why u are facing such an error, please terminate other lvm commands and run one buy one.

thanks and regards

Sajjad Sahir
new2008
Advisor

Re: lvreduce error (lvm_lock)

Hi All,

All the LVM commands have been terminated. Now we get the below error.

lvreduce -m 1 /dev/vg00/lvol6 /dev/dsk/c2t0d0
lvreduce: Couldn't reduce the logical volume:
Device busy
lvreduce: The LVM device driver failed to reduce mirrors on
the logical volume "/dev/vg00/lvol6".

Regards
Michal Kapalka (mikap)
Honored Contributor

Re: lvreduce error (lvm_lock)

hi,

lvreduce could be use also with the -k switch.

But i will wait some time, end try again to reduce the mirror.

mikap

Jozef_Novak
Respected Contributor

Re: lvreduce error (lvm_lock)

Hello,

is the three-way mirror is still present ? Check the number of mirror copies with lvdisplay.

J.
Sajjad Sahir
Honored Contributor

Re: lvreduce error (lvm_lock)


send us vgdisplay -v vg00 out put

I think only one mirroring
lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c2t0d0

thanks and regards

Sajjad Sahir
new2008
Advisor

Re: lvreduce error (lvm_lock)

Hi,

The number of mirror copies are 2. The mirro copy which we are reducing are having stale PE and we get the below error as shown. How to resolve this issue.

lvreduce -k -m 1 /dev/vg00/lvol6 /dev/dsk/c2t0d0
Physical extents on remaining physical volumes are stale or
Remaining physical volumes are not responding.
lvreduce: The LVM device driver failed to reduce mirrors on
the logical volume "/dev/vg00/lvol6".

Regards
Michal Kapalka (mikap)
Honored Contributor

Re: lvreduce error (lvm_lock)

hi,

could you check if the disk that you like to remove from LVOL6 is not NO_HW ???

mikap
R.K. #
Honored Contributor

Re: lvreduce error (lvm_lock)

Hello..

As said first try finding out the disk that is NOT responding.

Then use this one:

lvdisplay -v -k /dev/vg_name/lvolXX
- Look for the pvkey of affected disk...say it is 0

Then try :
lvreduce -m 1 -k 0 /dev/vg_name/lvolXX

You can also use
vgreduce -f vg_name <== if the disk is not responding, all stale extents

Regds,
R.K.
Don't fix what ain't broke