Operating System - HP-UX
1836462 Members
1958 Online
110101 Solutions
New Discussion

Move PE from one disk to another

 
Ryan Ma
Frequent Advisor

Move PE from one disk to another

I have some lv that I want to relocate their distribution on several disks. But the lv is striped.

I have tried command pvmove but it does not run on striped lv.

Is there any other way?

Thanks.
12 REPLIES 12
harry d brown jr
Honored Contributor

Re: Move PE from one disk to another

You have to BACKUP the FILESYSTEM , make your lv changes, then RESTORE your LV. That's the price of striping.

live free or die
harry
Live Free or Die
Steven Sim Kok Leong
Honored Contributor

Re: Move PE from one disk to another

Hi,

The way that works:

1) Backup data in filesystem on LV
2) lvremove the LV
3) lvcreate the LV with appropriate distribution
4) newfs filesystem on LV
5) Restore data in filesystem on LV

Hope this helps. Regards.

Steven Sim Kok Leong
Ryan Ma
Frequent Advisor

Re: Move PE from one disk to another

Thanks all.

Just wonder if there is any other solution beside backup/restore.
harry d brown jr
Honored Contributor

Re: Move PE from one disk to another

Ryan,

Nope, sorry.

live free or die
harry
Live Free or Die
Ryan Ma
Frequent Advisor

Re: Move PE from one disk to another

One more question.

Can I increase the no. of stripe of original lv if I have new pv added to the vg?

Thanks.
James R. Ferguson
Acclaimed Contributor

Re: Move PE from one disk to another

Hi Ryan:

Yes, you can extend the stripped set. The caveat simply is that you will need to use an equal number of disks to extend as you have already stripped across.

Regards!

...JRF...
harry d brown jr
Honored Contributor

Re: Move PE from one disk to another

Like JRF said, if your current stripe is 3 disks, then you need to add three new disks to extend the LV.

live free or die
harry
Live Free or Die
Bill McNAMARA_1
Honored Contributor

Re: Move PE from one disk to another

I'm sure with mirrordisk that you can mirror a striped lv onto a single disk lv no problem.. then split and remove the original.

Although I must admit, I never tried..

Later,
Bill
It works for me (tm)
Ryan Ma
Frequent Advisor

Re: Move PE from one disk to another

JRF, Harry,

I have tried to increase the striped size of a LV but fail.

Can you tell me the step of doing so?

My step:
1. I original have a LV with stripe size 2.
2. I increase the size and specify the disks. It forces me to select two PV.
3. I choose one original disk and one new disk.
4. The result is I have a LV with the same stripe size 2 but cross 3 disks.

Conclusion:
Strip size cannot be changed just like I can't use pvmove with a striped LV.

Regards,
Ryan
James R. Ferguson
Acclaimed Contributor

Re: Move PE from one disk to another

Hi Ryan:

If your original logical volume was striped across *two* disks then you will need to add *two* new ones to stipe across. This insures that the strict allocation policy is enforced.

Regards!

...JRF...
Ryan Ma
Frequent Advisor

Re: Move PE from one disk to another

Bill,

That's what I get when trying to mirror and striped lv.

# lvextend -m 1 /dev/vg00/lvtest /dev/dsk/c2t6d0
Striped mirrors are not supported. To enable mirroring options (-m, -M, -c),
do not specify the striping options (-i, -I) when creating logical volumes.

Regards,
Ryan
James R. Ferguson
Acclaimed Contributor

Re: Move PE from one disk to another

Hi (again) Ryan:

If you wish to mirror and "stripe" you can use distributed extent allocation. The combination is called "extent-based mirrored stripes". This mimics striping and adds mirroring. The "striping" is much less granular than true striping, but offers good performance. Have a look at the man pages for 'lvcreate' for more details.

Regards!

...JRF...