Operating System - HP-UX
1822732 Members
3806 Online
109644 Solutions
New Discussion юеВ

Error reducing a mirror with lvreduce command

 

Error reducing a mirror with lvreduce command

I get following error when trying to reduce a mirror. I have tried to reboot and also with unmounted filesystems and with SAM:

jaipur:root:/>lvreduce -m 0 /dev/vgemc00/emclvol01 /dev/dsk/c4t0d1 /dev/dsk/c4t2d3 /dev/dsk/c4t2d5
lvreduce: Couldn't reduce the logical volume:
No such file or directory
lvreduce: The LVM device driver failed to reduce mirrors on
the logical volume "/dev/vgemc00/emclvol01".
20 REPLIES 20
rariasn
Honored Contributor

Re: Error reducing a mirror with lvreduce command

Hi jaipur,

Put you output of,

# lvdisplay -v /dev/vgemc00/emclvol01

rgs,

Re: Error reducing a mirror with lvreduce command

It's big, but here are the first lines. The disribution table seems to be odd:

jaipur:root:/>lvdisplay -v /dev/vgemc00/emclvol01|pg
--- Logical volumes ---
LV Name /dev/vgemc00/emclvol01
VG Name /dev/vgemc00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 262000
Current LE 65500
Allocated PE 131000
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t0d1 60650 93418
/dev/dsk/c4t2d3 4850 4850
/dev/dsk/c11t1d3 27882 27882
/dev/dsk/c11t1d4 4850 4850
rariasn
Honored Contributor

Re: Error reducing a mirror with lvreduce command

Hi Torbjorn,

The PV c4t2d5 is not in LVOL

Disks in LVOL:

/dev/dsk/c4t0d1
/dev/dsk/c4t2d3
/dev/dsk/c11t1d3
/dev/dsk/c11t1d4

ran
rariasn
Honored Contributor

Re: Error reducing a mirror with lvreduce command

# lvreduce -m 0 /dev/vgemc00/emclvol01

rgs,

ran

Re: Error reducing a mirror with lvreduce command

Yes I can see that. But how come? I made a lvextend to those three disks as I usual do.

If I try to reduce with the lvreduce -m 0 /dev/vgemc00/emclvol01 I get the same error. Any idea to recover?
DCE
Honored Contributor

Re: Error reducing a mirror with lvreduce command



What does a vgdisplay -v show? is /dev/dsk/c4t2d5 showing up as part of the vg?

try lvreduce -m 0 /dev/vgemc00/emclvol01 /dev/dsk/c4t0d1 /dev/dsk/c4t2d3 to reduce off of the two known disks.

Re: Error reducing a mirror with lvreduce command

I get the same error when trying the command: lvreduce -m 0 /dev/vgemc00/emclvol01 /dev/dsk/c4t0d1 /dev/dsk/c4t2d3


Here is the output from the vgdisplay. I think the Used PV = 4 is strange. The table shows that all 6 PV's are in use:



VG Name /dev/vgemc00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 6
Act PV 6
Max PE per PV 27887
VGDA 12
PE Size (Mbytes) 4
Total PE 139408
Alloc PE 131000
Free PE 8408
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vgemc00/emclvol01
LV Status available/syncd
LV Size (Mbytes) 262000
Current LE 65500
Allocated PE 131000
Used PV 4


--- Physical volumes ---
PV Name /dev/dsk/c4t0d1
PV Status available
Total PE 27882
Free PE 0
Autoswitch On

PV Name /dev/dsk/c4t2d3
PV Status available
Total PE 27882
Free PE 0
Autoswitch On

PV Name /dev/dsk/c4t2d5
PV Status available
Total PE 13940
Free PE 4204
Autoswitch On

PV Name /dev/dsk/c11t1d3
PV Status available
Total PE 27882
Free PE 0
Autoswitch On

PV Name /dev/dsk/c11t1d4
PV Status available
Total PE 27882
Free PE 0
Autoswitch On

PV Name /dev/dsk/c11t1d5
PV Status available
Total PE 13940
Free PE 4204
Autoswitch On


DCE
Honored Contributor

Re: Error reducing a mirror with lvreduce command


let's go back to the original message:
lvreduce: Couldn't reduce the logical volume:
No such file or directory


Do the following files exist?
/dev/vgemc00/emclvol01
/dev/dsk/c4t0d1
/dev/dsk/c4t2d3
/dev/dsk/c4t2d5

Does an ioscan of the system show all hardware devices claimed?

does vgscan -pv show any error messages?
Jeff Wilkins
Valued Contributor

Re: Error reducing a mirror with lvreduce command

Your lvextend probably failed on c4t2d5 because you have strict allocation and the lvol only had 2 disks.

