Creating and administering plexes 233

Copying volumes to plexes

Copying volumes to plexes

This task copies the contents of a volume onto a specified plex. The volume to be copied must not be enabled. The plex cannot be associated with any other volume. To copy a plex, use the following command:

#vxplex [-g diskgroup] cp volume new_plex

After the copy task is complete, new_plex is not associated with the specified volume volume. The plex contains a complete copy of the volume data. The plex that is being copied should be the same size or larger than the volume. If the plex being copied is larger than the volume, an incomplete copy of the data results. For the same reason, new_plex should not be sparse.

Dissociating and removing plexes

When a plex is no longer needed, you can dissociate it from its volume and remove it as an object from VxVM. You might want to remove a plex for the following reasons:

to provide free disk space

to reduce the number of mirrors in a volume so you can increase the length of another mirror and its associated volume. When the plexes and subdisks are removed, the resulting space can be added to other volumes

to remove a temporary mirror that was created to back up a volume and is no longer needed

to change the layout of a plex

Caution: To save the data on a plex to be removed, the configuration of that plex must be known. Parameters from that configuration (stripe unit size and subdisk ordering) are critical to the creation of a new plex to contain the same data. Before a plex is removed, you must record its configuration. See Displaying plex information” on page 224” for more information.

To dissociate a plex from the associated volume and remove it as an object from

VxVM, use the following command:

#vxplex [-g diskgroup] -o rm dis plex

For example, to dissociate and remove a plex named vol01-02in the disk group, mydg, use the following command:

# vxplex -g mydg -o rm dis vol01-02

This command removes the plex vol01-02and all associated subdisks.