Importing a set of cloned disks with tags

If you copy the same set of disks more than once, each disk has multiple clone disks. VxVM recognizes the difference between the source disks and the clone disks, but cannot determine which clone disks represent a consistent set of data. For example, if you take several hardware snapshots at different times, one set of cloned disks represents each snapshot point in time.

If you attempt to import the cloned disks of the disk group (using the -o useclonedev option), the import operation fails if VxVM detects multiple clones of the same disks. This behavior prevents import of an inconsistent set of disks. For example, a mix of snapshot disks from different points in time.

If multiple clone sets exist, you must indicate to VxVM which clone disks to select for import. Identify the disks that make up a consistent set and assign VxVM tags to the disks. Then, you can import the cloned disks with the specified tag.

To import a set of cloned disks with tags

  1. Identify which disks need to be imported together as a set.
    # vxdisk -o alldgs list
    
    DEVICE       TYPE         DISK    GROUP  STATUS
    EMC0_4       auto:cdsdisk mydg01  mydg   online
    EMC0_6       auto:cdsdisk mydg02  mydg   online
    EMC0_8       auto:cdsdisk -      (mydg)  online udid_mismatch
    EMC0_15      auto:cdsdisk -      (mydg)  online udid_mismatch
    EMC0_18      auto:cdsdisk -      (mydg)  online udid_mismatch
    EMC0_24      auto:cdsdisk -      (mydg)  online udid_mismatch
  2. If the disks are not already tagged, use the following command to tag all the disks in the disk group that are to be imported:
    # vxdisk [-g diskgroup ] settag tagname
    							disk ...

    where tagname is a string of up to 128 characters, not including spaces or tabs.

    For example, suppose the udid_mismatch disks represent two different point-in-time snapshots. To distinguish between the snapshots, you can tag the disks as follows:

    # vxdisk settag snaptag1=snap1 EMC0_8 EMC0_15
    # vxdisk settag snaptag2=snap2 EMC0_18 EMC0_24

    See the vxdisk(1M) manual page.

  3. To check which disks are tagged, use the vxdisk listtag command:
    # vxdisk listtag
    
    DEVICE       NAME     VALUE
    EMC0_8       snaptag1 snap1
    EMC0_15      snaptag1 snap1
    EMC0_18      snaptag2 snap2
    EMC0_24      snaptag2 snap2
  4. To import the cloned disks that are tagged as snaptag1, update the UDIDs. You must assign a disk group name other than mydg, because the mydg disk group is already imported.
    # vxdg -n bcvdg -o useclonedev=on -o tag=snaptag1 -o updateid \
    import mydg
    # vxdisk -o alldgs list
    
    DEVICE        TYPE         DISK    GROUP  STATUS
    EMC0_4        auto:cdsdisk mydg01  mydg   online
    EMC0_6        auto:cdsdisk mydg02  mydg   online
    EMC0_8        auto:cdsdisk mydg01  bcvdg  online
    EMC0_15       auto:cdsdisk mydg02  bcvdg  online
    EMC0_18       auto:cdsdisk -       (mydg) online udid_mismatch
    EMC0_24       auto:cdsdisk -       (mydg) online udid_mismatch

    The cloned disks EMC0_18 and EMC0_24 are not imported, since they do not have the snaptag1.

    The state of the imported cloned disks has changed from online udid_mismatch to online. The disks are now in a new disk group, so VxVM removes the clone_disk flag.

    See the vxdg(1M) manual page.