Importing a disk group containing cloned disks

By default, disks on which the udid_mismatch flag or the clone_disk flag has been set are not imported by the vxdg import command unless all disks in the disk group have at least one of these flags set, and no two of the disks have the same UDID. You can then import the cloned disks by specifying the -o useclonedev=on option to the vxdg import command, as shown in this example:

# vxdg -o useclonedev=on [-o updateid] import mydg

This form of the command allows only cloned disks to be imported. All non-cloned disks remain unimported.

If the clone_disk flag is set on a disk, this indicates the disk was previously imported into a disk group with the udid_mismatch flag set.

The -o updateid option can be specified to write new identification attributes to the disks, and to set the clone_disk flag on the disks. (The vxdisk set clone=on command can also be used to set the flag.) However, the import fails if multiple copies of one or more cloned disks exist. In this case, you can 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, the following command sets the tag, my_tagged_disks, on several disks that are to be imported together:

# vxdisk settag my_tagged_disks sdg sdh

Alternatively, you can update the UDIDs of the cloned disks.

To check which disks are tagged, use the vxdisk listtag command:

# vxdisk listtag

DEVICE       NAME                VALUE
sda          -                   -
sdb          -                   -
sde          my_tagged_disks     -
sdf          my_tagged_disks     -
sdg          my_tagged_disks     -
sdh          my_tagged_disks     -
sdi          -                   -

The configuration database in a VM disk's private region contains persistent configuration data (or metadata) about the objects in a disk group. This database is consulted by VxVM when the disk group is imported. At least one of the cloned disks that are being imported must contain a copy of the current configuration database in its private region.

You can use the following command to ensure that a copy of the metadata is placed on a disk, regardless of the placement policy for the disk group:

# vxdisk [-g diskgroup] set disk keepmeta=always

Alternatively, use the following command to place a copy of the configuration database and kernel log on all disks in a disk group that share a given tag:

# vxdg [-g diskgroup] set tagmeta=on tag=tagname nconfig=all \

To check which disks in a disk group contain copies of this configuration information, use the vxdg listmeta command:

# vxdg [-q] listmeta diskgroup

The -q option can be specified to suppress detailed configuration information from being displayed.

The tagged disks in the disk group may be imported by specifying the tag to the vxdg import command in addition to the -o useclonedev=on option:

# vxdg -o useclonedev=on -o tag=my_tagged_disks import mydg

If you have already imported the non-cloned disks in a disk group, you can use the -n and -t option to specify a temporary name for the disk group containing the cloned disks:

# vxdg -t -n clonedg -o useclonedev=on -o tag=my_tagged_disks \
  import mydg

To remove a tag from a disk, use the vxdisk rmtag command, as shown in the following example:

# vxdisk rmtag tag=my_tagged_disks sdh

See the vxdisk(1M) and vxdg(1M) manual pages.

More Information

Writing a new UDID to a disk

Renaming a disk group