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

Setting space reservation for files

What space reservation is  Top

When space reservation is enabled for one or more files, Data ONTAP reserves enough space in the volume so that writes to a those files 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 unreserved space; other operations 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 file reserve values. Once free space in a volume goes below this value, only writes to files with reserved space are guaranteed to succeed.

File space reservation is persistent across filer reboots and across takeovers and givebacks, but does not persist through reversions to an earlier Data ONTAP software version.

Note
This manual does not discuss enabling space reservation for LUNs on NetApp appliances configured for block storage. For details on enabling space reservation for LUNs, see the Block Access Management Guide for FCP or the Block Access Management Guide for iSCSI.

File space reservation disk space requirements  Top

In volumes that keep snapshot data, files with space reservation require disk space in addition to their file size:

Enabling space reservation for a specific file  Top

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

Step

Action

1

Enter the following command:

file reservation file_name [enable|disable]

file_name is the file in which file space reservation is set.

enable turns space reservation on for the file file_name

disable turns space reservation off for the file file_name.

Example:

file reservation myfile enable

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 reservation for files

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

Step

Action

1

Enter the following command:

file reservation file_name

file_name is the file in which file reservations are set.

Example:

file reservation myfile

Enabling default file space reservation for volumes  Top

You can use the create_reserved parameter on the vol options command to enable default file space reservation for specified volumes. When default file space reservation is enabled on a volume, all subsequent files created in that volume are, by default, enabled for space reservation.

Caution
Enabling default file space reservation for a volume, means that all subsequent files created for that volume will require the extra volume space described in File space reservation disk space requirements. You can disable files for space reservation only one at a time through the file reservation file_name disable command.

To set space reservation values for new files in a specified volume, complete the following step.

Step

Action

1

Enter the following command:

vol options vol_name create_reserved {on | off}

vol_name is the volume in which file reservations are set.

create_reserved on enables space reservation for all new files that are created or stored in the volume vol_name.

create_reserved off disables space reservation for all new files that are created or stored in the volume vol_name.

Querying space reservation for volumes

To find out the status of space reservation for a volume, complete the following step.

Step

Action

1

Enter the following command:

vol options vol_name 

vol_name is the volume in which reservations are set.

Example

vol options vol2 

Result:

root, diskroot, nosnap=off, nosnapdir=off, 
minra=off, no_atime_update=off, raidtype=raid4, 
raidsize=8, nvfail=off, snapmirrored=off, 
resyncsnaptime=60, create_ucode=off, 
convert_ucode=off, maxdirsize=10240, 
fs_size_fixed=off, create_reserved=on

Enabling default file space reservation for qtrees  Top

You can use the qtree reservation command to enable default file space reservation for specified qtrees. When default file space reservation is enabled for a qtree, all subsequent files created in or copied to that qtree are, by default, enabled for space reservation.

Caution
Enabling default file space reservation for a qtree means that all subsequent files created for that qtree will require the extra volume space described in File space reservation disk space requirements. You can disable files for space reservation only one at a time through the file reservation filename disable command.

To set space reservation values for new files in a specified qtree, complete the following step.

Step

Action

1

Enter the following command:

qtree reservation qtree_name {enable | disable}

qtree_name is the qtree in which file reservations are set.

enable enables space reservation for all new files that are created or stored in the qtree qtree_name.

disable disables space reservation for all new files that are created or stored in the qtree qtree_name.

If default file space reservation is enabled for the volume

Default file space reservation can be set for volumes as well as for qtrees.

Querying space reservation for qtrees

To find out the status of space reservation for a qtree, complete the following step.

Step

Action

1

Enter the following command:

qtree reservation qtree_name 

vol_name is the volume in which reservations are set.

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