Skip to content
Datasets - HAC documentation hub

Datasets

Creating Datasets

ZFS uses datasets to organize and store data. A ZFS dataset is similar to a mounted filesystem and has its own set of properties, including a quota that limits the amount of data that can be stored. Datasets are organized in the ZFS hierarchy and can have different mountpoints.

The following steps will show the process of creating a dataset within clustered and non clustered pools.

Note

Datasets can only be created or edited on the node where the service is running.

  1. To create a dataset navigate to ZFS -> Datasets and click CREATE DATASET:

    zfs-datasets-main-window

  2. Select the Parent Pool and enter a Dataset Name and set any options required:

    zfs-datasets-create

    Available options:

    Option
    Description
    Mountpoint path Alternative path to mount the dataset or pool. Do not change the mountpoint of a clustered pool, doing this will break automatic failover
    Compression Enable compression or select an alternative compression type (lz4/zstd)
    • on - The current default compression algorithm will be used (does not select a fixed compression type; as new compression algorithms are added to ZFS and enabled on a pool, the default compression algorithm may change).
    • off - No compression.
    • lz4 - A high-performance compression and decompression algorithm, as well as a moderately higher compression ratio than the older lzjb (the original compression algorithm).
    • zstd - Provides both high compression ratios and good performance and is preferable over lz4.
    Dataset Quota Set a limit on the amount of disk space a file system can use.
    Reservation Size Guarantee a specified amount of disk space is available to a file system.
    ACL Inherit Setermine the behavior of ACL inheritance (i.e. how ACLs are inherited when files and directories are created). The following options are available:
    • discard - No ACL entries are inherited. The file or directory is created according to the client and protocol being used.
    • noallow - Only inheritable ACL entries specifying deny permissions are inherited.
    • restricted - Removes the write_acl and write_owner permissions when the ACL entry is inherited, but otherwise leaves inheritable ACL entries untouched. This is the default.
    • passthrough - All inheritable ACL entries are inherited. The passthrough mode is typically used to cause all data files to be created with an identical mode in a directory tree. An administrator sets up ACL inheritance so that all files are created with a mode, such as 0664 or 0666.
    • passthrough-x - Same as passthrough except that the owner, group, and everyone ACL entries inherit the execute permission only if the file creation mode also requests the execute bit. The passthrough setting works as expected for data files, but you might want to optionally include the execute bit from the file creation mode into the inherited ACL. One example is an output file that is generated from tools, such as cc or gcc. If the inherited ACL does not include the execute bit, then the output executable from the compiler won't be executable until you use chmod(1) to change the file's permissions.
      ACL Mode Modify ACL behavior whenever a file or directory's mode is modified by the chmod command or when a file is initially created.
      • discard - All ACL entries are removed except for the entries needed to define the mode of the file or directory.
      • groupmask - User or group ACL permissions are reduced so that they are no greater than the group permission bits, unless it is a user entry that has the same UID as the owner of the file or directory. Then, the ACL permissions are reduced so that they are no greater than owner permission bits.
      • passthrough - During a chmod operation, ACEs other than owner@, group@, or everyone@ are not modified in any way. ACEs with owner@, group@, or everyone@ are disabled to set the file mode as requested by the chmod operation.
      User Ownership Sets the ownership of the dataset
      Group Ownership Sets the group ownership of the dataset
      Extended Attributes Controls whether extended attributes are enabled for this file system. Two styles of extended attributes are supported: either directory-based or system-attribute-based.
      • off - Extended attributes are disabled
      • on - Extended attributes are enabled; the default value of on enables directory-based extended attributes.
      • sa - System based attributes
      • dir - Directory based attributes
      Enable NFS Share enable NFS sharing dataset via ZFS. Do not enable if managing Shares via the WebApp.
      Enable SMB Share enable SMB sharing dataset via ZFS. Do not enable if managing Shares via the WebApp.
      Update Access Time controls whether the access time for files is updated on read.
      What is an ACL

      An ACL is a list of user permissions for a file, folder, or other data object. The entries in an ACL specify which users and groups can access something and what actions they may perform.

      What are Extended Attributes

      Extended file attributes are file system features that enable additional attributes to be associated with computer files as metadata not interpreted by the filesystem, whereas regular attributes have a purpose strictly defined by the filesystem.

      In ZFS directory based extended attributes (dir) imposes no practical limit on either the size or number of attributes which can be set on a file. Although under Linux the getxattr(2) and setxattr(2) system calls limit the maximum size to 64K. This is the most compatible style of extended attribute and is supported by all ZFS implementations.

      With system extended attributes (sa) the key advantage is improved performance. Storing extended attributes as system attributes significantly decreases the amount of disk I/O required. Up to 64K of data may be stored per-file in the space reserved for system attributes. If there is not enough space available for an extended attribute then it will be automatically written as a directory-based xattr. System-attribute-based extended attributes are not accessible on platforms which do not support the xattr=sa feature. OpenZFS supports xattr=sa on both FreeBSD and Linux.

    • Click SUBMIT to create - the Dataset is now created in the pool:

      zfs-datasets-save-complete

    Modifying Datasets

    To modify an existing dataset, click the DS pencil button to the right of the dataset:

    zfs-dataset-modify

    Deleting Datasets

    To delete a dataset, click the DS bin button to the right of the dataset and confirm by clicking the REMOVE DATASET option.