Operating System - HP-UX
1753424 Members
4800 Online
108793 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