Skip to main content

NetApp_Insight_2020.png 

NetApp Knowledgebase

What are the Data ONTAP limitations on files, directories, and subdirectories?

Views:
1,313
Visibility:
Public
Votes:
0
Category:
data-ontap-8
Specialty:
core
Last Updated:

 

Applies to

  • Clustered Data ONTAP 8
  • Data ONTAP 7 and earlier
  • Answer

What is a hard link?
What is the maximum number of subdirectories that a single directory might contain?

Subdirectories might be limited by the number of available inodes and maxdirsize setting.
There is a limit of 99,998 directories per sub-directory.

The following are some messages that might be reported when one of the limits has been reached:

Size limitation/ filesystem full:
no space left on the device

Inodes:
file system is out of inodes

Directory size:
Mon Jan  1 18:25:46 CEST [wafl.dir.size.max:warning]: Directory XX reached the maxdirsize limit. Reduce the number of files or use the vol options command to increase this limit.

Subdirectory limit ( for Data ONTAP prior to 8.1):
Mon Jan  1 18:25:46 CEST [wafl.dir.link.approachingLimit:warning]: The /vol/xxxx/ directory is approaching the maximum link limit of 100000. Reduce the number of links to the existing parent directory.

The message on the client is similar to the following:
There is not enough space on the disk.

Limits encountered on creating a file or a directory:
  • Maximum size of the parent directory (that is, the size of the directory file. See man pages for -maxdirsize-):
    An error message is generated when this limit is reached and an error is returned to the client, which generally interprets the error as a full volume, although this does not necessarily mean that the volume is out of space.
  • The number of sub-directories:
    The maximum number of subdirectories a single directory might have is 65534 (64K) until Data ONTAP 6.4. Starting Data ONTAP 6.5, the limit was raised to 99998 (100K). Starting Data ONTAP 8.1, the subdirectory limit has been removed. The link count field has 4 bytes, which allows for approximately 4.3 billion links/subdirectories. This number might not be changed. To understand the reasons for this limit, see the section below on hard links and subdirectory implementation.
  • Maximum size of the volume (see man pages for -vol size-).
  • Quotas implemented on qtrees can limit the maximum space a client might use (see man pages for -qtree-).

Information on directories:

The purpose of a directory is to provide a mapping between an inode and one or more names, possibly with different paths. A directory is nothing else than a 'special' file that uses up an inode. The directory contains the inode number and one or more filenames in different formats (Unicode, NFS, 8.3). The number of files that can be stored in any one directory very much depends on the length of the file name and the type of filename used. Unicode names usually need more space than NFS names. The largest amount of space is used when names are stored in Unicode, NFS, and 8.3 at the same time (see also man pages for -vol options  create_ucode | convert_ucode- ). The size of the directory file is controlled by -vol options maxdirsize-, but be aware that directories can never shrink.

Information on inodes and the inode file:

Inode information is held in the inode file, which is a hidden system file, and each inode is 288 bytes long (192 bytes on Data ONTAP releases earlier than 9.0 and 128 bytes in releases 6.4 and earlier). The inode file normally cannot shrink, so be cautious when using the -maxfiles- command. The maximum is one inode per WAFL block (4 kb). Minimum and default value is one inode per 32 kb of volume space. You can decrease the value of the maxfiles parameter for a volume, as long as you do not decrease it below the current number of files stored in the volume.

Additional information on hard links and subdirectories:

A hard link is a mapping between a name (or a unified group of names) and an inode number and is held in a directory. An inode number can be referenced by multiple names, and each reference adds to the link count for the inode. Directories make extensive use of and are implemented using hard links. Hard links are used to show connectivity between parent and child directories in a directory tree. 

Each directory has a minimum of two entries '.' and '..'.  Where '.' is a hard link to itself and '..' is a hard link to the parent directory. Therefore, every subdirectory created adds to the hard link count of the parent directory leading to the subdirectory limits described above.

Highly schematic view of a file system structure (the actual implementation looks different but the view is good for a general understanding):