Go to main content

Administering an Oracle® Solaris Cluster 4.4 Configuration

Exit Print View

Updated: November 2019

How to Perform Online Backups for Mirrors (Solaris Volume Manager)

A mirrored Solaris Volume Manager volume can be backed up without unmounting it or taking the entire mirror offline. One of the submirrors must be taken offline temporarily, thus losing mirroring, but it can be placed online and resynchronized as soon as the backup is complete, without halting the system or denying user access to the data. Using mirrors to perform online backups creates a backup that is a "snapshot" of an active file system.

A problem might occur if a program writes data onto the volume immediately before the lockfs command is run. To prevent this problem, temporarily stop all the services running on this node. Also, ensure the cluster is running without errors before performing the backup procedure.

The phys-schost# prompt reflects a global-cluster prompt. Perform this procedure on a global cluster.

This procedure provides the long forms of the Oracle Solaris Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical.

  1. Assume an equivalent role on the cluster node that you are backing up.
  2. Use the metaset command to determine which node has the ownership on the backed-up volume.
    # metaset -s setname
    -s setname

    Specifies the disk set name.

    For more information, see the metaset(8) man page.

  3. Use the lockfs command with the -w option to lock the file system from writes.
    # lockfs -w mountpoint

    See the lockfs(8) man page for more information.

  4. Use the metastat command to determine the names of the submirrors.
    # metastat -s setname -p

    Displays the status in a format similar to the md.tab file.

    See the metastat(8) man page for more information.

  5. Use the metadetach command to take one submirror offline from the mirror.
    # metadetach -s setname mirror submirror

    See the metadetach(8) man page for more information.

    Note -  Reads continue to be made from the other submirrors. However, the offline submirror is unsynchronized as soon as the first write is made to the mirror. This inconsistency is corrected when the offline submirror is brought back online. You do not need to run fsck.
  6. Unlock the file systems and allow writes to continue, using the lockfs command with the -u option.
    # lockfs -u mountpoint 
  7. Perform a file system check.
    # fsck /dev/md/diskset/rdsk/submirror
  8. Back up the offline submirror to tape or another medium.

    Note -  Use the raw device (/rdsk) name for the submirror, rather than the block device (/dsk) name.
  9. Use the metattach command to place the metadevice or volume back online.
    # metattach -s setname mirror submirror

    When the metadevice or volume is placed online, it is automatically resynchronized with the mirror. See the metattach(8) man page for more information.

  10. Use the metastat command to verify that the submirror is resynchronizing.
    # metastat -s setname mirror

    See Managing ZFS File Systems in Oracle Solaris 11.4 for more information.