Forum Discussion

Bill_Ranck's avatar
Bill_Ranck
Level 4
15 years ago

Using vxassist to break mirror?

Yesterday I was able to mirror data from a striped volume onto a concat space:

vxassist -g calendar01dg -b mirror u01 layout=concat alloc=calendar01disk1
This worked just fine, and now I need to break the mirror leaving the new space and just dropping the old.  The old space is being retired.  So the disk group looks like this:
Manu#vxprint -qthg calendar01dg
dg calendar01dg default      default  16000
dm calendar01d00 HDS9980V0_0 auto     2048     258336   -
dm calendar01disk1 Disk_9    auto     2048     427685632 -
dm calendar01d01 HDS9980V0_1 auto     2048     71186976 -
dm calendar01d02 HDS9980V0_2 auto     2048     71186976 -
dm calendar01d03 HDS9980V0_3 auto     2048     71186976 -
dm calendar01d04 HDS9980V0_4 auto     2048     71186976 -
dm calendar01d05 HDS9980V0_5 auto     2048     71186976 -
dm calendar01d06 HDS9980V0_6 auto     2048     71186976 -
v  u01          -            ENABLED  ACTIVE   427000000 SELECT   u01-01   fsgen
pl u01-01       u01          ENABLED  ACTIVE   427000320 STRIPE   6/128    RW
sd calendar01d01-01 u01-01   calendar01d01 0   71166720 0/0       HDS9980V0_1 ENA
sd calendar01d02-01 u01-01   calendar01d02 0   71166720 1/0       HDS9980V0_2 ENA
sd calendar01d03-01 u01-01   calendar01d03 0   71166720 2/0       HDS9980V0_3 ENA
sd calendar01d04-01 u01-01   calendar01d04 0   71166720 3/0       HDS9980V0_4 ENA
sd calendar01d05-01 u01-01   calendar01d05 0   71166720 4/0       HDS9980V0_5 ENA
sd calendar01d06-01 u01-01   calendar01d06 0   71166720 5/0       HDS9980V0_6 ENA
pl u01-02       u01          ENABLED  ACTIVE   427000000 CONCAT   -        RW
sd calendar01disk1-01 u01-02 calendar01disk1 0 427000000 0        Disk_9   ENA
I checked and the old storage is all on c6t4 target while the new storage is c6t6:
Manu#vxdmpadm getsubpaths ctlr=c6
NAME         STATE[A]   PATH-TYPE[M] DMPNODENAME  ENCLR-TYPE   ENCLR-NAME   ATTRS
================================================================================
c6t20000014C39D4612d0s2 ENABLED(A)   -          Disk_0       Disk         Disk           -
c6t20000014C39D4E26d0s2 ENABLED(A)   -          Disk_7       Disk         Disk           -
c6t4849544143484920523435304139394430303030d0s2 ENABLED(A)   -          HDS9980V0_6  HDS9980V     HDS9980V0      -
c6t4849544143484920523435304139394430323331d0s2 ENABLED(A)   -          HDS9980V0_0  HDS9980V     HDS9980V0      -
c6t4849544143484920523435304139394430303142d0s2 ENABLED(A)   -          HDS9980V0_1  HDS9980V     HDS9980V0      -
c6t4849544143484920523435304139394430303531d0s2 ENABLED(A)   -          HDS9980V0_4  HDS9980V     HDS9980V0      -
c6t4849544143484920523435304139394430303837d0s2 ENABLED(A)   -          HDS9980V0_2  HDS9980V     HDS9980V0      -
c6t4849544143484920523435304139394430303643d0s2 ENABLED(A)   -          HDS9980V0_3  HDS9980V     HDS9980V0      -
c6t4849544143484920523435304139394430303336d0s2 ENABLED(A)   -          HDS9980V0_5  HDS9980V     HDS9980V0      -
c6t60A98000486E5A7153345A447139322Fd0s2 ENABLED(A)   -          Disk_9       Disk         Disk           -
 
So, I issued this vxassist command, which if I am reading the man page correctly should do what I want, however . . .
 
