 |
» |
|
|
 |
 |  |  |  |  | NOTE: You may need an additional license to use this feature. |  |  |  |  |
A mirror is a copy of a volume. The mirror copy is not stored
on the same disk(s) as the original copy of the volume. Mirroring
a volume ensures that the data in that volume is not lost if one
of your disks fails.  |  |  |  |  | NOTE: To mirror the root disk, use vxrootmir(1M). See the manual page for details. |  |  |  |  |
Creating a Volume with Dirty Region
Logging Enabled |  |
To create a mirrored volume with Dirty Region Logging (DRL)
enabled, create a mirrored volume with a log with this command: # vxassist make volume_name length layout=mirror,log |
The vxassist command creates one log plex for each log subdisk,
by default. Mirroring an Existing Volume |  |
A mirror (plex) can be added to an existing volume with the vxassist command, as follows: # vxassist mirror volume_name |
For example, to create a mirror of the volume voltest, use the following command: # vxassist mirror voltest |
Another way to mirror an existing volume is by first creating
a plex and then associating it with a volume, using the following
commands: # vxmake plex plex_name sd=subdisk_name ... # vxplex att volume_name plex_name |
Mirroring All Volumes |  |
To mirror all existing volumes on the system to available
disk space, use the following command: # /etc/vx/bin/vxmirror -g diskgroup -a |
To configure the Volume Manager to create mirrored volumes
by default, use the following command: # /etc/vx/bin/vxmirror -d yes |
If you make this change, you can still make unmirrored volumes
by specifying nmirror=1 as an attribute to the vxassist command. For example, to create an unmirrored
20-megabyte volume named nomirror, use the following command: # vxassist make nomirror 20m nmirror=1
|
Mirroring Volumes on a VM Disk |  |
Mirroring the volumes on a VM disk gives you one or more copies
of your volumes in another disk location. By creating mirror copies
of your volumes, you protect your system against loss of data in
case of a disk failure. This task only mirrors concatenated volumes.
Volumes that are already mirrored or that contain subdisks that
reside on multiple disks are ignored. To mirror volumes on a disk, make sure that the target disk
has an equal or greater amount of space as the originating disk
and then do the following: Select menu item 5 (Mirror volumes on a disk) from the vxdiskadm main menu. At the following prompt, enter the disk name of the
disk that you wish to mirror: Mirror volumes on a disk Menu: VolumeManager/Disk/Mirror This operation can be used to mirror volumes on a disk. These volumes can be mirrored onto another disk or onto any available disk space. Volumes will not be mirrored if they are already mirrored. Also, volumes that are comprised of more than one subdisk will not be mirrored. Enter disk name [<disk>,list,q,?] disk02
|
At the following prompt, enter the target disk name
(this disk must be the same size or larger than the originating
disk): You can choose to mirror volumes from disk disk02 onto any available disk space, or you can choose to mirror onto a specific disk. To mirror to a specific disk, select the name of that disk. To mirror to any available disk space, select "any". Enter destination disk [<disk>,list,q,?] (default: any) disk01 |
At the following prompt, press Return to make the mirror: The requested operation is to mirror all volumes on disk disk02 in disk group rootdg onto available disk space on disk disk01. NOTE: This operation can take a long time to complete. Continue with operation? [y,n,q,?] (default: y) |
The vxdiskadm program displays the status of the mirroring operation, as
follows: Mirror volume voltest-bk00 ... |
Mirroring of disk disk01 is complete.
|
At the following prompt, indicate whether you want to
mirror volumes on another disk (y) or return to the vxdiskadm main menu (n): Mirror volumes on another disk? [y,n,q,?] (default: n)
|
Backing Up Volumes Using Mirroring |  |
If a volume is mirrored, backup can be done on that volume
by taking one of the volume mirrors offline for a period of time.
This removes the need for extra disk space for the purpose of backup
only. However, it also removes redundancy of the volume for the
duration of the time needed for the backup to take place.  |  |  |  |  | NOTE: The information in this section does not apply to RAID-5. |  |  |  |  |
You can perform backup of a mirrored volume on an active system
with these steps: Optionally stop user activity for a short
time to improve the consistency of the backup. Dissociate one of the volume mirrors (vol01-01, for this example) using the following command: Create a new, temporary volume that uses the dissociated
plex, using the following command: # vxmake -U gen vol tempvol plex=vol01-01 |
Start the temporary volume, using the following command: Perform appropriate backup procedures, using the temporary
volume. Stop the temporary volume, using the following command: Dissociate the backup plex from its temporary volume,
using the following command: Reassociate the backup plex with its original volume
to regain redundancy of the volume, using the following command: # vxplex att vol01 vol01-01 |
Remove the temporary volume, using the following command:
For information on an alternative online backup method using
the vxassist command, see “Performing Online Backup”.
|