I would agree with DCE with the lvreduce.
jfwilkins@hotmail.com

Re: Error reducing a mirror with lvreduce command

I have checked all that and all disks seems to be claimed. The vgscan does not report any errors.
Mridul Shrivastava
Honored Contributor

Re: Error reducing a mirror with lvreduce command

Hi,

I could see that mirror copy is one so out of these four disk two are current and two are mirrored one. I would suggest you to run lvdisplay -v and then notedown the disk name which are mirrored to the other two disks.

Then try lvreduce -m 0 one by one for both the disks. Its still not clear which is the mirrored disk/disks.
If possible please post lvdisplay -v output for this lv.
Time has a wonderful way of weeding out the trivial
DCE
Honored Contributor

Re: Error reducing a mirror with lvreduce command


when you do a lvdisplay -v /dev/vgemc00/emclvol01, are there any extents assigned to /dev/dsk/c4t2d5? It is very troubling that you are "missing" two disks.
Mridul Shrivastava
Honored Contributor

Re: Error reducing a mirror with lvreduce command

I need PE to LE mapping that's why I requested
lvdisplay -v /dev/vgemc00/emclvol01

Please post it so can sugest accordingly.
Time has a wonderful way of weeding out the trivial

Re: Error reducing a mirror with lvreduce command

From the lvdisplay command I can see that these disk are involved:

27881 /dev/dsk/c4t0d1 27881 current /dev/dsk/c11t1d3 27881 current
27882 /dev/dsk/c4t2d3 00000 current /dev/dsk/c11t1d4 00000 current


I have tried to reduce both the c4.. and the c11.. with same result
DCE
Honored Contributor

Re: Error reducing a mirror with lvreduce command


So both /dev/dsk/c4t2d5
& /dev/dsk/c11t1d5 do not show up in the lvdisplay -v?

How critical is this data? It appears that both of those disks are not responding right.

One potential effort is to vgexport the volume group, and then vgimport it back. This MAY help, but I would suggest waiting for more people to weigh in on that option......


Re: Error reducing a mirror with lvreduce command

Yes, there are just the disks mentioned. The data is critical production. The filesystem is ok, I think. So no damage yet. It all startet with perf problem. I just wanted to move the system to another storage array ending up with to strange copies. Export/import is probably solving the problem, but leads to downtime.
Mridul Shrivastava
Honored Contributor

Re: Error reducing a mirror with lvreduce command

Logical volumes with greater than or equal to 65536 physical extents can cause LVM commands to fail or return incorrect
results. Logical volumes with less than 65536 physical extents are not affected by this defect. Since the maximum number of logical extents in a logical volume is 65535, this problem can only occur in mirrored logical volumes where the number of physical extents can exceed this number. For example, a logical volume with no mirrors contains 40000 logical extents and 40000 physical extents. Once this
logical volume is mirrored, it will contain 40000 logical extents and 80000 physical extents.
May I have the OS version details
Time has a wonderful way of weeding out the trivial
Mridul Shrivastava
Honored Contributor

Re: Error reducing a mirror with lvreduce command

The commands affected include lvdisplay(1M), lvextend(1M), lvreduce(1M), lvsplit(1M), lvmerge(1M), pvmove(1M), and others. Data corruption can also occur, as mirrors may not be fully resynchronized after a system panic.
Time has a wonderful way of weeding out the trivial

Re: Error reducing a mirror with lvreduce command

It's HP-UX 11.23 ia64
Mridul Shrivastava
Honored Contributor

Re: Error reducing a mirror with lvreduce command

I would suggest you to Running Patch Assessment (below is the procedure for the same):

1) open the page ==> http://www1.itrc.hp.com/service/patch/assessSystemsPage.do?BC=main|
2) click on "select a system to assess or upload new system information"
3) Download the script "swainv ". Right click on this and save to the system
4) Transfer this file to the HP-UX system. If ftp is used, then select binary mode of transfer.
5) Go to the directory in HP-UX system where the script "swainv " is loaded and give the executable permission by using the command " chmod 700 swainv "
6) Execute the script as " ./swainv "
7) This will generate a file called "inventory.xml" in current directory.
8) Transfer the file to the system which has got access to ITRC site.
9) Use the above link " http://www1.itrc.hp.com/service/patch/assessSystemsPage.do?BC=main " again and upload the "inventory.xml" to ITRC by clicking "submit".
10) click on " display candidate patches". The site will give the recommendations.
11) click on "create assessment report". This will give consolidated report.
12) Check at the line " Patches recommended by InstalledPatchAnalyzer (summary)" for recommendations.
Time has a wonderful way of weeding out the trivial