Manu#vxassist -g calendar01dg remove mirror u01 \!target=c6t4
VxVM vxassist ERROR V-5-1-1102 Unrecognized attribute: !target=c6t4
Do I need to list the individual disks, or what?  The striped vs. concat thing makes me a bit hesitant to delete plexes one at a time, but I suppose I can if that's the only way, but it seems like vxassit ought to work here.
 
  • The vxplex -o rm dis ... will not remove the disks from the disk group, it only dissociates (and removes/deletes) the specified plex. ie: if you had other plexes using the same disks, you would need to run the command for those plexes too.

    You will need to run separate commands to remove the diskgroup once the plex has been removed - either via vxdiskadm or vxdg -g <dg> rmdisk <dmname1> [, ... etc]

    You shouldn't need to resync the device group until after the disks are removed from the dg

  • you can use these steps if you want to remove old plex (which has disks from old storage)...

    make sure mirroring is successful & there is nothing running in task list

    # vxtask list

     

    Offline striped plex now..

     

    # vxmend -g calendar01dg off u01-01

    Above command will take the striped plex offline...   vxprint should show like this:

     

    v  u01          -            ENABLED  ACTIVE   427000000 SELECT   u01-01   fsgen
    pl u01-01       u01          DISABLED OFFLINE   427000320 STRIPE   6/128    RW
    sd calendar01d01-01 u01-01   calendar01d01 0   71166720 0/0       HDS9980V0_1 ENA
    sd calendar01d02-01 u01-01   calendar01d02 0   71166720 1/0       HDS9980V0_2 ENA
    sd calendar01d03-01 u01-01   calendar01d03 0   71166720 2/0       HDS9980V0_3 ENA
    sd calendar01d04-01 u01-01   calendar01d04 0   71166720 3/0       HDS9980V0_4 ENA
    sd calendar01d05-01 u01-01   calendar01d05 0   71166720 4/0       HDS9980V0_5 ENA
    sd calendar01d06-01 u01-01   calendar01d06 0   71166720 5/0       HDS9980V0_6 ENA
    pl u01-02       u01          ENABLED  ACTIVE   427000000 CONCAT   -        RW
    sd calendar01disk1-01 u01-02 calendar01disk1 0 427000000 0        Disk_9   ENA

    that means your volume u01 is running with only one new plex i.e u01-02

    Now dissassociate the plex

    # vxplex -g calendar01dg dis u01-01

    After above command, the plex should be out of volume like below & volume u01 should have only one plex (new disk)

     

    pl u01-01       u01          DISABLED OFFLINE   427000320 STRIPE   6/128    RW
    sd calendar01d01-01 u01-01   calendar01d01 0   71166720 0/0       HDS9980V0_1 ENA
    sd calendar01d02-01 u01-01   calendar01d02 0   71166720 1/0       HDS9980V0_2 ENA
    sd calendar01d03-01 u01-01   calendar01d03 0   71166720 2/0       HDS9980V0_3 ENA
    sd calendar01d04-01 u01-01   calendar01d04 0   71166720 3/0       HDS9980V0_4 ENA
    sd calendar01d05-01 u01-01   calendar01d05 0   71166720 4/0       HDS9980V0_5 ENA
    sd calendar01d06-01 u01-01   calendar01d06 0   71166720 5/0       HDS9980V0_6 ENA

    v  u01          -            ENABLED  ACTIVE   427000000 SELECT   u01-01   fsgen
    pl u01-02       u01          ENABLED  ACTIVE   427000000 CONCAT   -        RW
    sd calendar01disk1-01 u01-02 calendar01disk1 0 427000000 0        Disk_9   ENA

     

    Now if you are sure to remove old storage, you can remove old plex

    # vxedit -g calendar01dg -rf rm u01-01

     

    Above command will delete the striped plex...

     

    Gaurav

  • The vxassist command did not work as the target was not specified correctly - the target is the whole string up to the dXs2

    ie: for disk HDS9980V0_6, the target is c6t4849544143484920523435304139394430303030

    If all the disks have this target (ie: it is one of the paths to all of the disks you want to remove), the vxassist command should work once you specify the whole/correct string.

    If you just want to remove the plex, you could run this instead (same as Gaurav's suggestion above, but in one step)

    # vxplex -g calendar01dg -o rm dis u01-01

  • OK, I see the problem with my target spec.  Duh! 

    I'm sure the mirroring task is complete.  No tasks running, so I'm sure. 

    This disk group is on a Sun Cluster and is defined as a device group.  I have learned that I need to resync the device group in the cluster when I add new disks to the disk group (even before they are being used).  Will that vxplex command with the -o rm option remove the disks from the disk group?  In other words do I need to resync right away, or do I remove them from the group vxdiskadm after removing the plex?

  • The vxplex -o rm dis ... will not remove the disks from the disk group, it only dissociates (and removes/deletes) the specified plex. ie: if you had other plexes using the same disks, you would need to run the command for those plexes too.

    You will need to run separate commands to remove the diskgroup once the plex has been removed - either via vxdiskadm or vxdg -g <dg> rmdisk <dmname1> [, ... etc]

    You shouldn't need to resync the device group until after the disks are removed from the dg