Skip to main content
NetApp Knowledge Base

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

Views:
22,516
Visibility:
Public
Votes:
9
Category:
ontap-9
Specialty:
core
Last Updated:

 

Applies to

ONTAP 9

Answer

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 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).
  • The inode file normally cannot shrink, so be cautious when using the -maxfiles- command.
    • The maximum is one inode per WAFL block (4 kb).
    • The 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.
  • While ONTAP has a limit of 100.000 hardlinks per inode, it does not apply to directories.
  • 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):

 

  • KB 1003648 image1.jpg

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.

 

  • Was this article helpful?