lvreduce: The LVM device driver failed to reduce mirrors... (950 Views)
Reply
Regular Advisor
OLIVA_1
Posts: 172
Registered: ‎03-27-2003
Message 1 of 14 (950 Views)
Accepted Solution

lvreduce: The LVM device driver failed to reduce mirrors...

Hello,

I have some issue to remove a failed disk from a VG.
We have lost a disk:
tpsin1-root-[/]: ioscan -fnCdisk
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 8/4.5.0 sdisk NO_HW DEVICE SEAGATE ST318275LC
/dev/dsk/c0t5d0 /dev/rdsk/c0t5d0
disk 1 8/4.8.0 sdisk CLAIMED DEVICE SEAGATE ST318275LC
/dev/dsk/c0t8d0 /dev/rdsk/c0t8d0
disk 2 8/16/5.2.0 sdisk CLAIMED DEVICE HP DVD-ROM 6x/32x
/dev/dsk/c1t2d0 /dev/rdsk/c1t2d0
tpsin1-root-[/]:

This disk is part of VG00:
tpsin1-root-[/]: strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t5d0
/dev/dsk/c0t8d0
tpsin1-root-[/]:

I have removed all LV mirrored and I can't remove this one (primary swap LV):
tpsin1-root-[/home/nms]: lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c0t5d0
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/lvol2".
tpsin1-root-[/home/nms]:


Someone can help me ?

Thanks,
Honored Contributor
RAC_1
Posts: 5,920
Registered: ‎03-21-2002
Message 2 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Use -k otion to lvreduce. first do lvdisplay -vk and notive pvkey.
then
lvreduve -m 0 -k /dev/vg00/lvol2 "pv_key"
There is no substitute to HARDWORK
Honored Contributor
Arunvijai_4
Posts: 4,194
Registered: ‎04-07-2005
Message 3 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Take a look at this thread,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=128170

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Regular Advisor
OLIVA_1
Posts: 172
Registered: ‎03-27-2003
Message 4 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Hello RAC,

I have tried but...
.
..
...
--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c0t5d0 0021 current /dev/dsk/c0t8d0 0021 current
0001 /dev/dsk/c0t5d0 0022 current /dev/dsk/c0t8d0 0022 current
0002 /dev/dsk/c0t5d0 0023 current /dev/dsk/c0t8d0 0023 current
0003 /dev/dsk/c0t5d0 0024 current /dev/dsk/c0t8d0 0024 current
0004 /dev/dsk/c0t5d0 0025 current /dev/dsk/c0t8d0 0025 current
0005 /dev/dsk/c0t5d0 0026 current /dev/dsk/c0t8d0 0026 current
0006 /dev/dsk/c0t5d0 0027 current /dev/dsk/c0t8d0 0027 current
0007 /dev/dsk/c0t5d0 0028 current /dev/dsk/c0t8d0 0028 current
...
..
.


.
..
...
--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 0 0021 current 1 0021 current
0001 0 0022 current 1 0022 current
0002 0 0023 current 1 0023 current
0003 0 0024 current 1 0024 current
0004 0 0025 current 1 0025 current
0005 0 0026 current 1 0026 current
0006 0 0027 current 1 0027 current
0007 0 0028 current 1 0028 current
0008 0 0029 current 1 0029 current
0009 0 0030 current 1 0030 current
0010 0 0031 current 1 0031 current
0011 0 0032 current 1 0032 current
0012 0 0033 current 1 0033 current
...
..
.


So my pvkey is 0
sin1-root-[/home/nms]: lvreduce -m 0 -k /dev/vg00/lvol2 0
Usage: lvreduce
[-A Autobackup]
[-k pvkey]
{-m MirrorCopies |
-l LogicalExtentsNumber |
-L LogicalVolumeSize}
[-f]
LogicalVolumePath [PhysicalVolumePath ...]
"pvkey": Must be a number.
tpsin1-root-[/home/nms]:


???
Honored Contributor
RAC_1
Posts: 5,920
Registered: ‎03-21-2002
Message 5 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

