AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Operatingsystems
#Servers
#AIX
#AIX
#AIX
#AIX
#AppPerformanceManagement
 View Only
Expand all | Collapse all

Migrating multiple pvs to a new larger pv

  • 1.  Migrating multiple pvs to a new larger pv

    Posted Fri March 23, 2012 01:48 PM

    Originally posted by: robinsguk


    Hello,

    I'm running AIX 6.1.

    I have a vg with 2 pvs 1 x 360G and 1 x 60GB.

    I need to migrate to a new storage system so I wondered how I'd go about migrating the data from this vg on to the single 500GB lun from the new SAN?

    I'm familiar with extendvg, migratevg etc for a single pv but not sure what to do when migrating multiple pvs to a single pv.

    Thanks

    Glenn
    #AIX-Forum


  • 2.  Re: Migrating multiple pvs to a new larger pv

    Posted Fri March 23, 2012 02:14 PM

    Originally posted by: SystemAdmin


    You can migrate LVs one by one.

    List all the LV's that are in your existing disks.

    lspv -l <hdisk#> (360 GB disk)
    lspv -l <hdisk#> (60 GB disk)

    Make a note of LV names, then perform

    migratepv -l <lvname> <sourcedisk> <targetdisk>
    Kannan
    #AIX-Forum


  • 3.  Re: Migrating multiple pvs to a new larger pv

    Posted Fri March 23, 2012 02:58 PM

    Originally posted by: orphy


    Do the extendvg and then run migratepv twice. No need to worry about individual LVs in those two smaller PVs.

    e.g.

    migratepv 360gPV 500gPV; migratepv 60gPV 500gPV

    Another way is to mirror all the LVs to the 500G PV and remove the old copy.
    Orphy
    #AIX-Forum


  • 4.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 04:36 AM

    Originally posted by: robinsguk


    The migratepv 360gPV 500gPV; migratepv 60gPV 500gPV doesn't work.

    0516-1244 migratepv: Destination physical volume hdisk10 contains
    partitions of the logical volume hd1
    Glenn
    #AIX-Forum


  • 5.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 10:25 AM

    Originally posted by: orphy


    Can you show outputs of these?

    lsvg -l rootvg

    and for each PV in rootvg, run

    lspv -l <PV>
    Orphy
    #AIX-Forum


  • 6.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 10:25 AM

    Originally posted by: orphy


    Also

    lsvg -p rootvg
    Orphy
    #AIX-Forum


  • 7.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 10:36 AM

    Originally posted by: robinsguk


    Here you go:

    root@:/ lsvg -p rootvg
    rootvg:
    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk1 active 624 0 00..00..00..00..00
    hdisk3 active 468 0 00..00..00..00..00
    hdisk4 active 156 0 00..00..00..00..00
    hdisk5 active 999 26 00..00..00..00..26
    hdisk7 active 2399 2399 480..480..479..480..480
    root@:/ lspv -l hdisk1
    hdisk1:
    LV NAME LPs PPs DISTRIBUTION MOUNT POINT
    hd6 371 371 00..00..122..125..124 N/A
    hd8 1 1 00..01..00..00..00 N/A
    hd5 1 1 01..00..00..00..00 N/A
    hd9var 7 7 00..07..00..00..00 /var
    hd3 66 66 66..00..00..00..00 /tmp
    hd4 64 64 00..64..00..00..00 /
    hd2 36 36 36..00..00..00..00 /usr
    hd1 1 1 00..01..00..00..00 /home
    hd10opt 39 39 22..16..00..00..01 /opt
    lg_dumplv 32 32 00..32..00..00..00 N/A
    hd11admin 2 2 00..00..02..00..00 /admin
    livedump 4 4 00..04..00..00..00 /var/adm/ras/livedump
    root@:/ lspv -l hdisk3
    hdisk3:
    LV NAME LPs PPs DISTRIBUTION MOUNT POINT
    paging00 468 468 94..94..93..93..94 N/A
    root@:/ lspv -l hdisk4
    hdisk4:
    LV NAME LPs PPs DISTRIBUTION MOUNT POINT
    hd4 155 155 32..31..31..31..30 /
    hd2 1 1 00..00..00..00..01 /usr
    hdisk5:
    LV NAME LPs PPs DISTRIBUTION MOUNT POINT
    hd9var 1 1 00..00..00..00..01 /var
    hd4 969 969 200..200..199..200..170 /
    hd2 3 3 00..00..00..00..03 /usr
    root@:/ lspv -l hdisk7
    Nothing returned as this pv is empty. It has sufficient capacity to hold the space used by the pvs listed above.

    root@:/ lsvg -l rootvg
    rootvg:
    LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
    hd5 boot 1 1 1 closed/syncd N/A
    hd6 paging 371 371 1 open/syncd N/A
    hd8 jfs2log 1 1 1 open/syncd N/A
    hd4 jfs2 1188 1188 3 open/syncd /
    hd2 jfs2 40 40 3 open/syncd /usr
    hd9var jfs2 8 8 2 open/syncd /var
    hd3 jfs2 66 66 1 open/syncd /tmp
    hd1 jfs2 1 1 1 open/syncd /home
    hd10opt jfs2 39 39 1 open/syncd /opt
    hd11admin jfs2 2 2 1 open/syncd /admin
    lg_dumplv sysdump 32 32 1 open/syncd N/A
    livedump jfs2 4 4 1 open/syncd /var/adm/ras/livedump
    paging00 paging 468 468 1 open/syncd N/A
    #AIX-Forum


  • 8.  Re: Migrating multiple pvs to a new larger pv

    Posted Thu April 12, 2012 10:14 AM

    Originally posted by: SystemAdmin


    Hi,

    Your rootvg seems to be very big (/ filesystem in particular) and maybe it contains also some applications data, is there any reason for that ? I use to separate system and data volume group in order to keep rootvg as clean as possible, and management or maintenance like mksysb backups or upgrade could be easier for me.
    #AIX-Forum


  • 9.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 10:32 AM

    Originally posted by: orphy


    I haven't had my coffee yet so let me slow down a bit and see what exactly you are trying to do.

    Are you trying to move the OS to this new disk? If not, why do you have hd1 in that disk? If you are moving the OS, it would be easier to use mirrorvg and unmorrorvg since all the specifics will be taken care of for you.

    Why don't you give us more descriptions of what exactly you are trying to do?
    Orphy
    #AIX-Forum


  • 10.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 10:47 AM

    Originally posted by: robinsguk


    Ok, thanks.

    As you can see this LPAR has been set up with 4 pvs. These are provided by an existing SAN.

    The SAN is being replaced with a new SAN. I realise I could create 4 x Luns the same size on the new SAN and then migratepv these individually. I was looking to reduce the number of luns provided by the new SAN to just 1 for rootvg on this LPAR.

    In essence I'm trying to use this as an opportunity to reduce the number of LUNs presented by the new SAN and, therefore, the number of hdisks that need to be 'managed' in the LPAR.
    Glenn
    #AIX-Forum


  • 11.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 10:59 AM

    Originally posted by: orphy


    So you ARE trying to move rootvg to a bigger disk (hdisk7) but the error message talking about hdisk10 having hd1 doesn't make sense to me since you don't have hdisk10 in rootvg, at least now. Was hdisk10 changed to hdisk7? Actually that doesn't really matter now anyway.

    If you are trying to merge the smaller PVs in rootvg into a bigger PV, your best bet might be to use mirrorvg to make a second copy to the new PV. After the mirrors are synced, you can use unmirrorvg to remove the 1st copy from the old PVs and then reducevg, etc. Man mirrorvg and unmirrorvg for details. Just be aware that the PV you specify in mirrovg is the PV you want to mirror TO and the PVs you specify in unmirrorvg are the PVs you want to remove the mirror FROM (i.e. in your case the smaller hdisks).
    Orphy
    #AIX-Forum


  • 12.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 11:03 AM

    Originally posted by: robinsguk


    Apologies, I was trying this on another LPAR too hence the hdisk confusion.

    I did wonder if mirrorvg might be the way forward. I just haven't done this with many to one.
    Glenn
    #AIX-Forum


  • 13.  Re: Migrating multiple pvs to a new larger pv

    Posted Sat March 24, 2012 11:20 AM

    Originally posted by: orphy


    Also take a look at this.

    http://www-01.ibm.com/support/docview.wss?uid=isg3T1000358
    Orphy
    #AIX-Forum