Operating System - HP-UX
1830939 Members
1655 Online
110017 Solutions
New Discussion

Re: pvmove fails withdistributed filesystem

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

pvmove fails withdistributed filesystem

I see some notes in here that pvmove cannot be used when striping. Does anyone know if this is also true if using a distributed filesystem ( aka extent based striping ). I receive the following error message when trying to pvmove from one disk to another. "pvmove: not enough space". I do have the new empty disk added to the volume group and in the save PVG as the one I would like to move. The disks are of the same model and size. Any feedback is appreciated. Thanks !
8 REPLIES 8
Patrick Wallek
Honored Contributor
Solution

Re: pvmove fails withdistributed filesystem

To do this you need to do a couple of things:

Turn off extent based striping for the lvol

lvchange -D n /dev/vg??/lvol?

Turn off PVG strict allocation policy

lvchange -s n /dev/vg??/lvol?

I ran into this a few months ago and as far as I recall, the above steps solved my problem. Once you get the data moved you should be able to turn back on PVG-Strict and extent based striping for the lvol again.

lvchange -s g -D y /dev/vg??/lvol?
Tim Nelson
Honored Contributor

Re: pvmove fails withdistributed filesystem

Patrick.. Does the data on the new disk end up being extend base stiped ?? lvol1, lvol2, lvol3 still end up being striped like it was origionally ? ( with the exception that one disk has now changed ?)
Patrick Wallek
Honored Contributor

Re: pvmove fails withdistributed filesystem

As long as you are moving the entire contents of one disk, all LVs, to another disk then the layout of your data on the new disk should be the same as on the old disk. So, I think the answer to your question is yes your data will still be striped when moved to the new disk.

Let's look at an example:

Disk1 Disk2 Disk3 Disk4
1 2 3 4
5 6 7 8


Add disk5 and move extents from disk1 to disk5 and you data should look like the following.

Disk2 Disk3 Disk4 Disk5
2 3 4 1
6 7 8 2

I hope this answers your question.
Patrick Wallek
Honored Contributor

Re: pvmove fails withdistributed filesystem

Ah shoot, the spacing got mucked up.

Disk1 - Extents 1 & 5
Disk2 - Extents 2 & 6
Disk3 - Extents 3 & 7
Disk4 - Extents 4 & 8

Add Disk 5 and pvmove extents from Disk1 to Disk5

Disk2 - Extents 2 & 6
Disk3 - Extents 3 & 7
Disk4 - Extents 4 & 8
Disk5 - Extents 1 & 5
Manju Kampli
Trusted Contributor

Re: pvmove fails withdistributed filesystem

Tim,

patrick's example says it clear and it does work.
The "pvmove" command does not worry how your LVM is configured.. and it just moved the sepefied Logical volume from one PV to other PV.
Let say even your PV is spread across more than one PV.. when you move it from one PV.. it only moves from that perticular PV and other PVs are not affected. This is also true even if LV is mirrored.

HTH
Manju
Never stop "LEARNING"
Tim Nelson
Honored Contributor

Re: pvmove fails withdistributed filesystem

Thanks Patrick !!! This will take care of my issue.
Tim Nelson
Honored Contributor

Re: pvmove fails withdistributed filesystem

All looks good after the pvmove with one exception. When I attempt to lvchange the lvols back to strict = g and distributed = y I get an error message.
lvchange -s g /dev/vgtest/lvol1
lvchange: Can not change to a more strict allocation policy
because LV "/dev/vgtest/lvol1" has mirrored copies.
Any help with this one ??
Steven Sim Kok Leong
Honored Contributor

Re: pvmove fails withdistributed filesystem

Hi,

Try performing lvsplit or lvremove of the mirrored copy before enabling the strict allocation policy eg.:

# lvsplit /dev/vgtest/lvol1

Subsequently, try to recreate via lvextend or merge the mirrored copy via lvmerge.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com