Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments

Understanding the snapshot reserve

What the snapshot reserve is  Top

The snapshot reserve specifies a set percentage of disk space for snapshots. By default, the snapshot reserve is 20% of disk space. The snapshot reserve can be used only by snapshots, not by the active file system. This means that if the active file system runs out of disk space, any disk space still remaining in the snapshot reserve is not available for active file system use.

Note
Although the active file system cannot consume disk space reserved for snapshots, snapshots can exceed the snapshot reserve and consume disk space normally available to the active file system.

Snapshot reserve management tasks  Top

Snapshot reserve management involves the following tasks:

Use of deleted active file disk space  Top

When enough disk space is available for snapshots in the snapshot reserve, deleting files in the active file system frees disk space for new files, while the snapshots that reference those files consume only the space in the snapshot reserve. If Data ONTAP created a snapshot when the disks were full, deleting files from the active file system would not create any free space because everything in the active file system would also be referenced by the newly created snapshot. Data ONTAP would have to delete the snapshot before it could create any new files.

Example

The following example shows how disk space being freed by deleting files in the active file system ends up in the snapshot:

If Data ONTAP creates a snapshot when the active file system is full and there is still space remaining in the snapshot reserve, the output from the df command--which displays statistics about the amount of disk space on a volume--is as follows:

Filesystem            kbytes    used     avail     capacity
/vol/vol0/            3000000   3000000  0         100%
/vol/vol0/.snapshot   1000000   500000   500000    0%

If you delete 100,000 KB (0.1 GB) of files, the disk space used by these files is no longer part of the active file system, so the space is reassigned to the snapshots instead.

Explanation

Data ONTAP reassigns 100,000 KB (0.1 GB) of space from the active file system to the snapshot reserve. Because there was reserve space for snapshots, deleting files from the active file system freed space for new files. If you enter the df command again, the output is as follows:

Filesystem            kbytes    used     avail     capacity
/vol/vol0/            3000000   2900000  100000    97%
/vol/vol0/.snapshot   1000000   600000   400000    60%

Snapshots can exceed reserve  Top

There is no way to prevent snapshots from consuming disk space greater than the amount reserved for them; therefore, it is important to reserve enough disk space for snapshots so that the active file system always has space available to create new files or modify existing ones.

Example

Consider what would happen in the example if all files in the active file system were deleted. Before the deletion, the df output was as follows:

Filesystem            kbytes    used     avail     capacity
/vol/vol0/            3000000   3000000  0         100%
/vol/vol0/.snapshot   1000000   500000   500000    50%

After the deletion, the df command generates the following output:

Filesystem            kbytes    used     avail     capacity
/vol/vol0/            3000000   2500000  500000    83%
/vol/vol0/.snapshot   1000000   3500000  0         350%

Explanation

The entire 3,000,000 KB (3 GB) in the active file system is still being used by snapshots, along with the 500,000 KB (0.5 GB) that were being used by snapshots before, making a total of 3,500,000 KB (3.5 GB) of snapshot data. This is 2,500,000 KB (2.5 GB) more than the space reserved for snapshots; therefore, 2.5 GB of space that would be available to the active file system is now unavailable to it. The post-deletion output of the df command lists this unavailable space as "used" even though no files are stored in the active file system.

Recovering disk space for file system use  Top

Whenever snapshots consume more than 100% of the snapshot reserve, the system is in danger of becoming full. In this case, you can create files only after you delete enough snapshots.

Example

If 500,000 KB (0.5 GB) of data is added to the active file system in the preceding example, a df command generates the following output:

Filesystem            kbytes    used     avail     capacity
/vol/vol0             3000000   3000000  0         100%
/vol/vol0/.snapshot   1000000   3500000  0         350%

Explanation

As soon as Data ONTAP creates a new snapshot, every disk block in the file system is referenced by some snapshot. Therefore, no matter how many files you delete from the active file system, there is still no room to add any more. The only way to recover from this situation is to delete enough snapshots to free more disk space.

See Displaying snapshot disk consumption statistics for information about how to use the snap list command to determine which snapshots to delete.

Library Table of Contents Index Previous Page (Alt-p) Next Page (Alt-n) Comments