![]() |
< Previous | Next > |
Product: Storage Foundation for Databases Guides | |
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide |
Preparing Hosts and Storage for Database FlashSnapSetting Up HostsDatabase FlashSnap requires sufficient VERITAS Volume Manager disk space, and can be used on the same host that the database resides on (the primary host) or on a secondary host. Setting up a storage configuration for Database FlashSnap operations is a system administrator's responsibility and requires superuser (root) privileges. Database FlashSnap utilities do not address setting up an appropriate storage configuration. Single-Host ConfigurationThe following figure, Example of a Database FlashSnap Solution on a Primary Hostshows the suggested arrangement for implementing Database FlashSnap solutions on the primary host to avoid disk contention. Example of a Database FlashSnap Solution on a Primary Host Click the thumbnail above to view full-sized image. Two-Host ConfigurationAs shown in the figure below, Example of an Off-Host Database FlashSnap Solution,a Database FlashSnap configuration with two hosts allows CPU- and I/O-intensive operations to be performed for online backup and decision support without degrading the performance of the primary host running the production database. A two-host configuration also allows the snapshot database to avoid contending for I/O resources on the primary host. For off-host processing applications, both the primary and secondary hosts need to share the storage in which the snapshot database is created. Both the primary and secondary hosts must be able to access the disks containing the snapshot volumes. Example of an Off-Host Database FlashSnap Solution Click the thumbnail above to view full-sized image. Host and Storage RequirementsBefore using Database FlashSnap, ensure that:
In addition, before attempting to use Database FlashSnap with two hosts, ensure that:
Creating a Snapshot Mirror of a Volume or Volume Set Used by the DatabaseWith Database FlashSnap, you can mirror the volumes used by the database to a separate set of disks, and those mirrors can be used to create a snapshot of the database. These snapshot volumes can be split and placed in a separate disk group. This snapshot disk group can be imported on a separate host, which shares the same storage with the primary host. The snapshot volumes can be resynchronized periodically with the primary volumes to get recent changes of the datafiles. If the primary datafiles become corrupted, you can quickly restore them from the snapshot volumes. Snapshot volumes can be used for a variety of purposes, including backup and recovery, and creating a clone database. You must create snapshot mirrors for all of the volumes used by the database datafiles before you can create a snapshot of the database. This section describes the procedure used to create snapshot mirrors of volumes. You can use the vxsnap CLI command or the GUI to create a snapshot mirror. Creating a snapshot mirror using the GUI is relatively easy. Because the time required to synchronize a snapshot mirror can be long, using the command line is recommended when resynchronizing snapshot mirrors.
![]() ![]()
![]()
If you require a backup of the data in the snapshot, use an appropriate utility or operating system command to copy the contents of the snapshot to tape or to some other backup medium. The following example shows the steps involved in creating a snapshot mirror for the volume data_vol belonging to the disk group PRODdg. Prepare the volume data_vol for mirroring: # vxsnap -g PRODdg prepare data_vol alloc=PRODdg01 Verify that FastResync is enabled: # vxprint -g PRODdg -F%fastresync data_vol on Verify that a DCO and a DCO log are attached to the volume: # vxprint -g PRODdg -F%hasdcolog data_vol on Create a snapshot mirror of data_vol: # vxsnap -g PRODdg addmir data_vol alloc=PRODdg02 # vxprint -g PRODdg -F%name -e"pl_v_name in \"data_vol\"" data_vol-01 data_vol-02 ![]() Decide which data plex you want to use and set the dbed_flashsnap tag for it: # vxedit -g PRODdg set putil2=dbed_flashsnap data_vol-02 Verify that the dbed_flashsnap tag has been set to the desired data plex, data_vol-02: # vxprint -g PRODdg -F%name -e"pl_v_name in \"data_vol\" \ && p2 in \"dbed_flashsnap\"" data_vol-02 To verify that the snapshot volume was created successfully, use the vxprint -g <dg> command as follows: # vxprint -g PRODdg v data_vol fsgen ENABLED 4194304 - ACTIVE - - pl data_vol-01 data_vol ENABLED 4194304 - ACTIVE - - sd PRODdg03-01 data_vol-01 ENABLED 4194304 0 - - - pl data_vol-02 data_vol ENABLED 4194304 - SNAPDONE - - sd PRODdg02-01 data_vol-02 ENABLED 4194304 0 - - - dc data_vol_dco data_vol - - - - - - v data_vol_dcl gen ENABLED 560 - ACTIVE - - pl data_vol_dcl-01 data_vol_dcl ENABLED 560 - ACTIVE - - sd PRODdg01-01 data_vol_dcl-01 ENABLED 560 0 - - - pl data_vol_dcl-02 data_vol_dcl DISABLED 560 - DCOSNP - - sd PRODdg02-02 data_vol_dcl-02 ENABLED 560 0 - - - Identify that the specified plex is in the SNAPDONE state. In this example, it is data_vol-02. The snapshot mirror is now ready to be used. Upgrading Existing Volumes to Use VERITAS Volume Manager 4.1The procedure described in this section describes how to upgrade a volume created using a version older than VxVM 4.1 so that it can take advantage of database FlashSnap. ![]() ![]()
In this example, the volume, data_vol, is upgraded to make use of VxVM 4.1 features. Upgrade the disk group, PRODdg. # vxdg upgrade PRODdg Remove the DRL plexes or subdisks, belonging to an earlier version of VxVM, from the volume to be upgraded. # vxassist -g PRODdg remove log data_vol logtype=drl Reattach any snapshot volume back to the primary volume to be upgraded. # vxsnap -g PRODdg snapback SNAP-data_vol Turn off FastResync on the volume to be upgraded. # vxvol -g PRODdg set fastresync=off data_vol Disassociate and remove any older DCO object and DCO volumes. # vxassist -g PRODdg remove log data_vol logtype=dco Upgrade the volume by associating a new DCO object and DCO volume. # vxsnap -g PRODdg prepare data_vol alloc="PRODdg01 PRODdg02" View the existing DCO plexes and plex state. In this scenario, there are enough DCO plexes for the data plexes. Also, no data plex is associated with a DCO plex. # vxprint -g PRODdg v data_vol fsgen ENABLED 4194304 - ACTIVE - - pl data_vol-01 data_vol ENABLED 4194304 - ACTIVE - - sd PRODdg01-01 data_vol-01 ENABLED 4194304 0 - - - pl data_vol-04 data_vol ENABLED 4194304 - SNAPDONE - - sd PRODdg02-03 data_vol-04 ENABLED 4194304 0 - - - dc data_vol_dco data_vol - - - - - - v data_vol_dcl gen ENABLED 560 - ACTIVE - - pl data_vol_dcl-01 data_vol_dcl ENABLED 560 - ACTIVE - - sd PRODdg01-02 data_vol_dcl-01 ENABLED 560 0 - - - pl data_vol_dcl-02 data_vol_dcl ENABLED 560 - ACTIVE - - sd PRODdg02-02 data_vol_dcl-02 ENABLED 560 0 - - - Convert the data plex state from SNAPDONE to ACTIVE. # vxplex -g PRODdg convert state=ACTIVE data_vol-04 Associate the data plex with a new DCO plex and convert it back to a SNAPDONE state. # vxplex -g PRODdg -o dcoplex=data_vol_dcl-02 convert state=SNAPDONE data_vol-04 # vxprint -g PRODdg pl data_vol-03 - DISABLED 4194304 - - - - sd PRODdg02-01 data_vol-03 ENABLED 4194304 0 - - - v data_vol fsgen ENABLED 4194304 - ACTIVE - - pl data_vol-01 data_vol ENABLED 4194304 - ACTIVE - - sd PRODdg01-01 data_vol-01 ENABLED 4194304 0 - - - pl data_vol-04 data_vol ENABLED 4194304 - SNAPDONE - - sd PRODdg02-03 data_vol-04 ENABLED 4194304 0 - - - dc data_vol_dco data_vol - - - - - - v data_vol_dcl gen ENABLED 560 - ACTIVE - - pl data_vol_dcl-01 data_vol_dcl ENABLED 560 - ACTIVE - - sd PRODdg01-02 data_vol_dcl-01 ENABLED 560 0 - - - pl data_vol_dcl-02 data_vol_dcl DISABLED 560 - DCOSNP - - sd PRODdg02-02 data_vol_dcl-02 ENABLED 560 0 - - - In this scenario, there are fewer DCO plexes than data plexes. # vxprint -g PRODdg pl data_vol-03 - DISABLED 4194304 - - - - sd PRODdg02-01 data_vol-03 ENABLED 4194304 0 - - - v data_vol fsgen ENABLED 4194304 - ACTIVE - - pl data_vol-01 data_vol ENABLED 4194304 - ACTIVE - - sd PRODdg01-01 data_vol-01 ENABLED 4194304 0 - - - pl data_vol-04 data_vol ENABLED 4194304 - ACTIVE - - sd PRODdg02-03 data_vol-04 ENABLED 4194304 0 - - - dc data_vol_dco data_vol - - - - - - v data_vol_dcl gen ENABLED 560 - ACTIVE - - pl data_vol_dcl-01 data_vol_dcl ENABLED 560 - ACTIVE - - sd PRODdg01-02 data_vol_dcl-01 ENABLED 560 0 - - - Add a DCO plex to the DCO volume using the vxassist mirror command. # vxsnap -g PRODdg addmir data_vol_dcl alloc=PRODdg02 Associate the data plex with the new DCO plex and convert it to a SNAPDONE state. # vxplex -g PRODdg -o dcoplex=data_vol_dcl-02 convert state=SNAPDONE data_vol-04 # vxprint -g PRODdg pl data_vol-03 - DISABLED 4194304 - - - - v data_vol fsgen ENABLED 4194304 - ACTIVE - - pl data_vol-01 data_vol ENABLED 4194304 - ACTIVE - - sd PRODdg01-01 data_vol-01 ENABLED 4194304 0 - - - pl data_vol-04 data_vol ENABLED 4194304 - SNAPDONE - - sd PRODdg02-03 data_vol-04 ENABLED 4194304 0 - - - dc data_vol_dco data_vol - - - - - - v data_vol_dcl gen ENABLED 560 - ACTIVE - - pl data_vol_dcl-01 data_vol_dcl ENABLED 560 - ACTIVE - - sd PRODdg01-02 data_vol_dcl-01 ENABLED 560 0 - - - pl data_vol_dcl-02 data_vol_dcl DISABLED 560 - DCOSNP - - sd PRODdg02-02 data_vol_dcl-02 ENABLED 560 0 - - - |
^ Return to Top | < Previous | Next > |
Product: Storage Foundation for Databases Guides | |
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide | |
VERITAS Software Corporation
www.veritas.com |