Operating System - HP-UX
1751970 Members
4595 Online
108783 Solutions
New Discussion юеВ

lvreduce not completely successful.

 
SOLVED
Go to solution
Johns Manville
Frequent Advisor

lvreduce not completely successful.

I have these two file systems:

/dev/vg11/lvol1
/dev/vg11/lvol2

that are using these two disks:

/dev/dsk/c16t0d1
/dev/dsk/c16t0d2

------------------
I added two more disks to this VG and then I did an lvextend -m 1 /dev/vg11/lvol1 /dev/dsk/c21t0d2

and

lvextend -m 1 /dev/vg11/lvol2 /dev/dsk/c21t0d3

I was trying to mirror lvol1 to disk d2 and then mirror lvol2 to the other disk, d3. I received a "successfully extended" message.

Then I wanted to remove the two old disks from the volume group, so I did the following:

lvreduce -m 0 /dev/vg11/lvol1 /dev/dsk/c16t0d1
Logical volume "/dev/vg11/lvol1" has been successfully reduced.

and

lvreduce -m 0 /dev/vg11/lvol2 /dev/dsk/c16t0d2
lvreduce: "MirrorCopies" parameter "0" is not smaller than existing number "0";
therefore no mirrors are removed.
------------

As you can see, the second lvreduce did not work. How can I get rid of the /dev/dsk/c16t0d2 disk from the VG?
6 REPLIES 6
Patrick Wallek
Honored Contributor
Solution

Re: lvreduce not completely successful.

The first thing I'd do is an 'lvdisplay' on /dev/vg11/lvol2 and see how many mirrors LVM thinks there are for the LV.

If it is 0, then you can't reduce it.

You should also be able to tell to which disk/disks you are mirrored.
Johns Manville
Frequent Advisor

Re: lvreduce not completely successful.

OK. It does show 0 mirrors. However, the LV is written to both disks:

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c16t0d2 385 385
/dev/dsk/c21t0d3 255 255

The problem is I need to get off the c16t0d2 disk. That disk is presented from an EVA that is going away. I need the the LV's on the c21t0d3 disk.

Thanks for the quick reply.
R.O.
Esteemed Contributor

Re: lvreduce not completely successful.

Hi,

What is the free space in "/dev/dsk/c21t0d3"? If you have enough room in "/dev/dsk/c21t0d3" for the extents residing in the disk you want to get rid of, you might move these extents with "pvmove"

Regards,
"When you look into an abyss, the abyss also looks into you"
Johns Manville
Frequent Advisor

Re: lvreduce not completely successful.

Yes, I believe there is plenty of space. I've never used pvmove, so I'll have to look that up and see how to use it.

Another thought I had, was to have another disk presented from the SAN and move the LV there. Then remove the old disk and return it to the SAN. Which is easier?
Johns Manville
Frequent Advisor

Re: lvreduce not completely successful.

OK. The pvmove did the trick just fine. What a wonderful tool. :-) Thanks for the help.
Torsten.
Acclaimed Contributor

Re: lvreduce not completely successful.

Even better on 11.31 - vgmove!

http://docs.hp.com/en/5992-6576/ch03s05.html

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!