lvreduce -m 0 -k 0 /dev/vg00/lvol2 /dev/dsk/cxtxdx
There is no substitute to HARDWORK
Regular Advisor
OLIVA_1
Posts: 172
Registered: ‎03-27-2003
Message 6 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Same error.... :-(


tpsin1-root-[/home/nms]: lvreduce -m 0 -k 0 /dev/vg00/lvol2 /dev/dsk/c0t5d0
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/lvol2".
tpsin1-root-[/home/nms]:


Any idea ?
Honored Contributor
Arunvijai_4
Posts: 4,194
Registered: ‎04-07-2005
Message 7 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Take a look at the thread which i posted earlier, http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=128170

-Arun


"A ship in the harbor is safe, but that is not what ships are built for"
Honored Contributor
RAC_1
Posts: 5,920
Registered: ‎03-21-2002
Message 8 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

lvreduce -m 0 -k /dev/vg00/lvol2 /dev/dsk/cxtxdx

What does it say??
There is no substitute to HARDWORK
Honored Contributor
Devender Khatana
Posts: 2,278
Registered: ‎03-01-2004
Message 9 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Hi,

The situation here is a bit abormal. Allthogh the disk has failed and is showing as NO_HW under ioscan, system is still be able to right some part of it and that is causing it to display this error.

The other possible reason for this can be that the other disk having the second copy is also having some issues.

The best way to replace such a disk will be to remove it without reducing the LVOLs and then add another disk in its place. Once done you can do a vgcfgrestore and vgsync.

After replacing the disk /dev/dsk/c0t5d0 either offline or online if supported.

If you are replacing disk after shutting down the system then boot it in single user mode bypassing quorum check and using the alternate disk.

ISL>hpux -is -lq (Alternate disk path)/stand/vmunix

# vgcfgrestore -n /dev/vg00 /dev/rdsk/c0t5d0
# vgchange -a y /dev/vg00
# mount /usr
# mkboot /dev/rdsk/c0t5d0
# mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c0t5d0
# lvlnboot -R

Note: If /usr doesn't reside in /dev/vg00 the volume group that does
contain /usr's logical volume will also have to be activated.

Now, synchronize mirrored logical volumes:

# vgsync /dev/vg00

If the disk is replaced online, you can straight away do a vgcfgrestore, vgsync.

Confirm proper mirrors using

#lvlnboot -v

&

#lvdisplay -v /dev/vg00/lvol*

HTH,
Devender

Impossible itself mentions "I m possible"
Regular Advisor
OLIVA_1
Posts: 172
Registered: ‎03-27-2003
Message 10 of 14 (950 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

RAC,

There are the results:

tpsin1-root-[/home/nms]: lvreduce -m 0 -k /dev/vg00/lvol2 /dev/dsk/c0t5d0
Usage: lvreduce
[-A Autobackup]
[-k pvkey]
{-m MirrorCopies |
-l LogicalExtentsNumber |
-L LogicalVolumeSize}
[-f]
LogicalVolumePath [PhysicalVolumePath ...]
"pvkey": Must be a number.
tpsin1-root-[/home/nms]:
tpsin1-root-[/home/nms]:

tpsin1-root-[/home/nms]: lvreduce -m 0 -k 0 /dev/vg00/lvol2 /dev/dsk/c0t5d0
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/lvol2".
tpsin1-root-[/home/nms]:

???
Regular Advisor
OLIVA_1
Posts: 172
Registered: ‎03-27-2003
Message 11 of 14 (949 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

So guys...

Any idea ???


Thanks,
Honored Contributor
Arunvijai_4
Posts: 4,194
Registered: ‎04-07-2005
Message 12 of 14 (949 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

See the attachment..
"A ship in the harbor is safe, but that is not what ships are built for"
Honored Contributor
Devender Khatana
Posts: 2,278
Registered: ‎03-01-2004
Message 13 of 14 (949 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...

Hi,

Strangely , the lvreduce shall not ask for a option with k and that is happening here. What is the current OS version?

Also as suggested above the disk is there in failed state, try replacing it as per the above procedure.'

Here is official disk replacement guide for you.

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

HTH,
Devender
Impossible itself mentions "I m possible"
Regular Advisor
OLIVA_1
Posts: 172
Registered: ‎03-27-2003
Message 14 of 14 (949 Views)

Re: lvreduce: The LVM device driver failed to reduce mirrors...


OS Version is HPUX 10.20
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.