You can use the snap list command output to determine which Snapshot copies to delete to free the most disk space.
In Sample snap list command output, the cumulative disk space used by Snapshot copies gradually increases from top to bottom.
For example, in the %/used column, the cumulative space used by hourly.1 is 2% and the cumulative space used by hourly.2 is 3%. This is not always the case.
Before trying to conserve space by deleting a large Snapshot file, examine the cumulative values in the snap list output. If two adjacent Snapshot files show little difference in their cumulative values, most of the data referenced by these Snapshot copies is the same. In this case, deleting only one of the Snapshot copies does not free much disk space.
In many cases, you can use the default Snapshot schedule and the default Snapshot reserve because these settings are appropriate for most environments. When you create a new volume, the new volume inherits the Snapshot schedule from the root volume. After you use the volume for several days, check how much disk space the Snapshot copies are consuming in the volume. If the amount seems high, decrease the amount of time that Snapshot copies are kept or increase the Snapshot reserve.
As you use Snapshot copies, continue to watch the statistics change over time. The statistics help you gain a better understanding of how Snapshot copies use disk space.
Caution
As a general rule, avoid deleting Snapshot copies that are not the product of the snap sched command (for example, Snapshot copies generated by SnapMirror or SnapVault commands). Deleting these Snapshot copies could halt the SnapMirror or SnapVault processes. An exception would be Snapshot copies left over from old SnapMirror relationships that you no longer want to maintain. See Releasing partners from a SnapMirror relationship.
The snap sched command deletes obsolete regularly scheduled Snapshot copies automatically; however, you might want to delete a Snapshot copy before the preset interval to increase disk space or because it is a manual Snapshot copy that is no longer needed but is not going to be automatically deleted.
To delete a Snapshot copy manually from a specific volume, complete the following step.
The snap delete command displays ownership information for busy Snapshot copies. This information is useful for determining why a particular Snapshot copy is busy, and whether to stop the activity in progress. For example, if the snap delete command output displays a locked Snapshot copy that is imposing a resource constraint, you can delete that Snapshot copy and free up space.
If a Snapshot copy is locked, the snap delete operation fails until you execute a snapmirror release (see How to release a source from a SnapMirror relationship) or snapvault release (see Releasing SnapVault relationships) command to unlock the Snapshot copy. Snapshot copies are locked because SnapMirror or SnapVault is maintaining them for the next update. Deleting a locked Snapshot copy would prevent SnapMirror or SnapVault from correctly replicating a file or volume as specified in the schedule you set up.
The following example shows how you would delete a SnapMirror Snapshot copy that was locked because SnapMirror needed it for an update:
systemA> snap delete vol0 oldsnap
Can't delete oldsnap: snapshot is in use by snapmirror.
Use 'snapmirror destinations -s' to find out why.
systemA> snapmirror destinations -s vol0
Path Destination
/vol/vol0 systemB:vol0
systemA> snapmirror release vol0 systemB:vol0
systemA> snap delete vol0 oldsnap
The following example shows how you would delete a SnapVault Snapshot copy that was locked because SnapVault needed it for an update:
systemA> snap delete vol0 oldsnap
Can't delete oldsnap: snapshot is in use by snapvault.
Use 'snapvault status -l' to find out why.
systemA> snapvault status -l
SnapVault client is ON.
Source: systemA:/vol/vol0/qt3
Destination systemB:/vol/sv_vol/qt3
....
systemA> snapvault release /vol/vol0/qt3 systemB:/vol/sv_vol/qt3
systemA> snap delete vol0 oldsnap
Copyright © 1994-2005, Network Appliance, Inc. All rights
reserved.
Part No. 210-01081_B0
File: snap17.htm
Last updated: 01-Dec-2005 16:35:59