Home > Veritas Storage Foundation™ Volume Manager Manual Pages
VXPLEX (1M) |
Maintenance Commands |
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] convert state=ACTIVE|SNAPDIS|SNAPDONE plex [plex1...]
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] cp volume plex...
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] [-v volume] det plex...
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] [-v volume] dis plex...
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] [-v volume] mv oldplex newplex
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] snapabort plex...
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] snapshot plex [new_volume] [plex [new_volume]...]
vxplex [-fV] [-g diskgroup] [-o useopt] [-s srcplex1 [-s srcplex2] ...] [-t tasktag] [-T taskid] [-U usetype] snapstart volume plex...
vxplex [-fV] [-g diskgroup] [-o useopt] [-t tasktag] [-T taskid] [-U usetype] snapback volume plex...
Each operation can be applied to only one disk group at a time. Any volume or plex operands are used to determine a default disk group, according to the standard disk group selection rules described in vxintro(1M). A specific disk group can be forced with -g diskgroup.
Attaching a plex is the normal means of recovering a plex after a disk replacement, or after a plex offline.
By default, the FastResync feature (if licensed) is used to speed up the synchronization of re-attached plexes. This behavior can be changed by defining a value for the usefmr attribute in the vxplex defaults file, /etc/default/vxplex.
If a valid license for the FastResync feature exists on the system, vxplex uses this feature under the following conditions:
- If a defaults file does not exist.
- If a defaults file exists, but no value is defined for the usefmr attribute.
- If a defaults file exists, and contains the entry usefmr=yes.
If a valid FastResync license is not found, or the defaults file contains the entry usefmr=no, FastResync is not used and a full resynchronization is performed.
A different defaults file can be specified by using the -d option. See the description in the OPTIONS section for details.
SmartMove reduces the time and I/O required to attach or reattach a plex to an existing VxVM volume, in the specific case where a VxVM volume has a VxFS file system mounted on it. The SmartMove feature uses the VxFS information to detect free extents and avoid copying them.
SmartMove provides the following benefits:
- Less I/O is sent through the host, through the storage network and to the disks/LUNs
- Faster plex creation, resulting in faster array migrations
- Ability to migrate from a traditional LUN to a thinly provisioned LUN, removing unused space in the process
By default the Smartmove feature is disabled. This behavior can be changed by defining a value for the userfssmartmove attribute in the Storage Foundation defaults file, /etc/default/vxsf.
To enable the Smartmove feature change the value to userfssmartmove=yes in the Storage Foundation defaults file, /etc/default/vxsf.
To disable the Smartmove feature change the value to userfssmartmove=no in the Storage Foundation defaults file, /etc/default/vxsf.
The main difference between a snapshot plex and a regular plex is the plex state. A plex may be in one of many states depending on errors, detaches and other transactions. The vxplex convert operation is limited to moving plexes between the ACTIVE, SNAPDONE, and SNAPDIS plex states. The state of a regular plex that is attached to an open volume is ACTIVE. The state of a snapshot plex after the snapshot operation has completed is usually SNAPDONE, although it may be in the SNAPDIS state if attached using vxplex.
The state attribute to the convert operation specifies the final state of the plex after conversion: ACTIVE, SNAPDIS, or SNAPDONE. A regular plex is usually converted to a snapshot plex in the SNAPDONE state, and a snapshot plex is usually converted to a regular plex in the ACTIVE state. The SNAPDIS option is provided for convenience of scripting.
As well as changing the plex state, the convert operation also changes the I/O mode and the noerror flag for the plex. The I/O mode is set to read/write for a regular plex, and to read-only for a snapshot plex. The noerror flag is cleared for regular plexes, and set for snapshot plexes. Additionally, if Persistent FastResync is enabled on a volume (that is, a data change object (DCO) and DCO volume are associated with the volume), a DCO plex must be added if a regular plex is converted to a snapshot plex, and a DCO plex must be removed if a snapshot plex is converted to a regular plex.
The following example shows how to convert the regular plex plex1 to a snapshot plex, which is associated with the DCO plex, dcoplex1:
vxplex -g mydg -o dcoplex=dcoplex1 convert state=SNAPDONE plex1
Note: The last complete regular plex in a volume, an incomplete regular plex, or a dirty region logging (DRL) log plex cannot be converted into a snapshot plex.
Note: This discussion applies only to traditional third-mirror snapshots. It does not apply to full-sized instant snapshots that are created and administered using the vxsnap command. Plexes that are broken off for use in instant snapshots must be in the ACTIVE and not the SNAPDONE state.
This operation can be used to make a copy of a volume, for backup purposes, without mirroring the volume in advance.
Plex dissociation is the typical means of unmirroring a volume or reducing the mirror count for a volume. To do this, use -o rm to dissociate and remove the plex (and its associated subdisks) in the same operation. This makes the space used by those subdisks usable for new allocations (such as with vxassist or vxmake).
Plex dissociation can also be used for file system backups of volumes that are normally mirrored. Plex devices are not directly mountable, so the backup method described for the det operation does not work if the backup program requires a mounted file system. To support such backup programs, a plex can be dissociated and can then be allocated to a new volume as in the following example:
vxmake -U gen vol volume01 plex=plex01
The created volume can then be started and mounted for use by the backup program.
Another common use of dis is to remove DCM plexes from data volumes. Removing all the DCMs from a single data volume disables SRL overflow protection for all the data volumes in the RVG. The dissociation fails if the DCM is active.
You can also remove a mirror from a volume, as shown in the following example:
vxplex -o rm dis vol01-02
A primary purpose for the plex move operation is to move a plex that is using a disk to another location. In support of this purpose for the operation, -o rm can be specified to remove the original plex after completion of the operation.
For concatenated or striped plexes, the vxsd mv operation can be used to move individual subdisks off a disk. The rules for performing the move depend upon the usage types of the volume to which oldplex is associated.
If the -s option is used to specify one or more source plexes, snapstart synchronizes the data in the newly attached snapshot plex from the source plexes.
If you use snapstart to attach a pre-existing plex, run the following command to convert the state of the plex to SNAPDONE when the snapstart operation is complete:
diskgroupvxplex -gconvert state=SNAPDONEplex
After the snapstart operation completes and the temporary plex is in the SNAPDONE state, you can use vxplex snapshot to convert it into a new volume. If identical new_volume names are specified for two or more SNAPDONE plexes, a mirrored snapshot volume is created.
For convenience of administration, you can use the -o comment=comment option with snapshot to define a comment for the snapshot volume.
To improve the quality of the copies, some usage types attempt to make the detached plex consistent with respect to in-memory data.
This method of backup is preferable to using vxplex cp because it allows you to coordinate breaking off the plex from the original volume at a well-defined point in time. This is important, since attaching a plex to a volume can take a considerable amount of time, and it is difficult to know when it will complete. Also, directly converting the plex into a new volume is more convenient than requiring additional steps.
Note: The volumes containing the named plexes and destination volume must be in the same disk group.
vxplex fails with an error if the defaults file specified to the -d option does not exist.
See the description of the att command for more details.
- comment=comment
- Sets a comment on a snapshot volume during a snapshot operation.
- dcoplex=dco_plex
- Specifies the DCO plex to be used with a convert operation.
- iosize=size
- Performs copy operations in regions with the length specified by size, which is a standard Veritas Volume Manager length number (see vxintro(1M)). Specifying a larger number typically causes the operation to complete sooner, but with greater impact on other processes using the volume. The default I/O size is 1 megabyte.
- noecopy
- Turns off Extended Copy Services for one invocation of an cp, mv or snapstart operation. By default, the Extended Copy Services feature of VxVM automatically offloads copy requests to an array's copy manager if both the source and destination disks are enabled for ecopy operations.
- nofmr
- Forces a full resynchronization during a snapback or att operation even if FastResync is enabled.
- numchild=number
- Specifies the number of child processes that are used to perform resynchronization during att and snapback operations. The default value of number is 1 (no child processes), which is the same as specifying a number of 0. Specifying a larger value for number potentially speeds up resynchronization, although the effectiveness of this depends to some extent on the underlying characteristics of the disk array. No further benefit in performance may be noticeable for a value for number greater than 3.
By default, the child processes divide the volume into equally sized chunks, which they then resynchronize independently with the volume. This behavior may be modified using the useopt sequential.
Note: A large iosize of 1m or 2m is recommended for use with this option.
- renamesnapplex
- Specifies that a snapshot plex is renamed when the snapshot operation is used to create a snapshot volume. If this option is not specified, the plex retains the same name that it had in the original volume.
- resyncfromoriginal
- Chooses the original volume as the preferred copy of data during a snapback or att operation. This is the default behavior.
Note: Unmount the snapshot volume (if mounted) before performing this operation.
- resyncfromreplica
- Chooses the replica plex as the preferred copy of data during a snapback or att operation. resyncfromoriginal is the default behavior.
Note: Unmount the original volume (if mounted) before performing this operation.
- rm
- Removes the plexes after successful completion of a vxplex dis operation. Remove the source plex after successful completion of vxplex mv.
- sequential
- When specified with the useopt numchild for values of number greater than 1, the child processes co-operate in resynchronizing regions of the volume that are close together, starting at the beginning of the volume and moving to the end. This creates more overhead for the resynchronization, but it potentially makes better use of the sequential read-ahead buffer of the physical disks.
- slow[=iodelay]
- Reduces the system performance impact of copy operations. Such operations are usually performed on small regions of the volume (normally 1 megabyte). This option inserts a delay between the recovery of each such region. A specific delay can be specified with iodelay as a number of milliseconds; otherwise, a default is chosen (normally 250 milliseconds).
If a vxplex operation is interrupted by a signal, then an attempt is made to restore the disk group configuration to a state that is roughly equivalent to its original state. If this attempt is interrupted (such as through another signal) then the user may need to perform some cleanup. The specific cleanup actions that are needed are written to the standard error before vxplex exits.
The fsgen and gen usage types provide the following options as arguments to -o in addition to the required options:
If the volume is not enabled, then the named plexes are associated with the volume (if not already associated) and are set to the STALE state, so that the plex is fully attached by the next vxvol start or vxvol startall operation that is applied to the volume.
If the log type of the volume is UNDEF and an unassociated plex with a log subdisk is attached, the volume is automatically converted to have a log type of DRL. Logging of volume changes is enabled when the volume has at least one enabled, associated plex with an enabled log subdisk and at least two read-write mode plexes.
An attempt to attach an unassociated plex fails if the putil0 field is not empty. This makes it possible to prevent use of a plex by using vxedit set to set the putil0 field to a non-empty string. The putil0 field can then be cleared with either vxedit set or with vxmend clear putil0.
The det operation changes the state for an ACTIVE or CLEAN plex to STALE. The next time the volume is started, the plex is re-attached automatically.
The raid5 usage type supports the following keywords as described here:
If a plex has a layout other than RAID, the plex is attached as a RAID-5 log plex for the RAID-5 volume. If the volume has no RAID-5 log plexes, the log length for the volume is set to the length of the smallest log plex being attached. If the volume already has at least one log plex, a plex can only be attached as a log plex if its contiguous length is at minimum the volume's log length. RAID-5 log plexes cannot be sparse in respect to the volume's log length; attempts to attach a sparse log plex fail.
If the RAID-5 volume is not enabled, log plexes are attached and marked as STALE. If the RAID-5 volume is enabled and has no log plexes, attaching a log plex causes plexes being attached as log plexes to be zeroed before they are enabled. Otherwise, the new log plexes are attached write-only and the contents of the existing log plexes are copied to the new log plexes using ATOMIC_COPY ioctls, after which the logs are enabled.
See vxintro(1M) for a list of standard exit codes.
vxplex att vol02 vol02-03
Temporarily detach plex vol03-03 from its volume:
vxplex det vol03-03
Dissociate plex vol01-03 from the plexes vol01-01 through vol01-03 on volume vol01:
vxplex dis vol01-03
Last updated: 17 Jul 2008
Copyright ©2009 Symantec Corporation
All rights reserved.