AIX

AIX

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


#Power
#Power
 View Only
Expand all | Collapse all

Changing the copyN of a mirrorpool

  • 1.  Changing the copyN of a mirrorpool

    Posted Mon July 11, 2011 03:46 PM

    Originally posted by: Dave7


    Hello,

    Maybe you can help with the following problem.
    I have this situation :

    root@CLUSTER{NODE1}/> lsvg -m appvg
    Logical Volume Copy 1 Copy 2 Copy 3
    lv_smp mirrorpool_J mirrorpool_R
    lv_sys mirrorpool_J mirrorpool_R
    lv_ascs00 mirrorpool_J mirrorpool_R

    If you look at any given LV, you can see AIX knows that these are actually two copies :

    root@CLUSTER{NODE1}/> lslv -m lv_sys
    lv_sys:/usr/sap/SMP/SYS_nfs
    LP PP1 PV1 PP2 PV2 PP3 PV3
    0001 0416 hdisk18 0416 hdisk26
    0002 0416 hdisk19 0416 hdisk27
    0003 0416 hdisk20 0416 hdisk28
    0004 0417 hdisk18 0417 hdisk26
    <...>

    PP3 is empty, while PP1 and PP2 are filled.

    So, my question is : can i get lsvg to display the mirrorpools as copy1 and copy2 instead of copy2 and copy3 ?
    I could add some mirror copy but i'd like to do this without further mirror operations.

    Thanks if you can help,
    #AIX-Forum


  • 2.  Re: Changing the copyN of a mirrorpool

    Posted Mon July 11, 2011 06:13 PM

    Originally posted by: Dave7


    Let me repaste with code tags the outputs of the commands so it makes more sense :

    
    root@CLUSTER
    {NODE1
    }/> lsvg -m appvg Logical Volume    Copy 1     Copy 2          Copy 3 lv_smp                       mirrorpool_J    mirrorpool_R lv_sys                       mirrorpool_J    mirrorpool_R lv_ascs00                    mirrorpool_J    mirrorpool_R
    

    If you look at any given LV, you can see AIX knows that these are actually the two first copies :

    
    root@CLUSTER
    {NODE1
    }/> lslv -m lv_sys lv_sys:/usr/sap/SMP/SYS_nfs LP    PP1 PV1      PP2   PV2       PP3 PV3 0001  0416   hdisk18  0416  hdisk26 0002  0416   hdisk19  0416  hdisk27 0003  0416   hdisk20  0416  hdisk28 0004  0417   hdisk18  0417  hdisk26
    


    I want to have :

    
    root@CLUSTER
    {NODE1
    }/> lsvg -m appvg Logical Volume    Copy 1          Copy 2          Copy 3 lv_smp            mirrorpool_J    mirrorpool_R lv_sys            mirrorpool_J    mirrorpool_R lv_ascs00         mirrorpool_J    mirrorpool_R
    

    #AIX-Forum


  • 3.  Re: Changing the copyN of a mirrorpool

    Posted Tue July 12, 2011 02:14 AM

    Originally posted by: SystemAdmin


    Hi Dave,

    all you need is love migrate your dava from copy3 to copy1 (of course there must be enough free space on copy1 to store data). man migratepv, -l to migrate separate luns with disks.

    Regards,
    Alexander
    #AIX-Forum


  • 4.  Re: Changing the copyN of a mirrorpool

    Posted Tue July 12, 2011 02:22 AM

    Originally posted by: SystemAdmin


    Sorry, was inattentive, forget the previous message.

    could you assign new pools to luns manually?
    I mean chlv -m copy1=.. copy2=..?

    Regards,
    Alexander
    #AIX-Forum


  • 5.  Re: Changing the copyN of a mirrorpool

    Posted Tue July 12, 2011 04:04 AM

    Originally posted by: Dave7


    So, given the previous situation i did :

    chlv -m copy1=mirrorpool_J lv_smp

    I got a warning that i should do a reorgvg, and now amazingly i have :

    
    [root@SAPSMPC1]
    {HC001XFT
    }/> lsvg -m appvg Logical Volume    Copy 1            Copy 2            Copy 3 lv_smp            mirrorpool_J      mirrorpool_J      mirrorpool_R lv_sys                              mirrorpool_J      mirrorpool_R lv_ascs00                           mirrorpool_J      mirrorpool_R lv_scs01                            mirrorpool_J      mirrorpool_R lv_home                             mirrorpool_J      mirrorpool_R
    


    Not so good !
    #AIX-Forum


  • 6.  Re: Changing the copyN of a mirrorpool

    Posted Tue July 12, 2011 04:23 AM

    Originally posted by: SystemAdmin


    nope.
    first mark all the pool you wanna have:

    chlv -m copy1=mirrorpool_J -m copy2=mirrorpool_R lv_smp

    then get rid of the third one

    chlv -M copy3 lv_smp

    Regards,
    Alexander
    #AIX-Forum


  • 7.  Re: Changing the copyN of a mirrorpool

    Posted Tue July 12, 2011 06:09 AM

    Originally posted by: Dave7


    This doesn't work, maybe because to make things more fun all of this is under ha control :

    
    [root@CLUSTER]
    {NODE1
    }/> /usr/es/sbin/cluster/sbin/cl_chlv -cspoc -n
    'NODE1,NODE2' -M copy2 lv_smp HC001XFT: 0516-704 chlv: Unable to change logical volume lv_smp.
    

    #AIX-Forum


  • 8.  Re: Changing the copyN of a mirrorpool

    Posted Tue July 12, 2011 09:08 AM

    Originally posted by: Dave7


    OK, so i shot the cluster, and got to work on the VG without enhanced concurent mode.
    I can chlv all i want, including with smitty, this does not go back into the lsvg -m display :

    
    [root@SAPSMPC1]
    {HC001XFT
    }/> lsvg -m db2smpvg Logical Volume    Copy 1            Copy 2            Copy 3 lv_db2smp         mirrorpool_J2     mirrorpool_R      mirrorpool_J2 lv_smp0           mirrorpool_J2     mirrorpool_R      mirrorpool_J2
    


    Anyone seen something like that ?

    BTW, you can't chlv -M copy3 lvname, -M does not take an argument and will refuse to do anything if there are any mirrorpools defined.
    #AIX-Forum


  • 9.  Re: Changing the copyN of a mirrorpool

    Posted Wed July 13, 2011 01:30 AM

    Originally posted by: SystemAdmin


    --BTW, you can't chlv -M copy3 lvname, -M does not take an argument--

    Yes it does. -M is documented incorrectly. Refer to APAR 733326.

    Regards,
    Alexander
    #AIX-Forum


  • 10.  Re: Changing the copyN of a mirrorpool

    Posted Wed July 13, 2011 01:59 AM

    Originally posted by: Dave7


    I can't seem to find 733326, but still, I did chlv -m copy1=foo -m copy2=bar (on non hacmp controlled vg): it requires a reorgvg afterwards, and this takes ages !
    #AIX-Forum


  • 11.  Re: Changing the copyN of a mirrorpool

    Posted Thu July 21, 2011 05:49 AM

    Originally posted by: Dave7


    Can you provide me with a link for this APAR ?
    Thanks !
    #AIX-Forum