Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
VERITAS Volume Manager 3.1 Administrator's Guide: for HP-UX 11i and HP-UX 11i Version 1.5 > Chapter 6 Volume Tasks

Mirroring a Volume

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

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:

  1. Select menu item 5 (Mirror volumes on a disk) from the vxdiskadm main menu.

  2. 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
  3. 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
  4. 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.
  5. 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:

  1. Optionally stop user activity for a short time to improve the consistency of the backup.

  2. Dissociate one of the volume mirrors (vol01-01, for this example) using the following command:

    # vxplex dis vol01-01 
  3. Create a new, temporary volume that uses the dissociated plex, using the following command:

    # vxmake -U gen vol tempvol plex=vol01-01 
  4. Start the temporary volume, using the following command:

    # vxvol start tempvol
  5. Perform appropriate backup procedures, using the temporary volume.

  6. Stop the temporary volume, using the following command:

    # vxvol stop tempvol
  7. Dissociate the backup plex from its temporary volume, using the following command:

    # vxplex dis vol01-01 
  8. Reassociate the backup plex with its original volume to regain redundancy of the volume, using the following command:

    # vxplex att vol01 vol01-01
  9. Remove the temporary volume, using the following command:

    # vxedit rm tempvol

For information on an alternative online backup method using the vxassist command, see “Performing Online Backup”.

Removing a Mirror

When a mirror is no longer needed, you can remove it. Removal of a mirror is required in the following instances:

  • to provide free disk space

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

  • to remove a temporary mirror created to backup a volume and is no longer required

  • to change the layout of a mirror from concatenated to striped, or back

CAUTION: To save the data on a mirror to be removed, the configuration of that mirror must be known. Parameters from that configuration (stripe unit size and subdisk ordering) are critical to the creation of a new mirror to contain the same data. Before this type of mirror is removed, its configuration must be recorded.
NOTE: The last valid plex associated with a volume cannot be removed.

To dissociate and remove a mirror from the associated volume, use the following command:

# vxplex -o rm dis plex_name

For example, to dissociate and remove a mirror named vol01-02, use the following command:

# vxplex -o rm dis vol01-02

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

NOTE:

You can first dissociate the plex and subdisks, then remove them with the commands: # vxplex dis plex_name # vxedit -r rm plex_name

Together, these commands accomplish the same as vxplex -o rm dis.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2000 Hewlett-Packard Development Company, L.P.