Skip to main content
A newer release of this product is available.

Driver-specific volume options

Contributors netapp-aruldeepa

Each storage driver has a different set of options, which you can specify at volume creation time to customize the outcome. See below for options that apply to your configured storage system.

Using these options during the volume create operation is simple. Provide the option and the value using the -o operator during the CLI operation. These override any equivalent values from the JSON configuration file.

ONTAP volume options

Volume create options for both NFS and iSCSI include the following:

Option Description

size

The size of the volume, defaults to 1 GiB.

spaceReserve

Thin or thick provision the volume, defaults to thin. Valid values are none (thin provisioned) and volume (thick provisioned).

snapshotPolicy

This will set the snapshot policy to the desired value. The default is none, meaning no snapshots will automatically be created for the volume. Unless modified by your storage administrator, a policy named “default” exists on all ONTAP systems which creates and retains six hourly, two daily, and two weekly snapshots. The data preserved in a snapshot can be recovered by browsing to the .snapshot directory in any directory in the volume.

snapshotReserve

This will set the snapshot reserve to the desired percentage. The default is no value, meaning ONTAP will select the snapshotReserve (usually 5%) if you have selected a snapshotPolicy, or 0% if the snapshotPolicy is none. You can set the default snapshotReserve value in the config file for all ONTAP backends, and you can use it as a volume creation option for all ONTAP backends except ontap-nas-economy.

splitOnClone

When cloning a volume, this will cause ONTAP to immediately split the clone from its parent. The default is false. Some use cases for cloning volumes are best served by splitting the clone from its parent immediately upon creation, because there is unlikely to be any opportunity for storage efficiencies. For example, cloning an empty database can offer large time savings but little storage savings, so it's best to split the clone immediately.

encryption

Enable NetApp Volume Encryption (NVE) on the new volume; defaults to false. NVE must be licensed and enabled on the cluster to use this option.

If NAE is enabled on the backend, any volume provisioned in Astra Trident will be NAE enabled.

For more information, refer to: How Astra Trident works with NVE and NAE.

tieringPolicy

Sets the tiering policy to be used for the volume. This decides whether data is moved to the cloud tier when it becomes inactive (cold).

The following additional options are for NFS only:

Option Description

unixPermissions

This controls the permission set for the volume itself. By default the permissions will be set to `---rwxr-xr-x, or in numerical notation 0755, and root will be the owner. Either the text or numerical format will work.

snapshotDir

Setting this to true will make the .snapshot directory visible to clients accessing the volume. The default value is false, meaning that visibility of the .snapshot directory is disabled by default. Some images, for example the official MySQL image, don't function as expected when the .snapshot directory is visible.

exportPolicy

Sets the export policy to be used for the volume. The default is default.

securityStyle

Sets the security style to be used for access to the volume. The default is unix. Valid values are unix and mixed.

The following additional options are for iSCSI only:

Option Description

fileSystemType

Sets the file system used to format iSCSI volumes. The default is ext4. Valid values are ext3, ext4, and xfs.

spaceAllocation

Setting this to false will turn off the LUN's space-allocation feature. The default value is true, meaning ONTAP notifies the host when the volume has run out of space and the LUN in the volume cannot accept writes. This option also enables ONTAP to reclaim space automatically when your host deletes data.

Examples

See the examples below:

  • Create a 10GiB volume:

    docker volume create -d netapp --name demo -o size=10G -o encryption=true
  • Create a 100GiB volume with snapshots:

    docker volume create -d netapp --name demo -o size=100G -o snapshotPolicy=default -o snapshotReserve=10
  • Create a volume which has the setUID bit enabled:

    docker volume create -d netapp --name demo -o unixPermissions=4755

The minimum volume size is 20MiB.

If the snapshot reserve is not specified and the snapshot policy is none, Trident will use a snapshot reserve of 0%.

  • Create a volume with no snapshot policy and no snapshot reserve:

    docker volume create -d netapp --name my_vol --opt snapshotPolicy=none
  • Create a volume with no snapshot policy and a custom snapshot reserve of 10%:

    docker volume create -d netapp --name my_vol --opt snapshotPolicy=none --opt snapshotReserve=10
  • Create a volume with a snapshot policy and a custom snapshot reserve of 10%:

    docker volume create -d netapp --name my_vol --opt snapshotPolicy=myPolicy --opt snapshotReserve=10
  • Create a volume with a snapshot policy, and accept ONTAP's default snapshot reserve (usually 5%):

    docker volume create -d netapp --name my_vol --opt snapshotPolicy=myPolicy

Element software volume options

The Element software options expose the size and quality of service (QoS) policies associated with the volume. When the volume is created, the QoS policy associated with it is specified using the -o type=service_level nomenclature.

The first step to defining a QoS service level with the Element driver is to create at least one type and specify the minimum, maximum, and burst IOPS associated with a name in the configuration file.

Other Element software volume create options include the following:

Option Description

size

The size of the volume, defaults to 1GiB or config entry …​ "defaults": {"size": "5G"}.

blocksize

Use either 512 or 4096, defaults to 512 or config entry DefaultBlockSize.

Example

See the following sample configuration file with QoS definitions:

{
    "...": "..."
    "Types": [
        {
            "Type": "Bronze",
            "Qos": {
                "minIOPS": 1000,
                "maxIOPS": 2000,
                "burstIOPS": 4000
            }
        },
        {
            "Type": "Silver",
            "Qos": {
                "minIOPS": 4000,
                "maxIOPS": 6000,
                "burstIOPS": 8000
            }
        },
        {
            "Type": "Gold",
            "Qos": {
                "minIOPS": 6000,
                "maxIOPS": 8000,
                "burstIOPS": 10000
            }
        }
    ]
}

In the above configuration, we have three policy definitions: Bronze, Silver, and Gold. These names are arbitrary.

  • Create a 10GiB Gold volume:

    docker volume create -d solidfire --name sfGold -o type=Gold -o size=10G
  • Create a 100GiB Bronze volume:

    docker volume create -d solidfire --name sfBronze -o type=Bronze -o size=100G