You are on page 1of 5

SNAPSHOTS TECHNIQUES

-Full-Copy:
Fully synchronized
-Copy-on-Write
Data has changed
LIFE CYCLE
1-Create PITC (point in time copy)
2-Use PITC (testing, backup)
3-Update PITC / Break link / Destroy PITC
SNAPSHOTS WITH FASTRESYNC
Data change objects are associated with the volume
Track changes of the volume when plex are deassociated
DCO Volume ->updates to the volume are recorded in DCO logs
Attach DCO log to the volume to loggin
During reattach or restore operation FastResync is used to \
quickly reassociate a snapshot plex with the original volume
Resynchronization involves syncing only changed region
CREATE AND MANGING TRADICIONAL VOLUME SNAPSHOTS
Enable fastresync for tradicional snapshots(optional):
vxassist -g diskgroup addlog orig_vol logtype-dco
vxvol -g diskgroup set fastresync=on orig_vol
Create:
vxassist -g diskgroup [-b] snapstart orig_vol
vxassist -g diskgroup snapshot [orig_vol] [snap_vol]
Reassociate:
vxassist -g diskgroup snapback snap_vol
or
vxassist -g diskgroup -o resyncfronreplica snapback snap_vol
Dissociate:
vxassist -g diskgroup snapclear snap_vol
Destroy:
vxassit -g diskgroup remove volume snap_vol
DISPLAY TRADICIONAL VOLUME SNAPSHOT
vxprint -g appdf -htr
INSTANT VOLUME SNAPSHOTS
can be the same size as volume or just a fraction
Can wait for syncronizzation or an immediate
FULL-SIZE INSTANT VOLUME SNAPSHOTS
1-Create PITC
Create Right away as a separate volume
Employs the copy-on-write
2-Use PITC
Synchronization is in background
Instatly use the snapshot
3-uPDATE pitc (refresh o restore) /

Break link (clear association to make independent volume) /


Destroy PITC
SPLIT-MIRROR INSTANT VOLUME SNAPSHOTS
The volume has 3 plexes,
and we separate une plex from volume
1-Create PITC
2-USE PITC
3-BreaK link, Update PITC, Destroy PITC
LINKED BREAK-OFF VOLUME SNAPSHOTS
-Are volume-level snapshots
-Can be in the same or different diskgroup
-Make use of DCO to quickly reassociate
-Make use of Volume Manager's link object
Enable FastResync for Instant Snapshots:
vxsnap -g diskgroup prepare orig_vol
vxsnap -g appdg prepare appvol
Allocate the storage using one of these methos
-Third-mirror break-off:
vxsnap -g diskgroup addmir volume_name
Use an existing ACTIVE plex in the volume
-Full-sized Instant:
Create an empty volume to use as a full-sized
volume snapshot
Break off an existing plex to
create the new snapshot:
vxsnap -g diskgroup make
source=orig_vol/newvo=snap_vol/plex=plex_name
Break off the mirror that was added by the vxsnap command:
vxsnap -g diskgroup make \
source=orig_vol/newvol=snap_vol/nmirror=number
Specify an existing empty volume to be used as the snapshot:
xvsnap -g diskgroup make source=orig_vol/snapvol=snap_vol
-Update:
vxsnap -g
vxsnap -g
vxsnap -g
vxsnap -g

diskgroup
diskgroup
diskgroup
diskgroup

refresh snap_vol source=orig_vol


reattach snap_vol source=orig_vol
restore snap_vol source=snap_vol
dis snap_vol

-Remove:
vxedit -d diskgroup -r rm snap_vol
PREPARING THE LINKED BREAK-OFF SNAPSHOT
1-Create a snapshot volume the same size

as the original volume:


LEN='vxprint -g origgroup -F%len orig_vol'
vxassist -g snapgroup make snap_vol $LEN
2-Enable FastResync for the original and snapshot volumes:
vxsnap -g snapgroup prepare snap_vol
3-Start snapshot syncronization:
vxsnap -g origgroup addmir orig_vol mirvol=snap_vol \
mirdg=snapgroup
TAKING, REATTACHING AND REMOVING
THE LINKED BREAK-OFF SNAPSHOT
4-Take the snapshot:
vxsnap -g origgroup make \
source=orig_vol/snap=snap_vol/snapdg=snapgroup
5-Reattach the snapshot to re-link and re-sync the snapshot
vxsnap -g snapgroup reattach snap_vol \
source=orig_vol sourcedg=origgroup
6-Remove the association:
vxsnap -g origgroup rmmir orig_vol
mirvol=snap_vol mirdg=snapgroup
DISPLAY INSTANT VOLUME SNAPSHOT INFORMATION
vxsnap -g diskgroup print [orig_vol]
vxsnap -g appdg print
FREEZING A VXFS FOT THIRD-PARTY
PITC TECHNOLOGIES
fsfreeze -t timeout -f filename|-m "mntpt1 ..." user_command
Revisa que el snaptshot de otro proveedor
tenga la data correcta
fsfreeze -t 20 -m "/app1 /app2" custom_snap_script
cat mntlist
/app1
/app2
fsfreeze -f mnt mntlist custom_snap_script
USING VOLUME SNAPSHOTS FOR
OFF-HOST PROCESING
1-Split snapshots into a separate disk group and deport
-Enable FastResync on the volume:
vxsnap -g appdg prepare appvol
-Add an additional mirror for use as snapshot volume:
vxsnap -g appdg addmir appvol
-Suspend updates to the volume if the application requires
data consistency, such as a database
-Create a full-sized instant snapshot for the volume:
vxsnap -g appdg make \
source=appvol /newvol=snap-appvol/nmirror=1

-If you temporarily suspended updates to the


volume by a database, release the tables
from hot-backup mode
-Split the snapshot volume into a separate disk group
vxdg split appdg offhostdg snap-appvol
-Deport the disk group:
vxdg deport offhostdg
2-Import on another host for processing
-On the off-host processinf host,
import the disk group
vxdg import offhostdg
vxvol -g offhostdg start snap-appvol
-To perform off-host processing, mount the
snapshot volume
mount fstype /dev/vx/dsk/offhostdg/snap-appvol /snap1
-When processing is complete, unmount the snapshot
umount /snap1
-Deport the disk group
vxdg deport offhostdg
3=Reimport, rejoin, and resynchronize
-On the primary host, reimport the disk group:
vxdg import offhostdg
-Rejoin the disk group with the original disk group:
vxdg join offhostdg appdg
-If necessary, restart the snapshot volume:
vxrecover -g appdg -m snap-appvol
-Refresh the snapshot volume with the original volume:
vxsnap -g appdg refresh snap-appvol source=appvol