AIX

AIX

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

 View Only
  • 1.  How to migrate 3 disk vg into an single disk ..?

    Posted Sun September 12, 2010 12:00 PM

    Originally posted by: msguru


    hi All,

    i would like to migrate a VG with 3 disks into a single disk (with enough size) and remove the old 3 disks. is it possible in AIX..? if so, Please help me to achieve this via command line.

    Current state of VG:
    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk4 active 217 146 44..36..22..00..44
    hdisk2 active 434 0 00..00..00..00..00
    hdisk0 active 434 34 07..00..00..00..27

    i would like to have one like below:

    PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
    hdisk5 active 217 146 44..36..22..00..44
    Thank you in advance!!!


  • 2.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Sun September 12, 2010 07:30 PM

    Originally posted by: dukessd


    Yes, there are many ways you can do this, either while the disks are in use of during a maintenance outage.

    To do it online:
    You will add your new disk in to the vg - man extendvg
    Then migrate the existing disk data to the new disk - man migratepv
    Then remove the old disks - man reducevg

    Or you could just back up the data in the existing vg and restore it to the new disk.


  • 3.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Mon September 13, 2010 11:39 AM

    Originally posted by: msguru


    Thank you for your reply.

    as per man migratepv, migratepv command syntax is..

    migratepv SourcePhysicalVolume DestinationPhysicalVolume

    is it possible to use more than one Source PV's in the migratepv command..?

    Please help.


  • 4.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Mon September 13, 2010 06:41 PM

    Originally posted by: dukessd


    I would set up a test vg and try it in one command if that is what you need, otherwise just run the command several times to migrate each source disk to the new destination disk.


  • 5.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Thu September 16, 2010 12:52 AM

    Originally posted by: SystemAdmin


    You could even try this:

    extendvg vgX hdiskA
    mirrorvg vgX hdiskA
    unmirrorvg vgX hdiskX hdiskY hdiskZ
    reducevg vgX hdiskX hdiskY hdiskZ
    rmdev -dl hdiskX hdiskY hdiskZ

    r/
    R


  • 6.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Thu September 16, 2010 12:54 AM

    Originally posted by: SystemAdmin


    Ensure hdiskX hdiskY & hdiskZ do not have any allocated PPs on them prior to reducevg with:

    lspv -l hdiskXYZ

    r/
    R


  • 7.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Mon September 20, 2010 10:12 AM

    Originally posted by: SystemAdmin


    Hi all,
    Yes u can migrate multiple hdisks by running the migratepv command several times to migrate each source disk to the new destination disk.


  • 8.  Re: How to migrate 3 disk vg into an single disk ..?

    Posted Tue September 21, 2010 01:47 AM

    Originally posted by: ParthasarathiJ


    After extending the VG with new disk you can also use mklvcopy lvname 2 <new disk name>
    Once vg is synced you can reduce the first copy using rmlvcopy followed by reducevg vgname <old disks>.

    Thanks.
    Partha