Advanced Backup Techniques
Advanced Backup Techniques
Transaction X0, Y0
Write X1 X1, Y0
backup
X1, Y0
Write Y1 X1, Y1
jfslog
# lsvg -l newvg
newvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfslog 1 3 3 open/syncd N/A
lv03 jfs 1 3 3 open/syncd /fs1
/backup
File system
/fs1
jfslog
Copy 1 Copy 2
Copy 3
syncvg
jfslog
# unmount /backup
# rmfs /backup
• When a write or delete occurs in the snappedFS, the affected blocks are
copied into existing snapshots
© Copyright IBM Corporation 2012
JFS2 snapshot mechanism (1 of 2)
IBM Power Systems
snappedFS
inode1 inode2
snapshot
inode1 inode2
snappedFS
inode1 inode2
snapshot
inode1 inode2
# smit jfs2
. . .
List Snapshots for an Enhanced Journaled File System
Create Snapshot for an Enhanced Journaled File System
Mount Snapshot for an Enhanced Journaled File System
Remove Snapshot for an Enhanced Journaled File System
Unmount Snapshot for an Enhanced Journaled File System
Change Snapshot for an Enhanced Journaled File System
Rollback an Enhanced Journaled File System to a Snapshot
[Entry
[Entry Fields]
Fields]
File
File System
System Name
Name /home/myfs
/home/myfs
SIZE
SIZE of snapshot
of snapshot
Unit
Unit Size
Size Megabytes
Megabytes ++
** Number
Number of
of units
units [500]
[500] ##
Create
Create Snapshot
Snapshot for
for an
an Enhanced
Enhanced Journaled
Journaled File
File System
System in
in File
File System
System
[Entry
[Entry Fields]
Fields]
File
File System
System Name
Name /home/myfs
/home/myfs
** Snapshot
Snapshot Name
Name [mysnap]
[mysnap]
• Internal snapshot attribute must be set to yes on creation of the file system:
Snapshots
Snapshots for
for /home/myfs2
/home/myfs2
Current Name
Current Name Time
Time
mysnap
mysnap Wed
Wed 19
19 Nov
Nov 08:44:33
08:44:33 2008
2008
mysnap2
mysnap2 Fri 21 Nov 09:33:33 2008
Fri 21 Nov 09:33:33 2008
** mysnap3
mysnap3 Mon
Mon 24
24 Nov
Nov 14:03:18
14:03:18 2008
2008
## snapshot
snapshot -q
-q /home/myfs
/home/myfs
Snapshots
Snapshots for
for /home/myfs
/home/myfs
Current
Current Location 512-blocks
Location 512-blocks Free
Free Time
Time
** /dev/fslv06
/dev/fslv06 262144
262144 261376
261376 Wed
Wed May
May 66 18:15:11
18:15:11 2009
2009
For example:
# backsnap -m /mntsnapshot -s size=16M –I –f /dev/rmt0
/home/myfs
© Copyright IBM Corporation 2012
Using a JFS2 internal snapshot to back up
IBM Power Systems
For example:
# backsnap –n mysnap -s size=16M -i -f/dev/rmt0
/home/myfs
• External snapshot:
– The snapshot report identifies the size and amount of free space
– If the snapshot needs more space:
# snapshot –o size=+1 snapshotLV
• Internal snapshot:
– Shares logical volume with the snappedFS
# df –m snappedFS
– If snappedFS is out of space, try to free up space – possibly delete old
snapshots
# snapshot –d –n snapshot_name snappedFS
2. True or false: The creation of a JFS split copy marks all of the
split mirror copies as stale.
3. True or false: After the creation of a JFS split mirror copy, the
administrator needs to mount the new file system in order to
access the split copy.
1. True or false: The creation of a snapshot volume group marks all copies in the
snapshot as stale.
The answer is false.
2. True or false: The creation of a JFS split copy marks all of the split mirror copies
as stale.
The answer is true.
3. True or false: After the creation of a JFS split mirror copy, the administrator needs
to mount the new file system in order to access the split copy.
The answer is false.
4. To access a SAN Copy of an active volume group on the source system, use the
command:
a. joinvg
b. importvg
c. recreatevg
The answer is recreatevg.
© Copyright IBM Corporation 2012
Exercises: Advanced backup techniques
IBM Power Systems