AIX

AIX

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


#Power
#Power
 View Only
  • 1.  comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 10:02 AM

    Originally posted by: dingdingfish


    mklvcopy, cplv and mirrorvg can all migrate logical volumes. i have two questions:
    1) which CLI can migrate logical volume on the fly? it seems mirrorvg and mklvcopy can works when lv are active. and cplv need source lv be offline
    2) does these three CLI copy only the used PP(not free) or all the PP allocated?
    #AIX-Forum


  • 2.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 04:51 PM

    Originally posted by: KentPerrier


    I would use migratepv with the -l option to move a logical volume to a different hdisk. I have done this on a production database server without any issues. It was from 1 AM to 7 AM (a known time of low activity) so the impact was minimal.
    #AIX-Forum


  • 3.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 09:15 PM

    Originally posted by: dingdingfish


    what i want to do is migrate all my data from a old storage to a new storage. actually, i have test three method in my lab. but in production, i have never used migratepv before. so i don't know whether this CLI can keep the consistency when interrupt occurred. just like a database transaction, nothing or all. say if power outage, or the command is interrupt by ctrl+C or some signal alike, what will happen? data lost or the system can rollback just like nothing happened.
    #AIX-Forum


  • 4.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 09:27 PM

    Originally posted by: dingdingfish


    to migrate data to new storage, i have test three method:
    1) mirrorvg, then unmirrorvg
    2) mklvcopy, then rmlvcopy
    3) cplv, rename lv name.(current to old, new to current)

    the reason i prefer cplv is: only this method can keep the source data can be accessed if needed in future.
    both method 1) and 2) have delete the data in old storage. they are similar to mv shell command.
    cplv is similar to cp, and if some exception occured, i can do it again, at least i have a baseline.
    any comment?
    #AIX-Forum


  • 5.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Wed May 13, 2009 01:39 PM

    Originally posted by: SystemAdmin


    I actually have been moving data from hard disk to hard disk on AIX since AIX 3.2. I currently use it to migrate my SAN disks when we get new storage in.

    I actually use the migratepv command most of the time.

    If you want to keep a copy you could always use splitlvcopy.

    I prefer not to keep stale data around. Once it is migrated I get rid of it.
    #AIX-Forum


  • 6.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 05:14 PM

    Originally posted by: SystemAdmin


    I have used all three commands. It depends on what you want to do.

    1. mklvcopy mklvcopy is used to create 1 or 2 copies of an existing LV in the same volume group.
    There are certain restrictions if you are are using striped filesysem.
    Also you need the same amount of free PP's on other disks to quarantee the copy will complete.
    I have used this many times to guarantee oracle availability.
    2. cplv I have used the cplv when I want to move or copy a filesystem or lv from one Volume group to another volume group.
    If cplv is used to move a filesystem ALL permissions are retained on the filesystem.
    Yes, The lv MUST be offline to quarantee a clean copy.

    3. mirrorvg I have used this command to mirror a COMPLETE Volume Group. This means ALL lv's in the volume group are mirrored.
    Also the quorum for the VG is changed.
    Depending on the release of the OS you will need to varyoff the volume group and varyon the volume group for the quorum values to be activated.

    All three commands use all PPs in the source LVs. mklvcopy and mirrorvg use the exact same number of PP's for the copies since they are in the same Volume Group.

    The cplv is a little different - since PP's can be different sizes across Volume Groups. The cplv will use the required number of PP's in the target that will be able to hold the source lv PP's . Kind of get what I am talking about ? .
    #AIX-Forum


  • 7.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 09:10 PM

    Originally posted by: dingdingfish


    very very useful, many many thanks.
    only a little question about you answer:
    "The cplv is a little different - since PP's can be different sizes across Volume Groups. The cplv will use the required number of PP's in the target that will be able to hold the source lv PP's . "
    does this mean in the target VG, the PP size must be larger or equal to the PP size of source VG?
    #AIX-Forum


  • 8.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Tue May 12, 2009 09:19 PM

    Originally posted by: dingdingfish


    about PP size of cplv, my other understanding is: the pp size of target VG does not matters, the only requirement is the sum of target pp size is larger or equal to the size of source lv. correct?
    #AIX-Forum


  • 9.  Re: comparsion of mklvcopy, cplv and mirrorvg

    Posted Wed May 13, 2009 01:40 PM

    Originally posted by: SystemAdmin


    This is correct. As long as you have the same or larger space on the target the cplv will work. PPsize does not matter
    #AIX-Forum