Home > Veritas Storage Foundation™ Volume Manager Manual Pages
VXEDIT (1M) |
Maintenance Commands |
vxedit [-dpPsvV ] [-g diskgroup] rename oldname newname
vxedit [-dfpPrsvV ] [-g diskgroup] rm name...
vxedit [-dfGpPrsvV ] [-e pattern] [-g diskgroup] set attribute=value... [name...]
Each invocation can be applied to only one disk group at a time. Any name or oldname operands will be used as record names to determine a default disk group, according to the standard disk group selection rules described in vxintro(1M). If no name or oldname operands are given, then the disk group defaults to the default disk group unless a disk group has been specified with the -g diskgroup option. If this option is not specified, the default disk group is determined using the rules given in the vxdg(1M) manual page.
- cc
- Change a comment using a search-replacement specification similar to that used by sed in RVG, RLINK, volume, plex, subdisk, disk media, or disk group records within the selected disk group. The records to be changed are those that match the pattern specified with -e pattern option and those specified by the name operands. See vxintro(1M) for a description of Veritas Volume Manager search patterns. If no search pattern is specified with -e, and no name operands are given, then the change is made to all records whose comment field matches the search regular expression.
The search string is a regular expression, in the form accepted by the function regcmp(3C). The regular expression in the search string is used to determine which substring of the comment field is to be changed. The replace string represents the new string to use as a replacement for the matched part of the comment.
An ampersand (&) in the replace string is replaced by the substring of the comment matched by the regular expression. An occurrence of \n in the replace string, where n is a single digit between 1 and 9, will be replaced by the substring matched by a parenthetical section of the regular expression; the regular expression is followed by $n.
The / character following the replace string is optional. If the / is given, then it can be followed by the letters g or p, or both. If a g is given, then all matches in a comment are replaced, rather than just the first match. If the letter p is given, then the resulting comment strings are written to the standard output, immediately preceded (on the same line) by the name of the record.
If the -r option is given, the operation is applied recursively to records associated with the selected records (to plexes and subdisks for selected volume records, and to subdisks for selected plex records). Recursion (when selected) applies regardless of the -p, and -s options.
Each record to be changed is changed only once, even if the record could be matched several times through combinations of name arguments, search patterns, and the -r option.
For example, the following command changes all subdisk comments that begin with ``Henry'' and a second word beginning with an uppercase letter to begin with ``Frank'' and the same second word:
vxedit -s cc '/^Henry ([A-Z])$1/Frank \1/p'This command also lists the resulting comment fields.
- rename
- Change the name of a volume, plex, subdisk, disk media, data change object (DCO), or snap object record from oldname to newname. A record cannot be renamed if the tutil0 field is set, which indicates that an operation is in progress that involves the record.
Note: RVG and RLINK records cannot be renamed.
- rm
- Remove RVG, RLINK, volume, plex, or subdisk records from the selected disk group. Disk media records can be removed with vxdg rmdisk. Disk access records can be removed with vxdisk rm.
Removing a subdisk requires that the subdisk be dissociated. Removing a plex requires that the plex be dissociated and that it have no associated subdisks. Removing a volume requires that it have no associated plexes. Removing an RVG requires that it have no associated RLINKs or volumes. The -r option can be specified to recursively remove a volume and all plex and subdisk records associated with it, or to remove an RVG and all volume, RLINK, plex, and sub disk records associated with it, or to remove a plex and all subdisk records associated with it. If the -r options is provided, subvolumes are also removed. Even when removing with -r, a named plex or subdisk cannot be associated with a volume or plex, respectively.
The -f option is required to remove an enabled volume. A volume cannot be removed, even with -f, if the corresponding volume block or raw device is open or mounted.
- set
- Set a field within an RVG, RLINK, volume, plex, subdisk, disk media, or disk group record in the selected disk group. The records to be changed are those that match the pattern specified with the -e pattern option and those specified by the name operands.
The attribute names specify the field to set within the selected records. More than one attribute can be specified in a single invocation. The operands that indicate attribute settings end at the first operand that does not contain an equal sign. An operand of -- can be used to separate the attribute list from record names, even if the first record name contains an equal sign.
If the -r option is given, the operation is applied recursively to records associated with the selected records (to RLINKs, volumes, plexes, subdisks, and subvolumes for selected RVG records, to plexes, subdisks, and subvolumes for selected volume records, and to subdisks and subvolumes for selected plex records). Recursion applies regardless of whether the -p and -s options are specified.
The putil0 field for a plex and subdisk record can be set to prevent utilities from associating the record to a volume or plex. This is a convenient means for reserving a plex, or for reserving a region of disk space (a subdisk).
Changing a non-empty putil0 or tutil0 field requires use of -f. Setting these fields for dissociated plex and subdisk records is generally not a problem. However, for an associated plex or subdisk that is associated (through a plex) with a volume, setting either of these fields can be dangerous, as it can affect the operation of usage types that expect to manage these fields themselves during an operation.
- off
- mode is asynchronous
- override
- mode is synchronous, but will automatically switch to asynchronous if the RLINK becomes inactive due to a disconnection or administrative action
- fail
- mode is synchronous. If synchronous=fail is set and an administrator detaches the Primary RLINK, writes to the RVG are not failed. However, if an RLINK becomes inactive for any other reason, including an administrative detach of the Secondary RLINK, subsequent write requests are failed with an EIO error.
Note: When the protocol for the RLINK is changed, the RLINK is momentarily disconnected. There is no need to resynchronize when the RLINK is reconnected.
- off
- latency protection is disabled
- override
- latency protection is enabled, but will automatically be disabled if the RLINK becomes inactive due to a disconnection or administrative action
- fail
- latency protection is enabled. If the RLINK becomes inactive for any reason, and the latency_high_mark is reached, subsequent write requests are failed with an EIO error.
Note: When DCM protection is activated, the DCMs are used to record the regions that change on the data volumes. The vxrvg command can be used to resynchronize the images when the RLINKs are connected. It should be noted that using DCM to resynchronize an image makes the image inconsistent until the resynchronization completes.
- off
- SRL protection is disabled
- override
- SRL protection is enabled, but will automatically be disabled if the RLINK becomes inactive due to a disconnection or administrative action
- fail
- SRL protection is enabled. If the RLINK becomes inactive for any reason, and SRL overflow is imminent, subsequent write requests are failed with an EIO error.
- autodcm
- SRL protection is enabled. This is the default option for srlprot. If an RLINK begins to overflow the SRL, DCM protection is activated.
- dcm
- SRL protection is enabled. This differs from the "autodcm" protection in that the DCM protection is activated only when the RLINKs disconnect. When the RLINKs are connected, incoming writes are throttled as described above.
If set to on, you are responsible for setting or clearing the writecopy policy flag.
If this flag is clear, then data from an alternate plex will be read to satisfy the volume read operation, but the failing plex will be detached with no action taken to try to fix the problem.
There is seldom (if ever) a reason to turn off this feature.
Setting the writecopy flag to on causes VxVM to copy the data for a write request to a new section of memory before writing it to disk. This guarantees that the same data is written to each plex in a mirrored volume, and that data and parity are written consistently to a RAID-5 volume.
When the operating system hands off a write request to the volume driver, the operating system may continue to change the memory that is being written to disk. VxVM cannot detect that the memory is changing, so it can inadvertently leave plexes with inconsistent contents. This is not normally a problem, because the operating system ensures that any such modified memory is rewritten to the volume before the volume is closed, such as by a clean system shutdown. However, if the system crashes, plexes may be inconsistent.
As DRL and RAID-5 loggng prevent the need for recovering the entire volume, writecopy must be set to on to ensure the consistency of a mirrored (with DRL enabled) volume's plexes or of a RAID-5 volume.
As of VxVM 5.0MP3, memory copy is not always done on mirrored volumes, even if the writecopy policy is set to on. VxVM automatically determines whether a memory copy is required. If the memory contents change during I/O, VxVM identifies this condition, performs a memory copy, and resends the I/O.
Note: If specify_writecopy is set to on, you are responsible for setting or clearing the writecopy policy flag. If specify_writecopy is set to off, VxVM sets the writecopy policy flag based on the volume type.
Note: This field must only be set for one snapshot plex in a volume. Serious errors may occur during snapshot or snapback operations if this field is set to the RID of a plex that is not in the correct DCO volume. No problems occur if the field refers to a non-existent object.
- dgdisable
- The master node disables the disk group for all user or kernel-initiated transactions. First write and final close fail.
This is the default policy.
- leave
- The master node panics instead of disabling the disk group if a log update fails for a user or kernel-initiated transaction (including first write or final close). If the failure to access the log copies is global, all nodes panic in turn as they become the master node.
- requestleave
- The master node exits cleanly from the cluster rather than forcing a panic.
- global
- For a shared disk group, if any node in the cluster reports a disk failure, the detach occurs in the entire cluster. An I/O error results if the disk was in the final active plex of a volume.
This is the default policy.
- local
- If a disk fails for a single node only, the I/O failure is confined to that node. If all nodes report a problem with the failed disk, the disk is detached throughout the cluster. An I/O error results if the disk was in the final active plex of a volume.
vxedit -g shareddg set diskdetpolicy=local shareddg
The dgfailpolicy and diskdetpolicy attributes may also be set on a shared disk group by using the vxdg set command.
Note: This option is not currently supported for RVG and RLINK records.
See vxintro(1M) for a list of standard exit codes.
Last updated: 31 Aug 2008
Copyright ©2009 Symantec Corporation
All rights reserved.