Beruflich Dokumente
Kultur Dokumente
Module Objectives
By the end of this module, you should be able to: Describe the function of Snapshot copies Explain the benefits of Snapshot copies Identify and execute Snapshot commands Create and delete a Snapshot copy Configure and modify Snapshot options Explain the importance of the .snapshot directory Describe disk space consumed by a Snapshot for volumes and aggregates Schedule a Snapshot copy through FilerView Configure and manage the Snapshot reserve
Overview
Snapshot Technology
A Snapshot copy is a read-only image of a volume at a point in time The benefits of Snapshot technology are:
Nearly instantaneous application data backups Fast recovery of data lost due to:
Accidental data deletion Accidental data corruption
Inodes
An inode is a data structure that is used to represent file system objects such as files and directories An inode is 192 bytes that describes a files attributes and includes the following:
Type of file (regular file, directory, link, and so on) Size Owner, group, permissions Pointer to xinode (ACLs) Complete file data if the file is 64 bytes or less Pointers to data blocks
2008 NetApp. All rights reserved. 6
Managing Inodes
To verify the amount of inodes:
df -i
12
Active Data
File X
Disk Blocks
13
Active Data
File X
Snapshot
File X
Disk Blocks
Consistent point-in-time copy Ready to use (read-only) Consumes no space* * With the exception of 4 kB replicated root inode block that defines the Snapshot
14
Active Data
File/LUN: X
Snapshot
File/LUN: X
Disk Blocks
New Data
15
Active Data
File X
Snapshot
File X
Disk Blocks
Active version of X is now composed of blocks A, B, C Snapshot version of X remains composed of blocks A, B, C Atomically moves active data to new consistent state
2008 NetApp. All rights reserved. 16
17
Volumes
Volume default for Snapshot reserve is 20% of volume Administrators can restore the entire volume or one or more files
18
Snapshot Reserve
Aggregates Each aggregate has 5% allocated for Snapshot reserve and 10% allocated for WAFL. Flexible Volumes Each volume has 20% allocated for Snapshot reserve. The remainder is used for client data. Snapshot Reserve The amount of space allocated for Snapshot reserve is adjustable. To use this space for data (not recommended), you must manually override the allocation used for Snapshot copies.
Aggregate Space
80%
20%
Snap Reserve 5%
19
FilerView
21
Recovering Data
When recovering data, you have two options:
Copy the data from a Snapshot copy Use SnapRestore
22
Snapshot Options
Disable automatic Snapshot copies:
vol options volname nosnap [on|off]
Make the .snapshot directory invisible to clients, and turn off access to the .snapshot directory:
vol options volname nosnapdir [on|off]
23
mnt
etc
usr
var
system
vol0
.snapshot Directory
nightly.0 Directory
nightly.1 Directory
other other other other other other other other other other
12288 12288 12288 12288 12288 12288 12288 12288 12288 12288
Jan Jan Jan Jan Jan Jan Jan Jan Jan Jan
29 29 29 29 29 29 29 29 29 29
16:19 16:19 16:19 16:19 16:19 16:19 16:19 16:19 16:19 16:19
hourly.0 hourly.1 hourly.2 hourly.3 hourly.4 hourly.5 nightly.0 nightly.1 weekly.1 weekly.2
25
Snapshot copies are visible to Windows clients that have File Manager configured to display hidden files.
26
27
Retains:
Two most recent nightly Six most recent hourly
Snapshot Schedule
Function Entering the command with no arguments prints the current Snapshot schedule for all volumes in the system. Function Entering the command with just a volume name argument prints the schedule for the specified volume.
Function The values in these positions specify how many Snapshot copies will be saved for each interval (weekly, daily, and hourly). In the example, the zero means that no weekly Snapshot copy will be made or saved.
Function The hourly variable has an optional list attached to it. Enter values here to specify which times Snapshot copies are taken. If you dont enter a list, the default is hourly.
The Snapshot schedule above keeps the following Snapshot copies for vol2: No weekly Snapshot copies Two nightly Snapshot copies Six hourly Snapshot copies taken at 8 a.m., 12 p.m., 4 p.m., and 8 p.m.
2008 NetApp. All rights reserved. 29
30
Space Usage
31
FilerView
To delete:
A particular Snapshot copy:
snap delete [ -A | -V ] [volumename] [snapshotname]
%Total The % total column shows the relationship between accumulated Snapshot copies and the total disk space consumed by the volume. Values in parentheses show the contribution of this individual Snapshot copy.
Date The date column shows the date and time the Snapshot copy was taken. Time is indicated on the 24-hour clock, and in this example reflects the hours set in the automatic Snapshot schedule.
Name Scheduled Snapshot copies are automatically renumbered as new ones are taken so that the most recent is always .0. This also ensures that the file with the highest number is always the oldest.
33
34
try, disrupt
volume, snap_reserve, space_reserve 1-100 oldest_first, newest_first scheduled, user_created, prefix, none <string>
35
disrupt
Deletes snapshot copies locked by applications that move data (such as SnapMirror), dump data, and restore data (mirror and dumps are aborted).
36
37
snap_reserve
The reserve is nearly full
space_reserve
The space reserved is nearly full (useful for volumes with fractional_reserve < 100)
38
39
40
newest_first
Delete newest snapshots first
snap autodelete <vol-name> <option> <value>... Supported options and corresponding values: commitment trigger target_free_space delete_order defer_delete prefix try, disrupt volume, snap_reserve, space_reserve 1-100 oldest_first, newest_first scheduled, user_created, prefix, none <string>
41
user_created
Delete the administrator-created Snapshot copies last
prefix
Delete the Snapshot copies with names matching the prefix String last
42
43
44
45
Module Summary
In this module, you should have learned to: The function and benefits of Snapshot copies How to create and delete Snapshot copies How to schedule a Snapshot copy using the CLI and FilerView How disk space is consumed by a Snapshot copy for volumes and aggregates
46
Exercise
Module 12: Snapshot Copies Estimated Time: 45 minutes
Answers
Module 12: Snapshot Copies
What are some of the NetApp products that are based on Snapshot technology?
SnapRestore SnapMirror SnapVault SnapManager SnapDrive FlexClone
49
50