Library Table of Contents Index Previous Next Comments

Setting space reservations for files

What space reservations are  Top

When space reservations are enabled for files, Data ONTAP reserves enough space in the volume so that writes to the file do not fail because of a lack of disk space (ENOSPC error). Other operations such as snapshots or the creation of new files can occur only if there is enough available space; they are restricted from using reserved space.

Writes to new or existing unreserved space in a volume will fail when the total amount of free space in the volume is less than the amount needed according to the current reserve values. Once free space goes below this value, only writes to reserved space will succeed and are guaranteed to succeed.

File space reservations are persistent across filer reboots and across takeovers and givebacks, but do not persist through reversions to an earlier software version.

Enabling space reservations for files  Top

To enable space reservations for a file, complete the following step.

Step

Action

1

Enter the following command:

file reservation file_name [overwrite|fill] [enable| 
disable]

file_name is the file in which file reservations are to be set. This must be an existing file.

enable turns space reservations on for the file in file_name.

disable turns space reservations off for the file in file_name.

fill enables space reservations only to fill holes in file_name.

overwrite enables space reservations only to overwrite blocks that have already been written in filename.

Specifying file reservation enable or disable without specifying fill or overwrite turns both options on or off.

Examples

file reservation myfile enable
file reservation myfile enable overwrite
file reservation myfile disable fill

Turning on space reservation for a file will fail if there is not enough free space in the volume for the new reservation.

Querying space reservations for files  Top

To find out the status of space reservations for files in a volume, complete the following step.

Step

Action

1

Enter the following command:

file reservation file_name overwrite

or

file reservation file_name fill

file_name is the file for which space reservations are set.

Example
file reservation myfile fill

Library Table of Contents Index Previous Next Comments