Operating System - HP-UX
1837900 Members
3305 Online
110123 Solutions
New Discussion

Re: lvextend -m 1 failing

 
Berd
Trusted Contributor

lvextend -m 1 failing

Hello all, anyone ever come across this error message when attemptong to create a mirror

lvextend: Couldn't extend the logical volume:
A physical extent described by the extent array is already in use, or
a sparing operation is in progress.
lvextend: The LVM device driver could not extend the
logical volume "/dev/vg00/ndisdb"
9 REPLIES 9
Rajeev  Shukla
Honored Contributor

Re: lvextend -m 1 failing

what is the command you are using to extend the mirrors? I hope you are not running 2 lvextend commands at the same time
RAC_1
Honored Contributor

Re: lvextend -m 1 failing

What is the exact that you use? Do you see error messages in syslog.log and in dmesg. Can you run lvdisplay successfully on lvol that you are trying to mirror?
There is no substitute to HARDWORK
Berd
Trusted Contributor

Re: lvextend -m 1 failing

The command I am using to extend is, lvextend -m 1 /dev/vg00/lvol... I thought, as you do that there maybe another lvextend or command was running but I cannot see one.

I have checked syslog and dmesg and nothing is reported. lvdisplay works fine for the lvol, it's just having an issue extending the mirror. I can't find anything on docs.hp.com detailing this particular LVM error ?
Rajeev  Shukla
Honored Contributor

Re: lvextend -m 1 failing

see that you have enough extents in the PV on which you want to extend the mirrors.
Have a look at the vgdisplay /dev/vg00
then pvdisplay -v /dev/dsk/??????|more

Berd
Trusted Contributor

Re: lvextend -m 1 failing

There are sufficient free extents for the mirror.
IT_2007
Honored Contributor

Re: lvextend -m 1 failing

do you see lock file in /etc/lvmconf if so then there must be some process still running/hanging. Check with ps -ef | grep "lv" and if you are sure there is no as such process running then remove lock file to run lvextend command.

Be careful before you remove lock file since it will give lot of problems if somebody kicked off LVM commands and still running.
Berd
Trusted Contributor

Re: lvextend -m 1 failing

There was a lvm_lock file present in /etc/lvmconf. This was renamed and the process retried but failed with the same error message, and left it's own lock file. See below

lvextend -m 1 /dev/vg00/ndisdb &
[1] 11631
[lvmconf] lvextend: Couldn't extend the logical volume:
A physical extent described by the extent array is already in use, or
a sparing operation is in progress.
lvextend: The LVM device driver could not extend the
logical volume "/dev/vg00/ndisdb".

[1] + Done(1) lvextend -m 1 /dev/vg00/ndisdb &
root on valdez[lvmconf] ps -ef|grep lv
root 19 0 0 Jun 14 ? 7:56 lvmkd
root 20 0 0 Jun 14 ? 8:03 lvmkd
root 21 0 0 Jun 14 ? 7:55 lvmkd
root 22 0 0 Jun 14 ? 8:03 lvmkd
root 23 0 0 Jun 14 ? 8:06 lvmkd
root 24 0 0 Jun 14 ? 7:56 lvmkd
root 25 0 0 Jun 14 ? 0:00 lvmschedd
root 11677 13753 0 14:43:40 pts/0 0:00 grep lv
lvmconf] pwd
/etc/lvmconf
lvmconf] ll
total 1312
---------- 1 root sys 0 Sep 22 14:42 lvm_lock
---------- 1 root sys 0 Feb 10 2004 lvm_lock.old
-rw------- 1 root sys 330752 Sep 21 15:44 vg00.conf
-rw------- 1 root sys 330752 Sep 21 15:36 vg00.conf.old
IT_2007
Honored Contributor

Re: lvextend -m 1 failing

you shouldn't rename lock file. If you are sure then remove both lock files and see if any process running or leftout as lvextend/vgextend or any lvm commands.

You can check using

w command will show how many users logged in and what their status

Otherwise, reboot the system and then do lvextend.
Berd
Trusted Contributor

Re: lvextend -m 1 failing

The lvol was spread over 2 disks. I pvmove everything to a single disk and then retried lvextend and it is working !!!!