Operating System - HP-UX
1748014 Members
4478 Online
108757 Solutions
New Discussion юеВ

Re: Needed explanation with example "pvmove -a" command

 
SOLVED
Go to solution
Samckoyur
Occasional Advisor

Needed explaination with example "pvmove -a" command

Hello Everyone,

 

Can anyone explain me with example how "pvmove -a" commmand works in 3 differnet way it is suggested by LVM SAG.

Below are the three different way to execute this command:


тАв pvmove тАУa vg_name

тАв pvmove тАУa lv_path [pv_path | pvg_name]

тАв pvmove тАУa тАУf pv_path

 

Regards,

Yadu

8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: Needed explaination with example "pvmove -a" command

The '-a' is the "automatic rebalance" mode for LVM 2.0 and higher volume groups.  Have a read through the "Auto-Rebalance Mode" section of the pvmove man page and see if that helps.

 

As far as your question --

 

-a vgname -- will rebalance the VG as a whole

 

-a lv_path -- will rebalance only the specified LV across all PV's or the specified PV or PVG.

 

-a -f pv_path -- The -f option in conjunction with -a option can be used to move all the used extents from a single or multiple physical volumes to the remaining physical volumes in the volume group such that the remaining physical volumes are balanced with respect to space utilization.

Samckoyur
Occasional Advisor

Re: Needed explanation with example "pvmove -a" command

I tried to do this while reading the System Administrator Guide for LVM.

 

please check my commands and please tell me where I am wrong or whats needs to be correct

 

# vgdisplay -v vg03
--- Volume groups ---
VG Name                     /dev/vg03
VG Write Access       read/write
VG Status                   available
Max LV                       511
Cur LV                        3
Open LV                    3
Max PV                     511
Cur PV                      1
Act PV                      1
Max PE per PV       524288
VGDA                        2
PE Size (Mbytes)    32
Total PE                   1067
Alloc PE                   3
Free PE                    1064
Total PVG                 0
Total Spare PVs      0
Total Spare PVs in use      0
VG Version                  2.0
VG Max Size                 1p
VG Max Extents              33554432

   --- Logical volumes ---
   LV Name                     /dev/vg03/lvoltest3
   LV Status                   available/syncd
   LV Size (Mbytes)            32
   Current LE                  1
   Allocated PE                1
   Used PV                     1

   LV Name                     /dev/vg03/lvoltest4
   LV Status                   available/syncd
   LV Size (Mbytes)            32
   Current LE                  1
   Allocated PE                1
   Used PV                     1

   LV Name                     /dev/vg03/lvoltest5
   LV Status                   available/syncd
   LV Size (Mbytes)            32
   Current LE                  1
   Allocated PE                1
   Used PV                     1


   --- Physical volumes ---
   PV Name                     /dev/disk/disk15
   PV Status                   available
   Total PE                    1067
   Free PE                     1064
   Autoswitch                  On
   Proactive Polling           On


#pvmove -a vg03
Automatic re-balance operation can not balance beyond the current
configuration.

 

Please suggest

 

Thanks in advance!

 

 

Patrick Wallek
Honored Contributor

Re: Needed explanation with example "pvmove -a" command

It appears that you have only a single PV in this VG.  In that case I don't think there is much rebalancing that can be done.  I don't see how you could rebalance only on a single PV.

Patrick Wallek
Honored Contributor

Re: Needed explanation with example "pvmove -a" command

Samckoyur
Occasional Advisor

Re: Needed explanation with example "pvmove -a" command


@Patrick Wallek wrote:

It appears that you have only a single PV in this VG.  In that case I don't think there is much rebalancing that can be done.  I don't see how you could rebalance only on a single PV.



Hi Patrick,

 

Thanks for your quick response!

 

I have these many disk:

 

# ioscan -m dsf
Persistent DSF           Legacy DSF(s)
========================================
/dev/rdisk/disk8         /dev/rdsk/c0t0d0
/dev/rdisk/disk8_p1      /dev/rdsk/c0t0d0s1
/dev/rdisk/disk8_p2      /dev/rdsk/c0t0d0s2
/dev/rdisk/disk8_p3      /dev/rdsk/c0t0d0s3
/dev/rdisk/disk9         /dev/rdsk/c0t0d1
/dev/rdisk/disk10        /dev/rdsk/c0t0d2
/dev/rdisk/disk11        /dev/rdsk/c0t0d3
/dev/rdisk/disk12        /dev/rdsk/c0t0d4
/dev/rdisk/disk13        /dev/rdsk/c0t0d5
/dev/rdisk/disk14        /dev/rdsk/c0t0d6
/dev/rdisk/disk15        /dev/rdsk/c0t0d7
/dev/rdisk/disk17        /dev/rdsk/c1t0d0

 

now can you suggest what to do and how to do.

 

Thanks in advance!

 

Torsten.
Acclaimed Contributor

Re: Needed explanation with example "pvmove -a" command

Looks like there is a single disk only in this VG.

 

Balancing means, if you have for example a VG with a single disk and you add another disk, all the extends will be balanced across both disks.

 

Could you please post

 

# ioscan -fnN


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!   
Samckoyur
Occasional Advisor

Re: Needed explanation with example "pvmove -a" command


@Torsten. wrote:

Looks like there is a single disk only in this VG.

 

Balancing means, if you have for example a VG with a single disk and you add another disk, all the extends will be balanced across both disks.

 

Could you please post

 

# ioscan -fnN


Hi Torsten

 

Please find the attached output files.

 

Thanks in advance!

 

Torsten.
Acclaimed Contributor
Solution

Re: Needed explanation with example "pvmove -a" command

disk15 is a single LUN provided by your smartarray P400 controller. Because the VG has a single LUN only, there is nothing to re-balance.

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!