# pool.dataset.create

Creates a dataset/zvol.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: data

#### data

Configuration data for creating a new ZFS dataset.

## Any of

#### PoolDatasetCreateFilesystem

Type: object
No Additional Properties

##

#### Name

Type: string

The name of the dataset to create.

Must be at least `1` characters long

##

#### Comments

Type: string Default: "INHERIT"

Comments or description for the dataset.

##

#### Sync

Type: enum (of string) Default: "INHERIT"

Synchronous write behavior for the dataset.

##### Must be one of:

- "STANDARD"
- "ALWAYS"
- "DISABLED"
- "INHERIT"

##

#### Snapdev

Type: enum (of string)

Controls visibility of volume snapshots under /dev/zvol/.

##### Must be one of:

- "HIDDEN"
- "VISIBLE"
- "INHERIT"

##

#### Compression

Type: enum (of string) Default: "INHERIT"

Compression algorithm to use for the dataset. Higher numbered variants provide better compression but use more CPU. 'INHERIT' uses the parent dataset's setting.

##### Must be one of:

- "ON"
- "OFF"
- "LZ4"
- "GZIP"
- "GZIP-1"
- "GZIP-9"
- "ZSTD"
- "ZSTD-FAST"
- "ZLE"
- "LZJB"
- "ZSTD-1"
- "ZSTD-2"
- "ZSTD-3"
- "ZSTD-4"
- "ZSTD-5"
- "ZSTD-6"
- "ZSTD-7"
- "ZSTD-8"
- "ZSTD-9"
- "ZSTD-10"
- "ZSTD-11"
- "ZSTD-12"
- "ZSTD-13"
- "ZSTD-14"
- "ZSTD-15"
- "ZSTD-16"
- "ZSTD-17"
- "ZSTD-18"
- "ZSTD-19"
- "ZSTD-FAST-1"
- "ZSTD-FAST-2"
- "ZSTD-FAST-3"
- "ZSTD-FAST-4"
- "ZSTD-FAST-5"
- "ZSTD-FAST-6"
- "ZSTD-FAST-7"
- "ZSTD-FAST-8"
- "ZSTD-FAST-9"
- "ZSTD-FAST-10"
- "ZSTD-FAST-20"
- "ZSTD-FAST-30"
- "ZSTD-FAST-40"
- "ZSTD-FAST-50"
- "ZSTD-FAST-60"
- "ZSTD-FAST-70"
- "ZSTD-FAST-80"
- "ZSTD-FAST-90"
- "ZSTD-FAST-100"
- "ZSTD-FAST-500"
- "ZSTD-FAST-1000"
- "INHERIT"

##

#### Exec

Type: enum (of string) Default: "INHERIT"

Whether files in this dataset can be executed.

##### Must be one of:

- "ON"
- "OFF"
- "INHERIT"

##

#### Managedby

Type: string Default: "INHERIT"

Identifies which service or system manages this dataset.

Must be at least `1` characters long

##

#### Quota Warning

Default: "INHERIT"

Percentage of dataset quota at which to issue a warning. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Quota Critical

Default: "INHERIT"

Percentage of dataset quota at which to issue a critical alert. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Refquota Warning

Default: "INHERIT"

Percentage of reference quota at which to issue a warning. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Refquota Critical

Default: "INHERIT"

Percentage of reference quota at which to issue a critical alert. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Reservation

Type: integer

Minimum disk space guaranteed to this dataset and its children in bytes.

##

#### Refreservation

Type: integer

Minimum disk space guaranteed to this dataset itself in bytes.

##

#### Special Small Block Size

Size threshold below which blocks are stored on special vdevs.

## Any of

Type: integer
Type: const
Specific value: `"INHERIT"`

##

#### Copies

Default: "INHERIT"

Number of copies of data blocks to maintain for redundancy.

## Any of

Type: integer
Type: const
Specific value: `"INHERIT"`

##

#### Snapdir

Type: enum (of string) Default: "INHERIT"

Controls visibility of the `.zfs/snapshot` directory. 'DISABLED' hides snapshots, 'VISIBLE' shows them, 'HIDDEN' makes them accessible but not listed.

##### Must be one of:

- "DISABLED"
- "VISIBLE"
- "HIDDEN"
- "INHERIT"

##

#### Deduplication

Type: enum (of string) Default: "INHERIT"

Deduplication setting. 'ON' enables dedup, 'VERIFY' enables with checksum verification, 'OFF' disables.

##### Must be one of:

- "ON"
- "VERIFY"
- "OFF"
- "INHERIT"

##

#### Checksum

Type: enum (of string) Default: "INHERIT"

Checksum algorithm to verify data integrity. Higher security algorithms like SHA256 provide better protection but use more CPU.

##### Must be one of:

- "ON"
- "OFF"
- "FLETCHER2"
- "FLETCHER4"
- "SHA256"
- "SHA512"
- "SKEIN"
- "EDONR"
- "BLAKE3"
- "INHERIT"

##

#### Readonly

Type: enum (of string) Default: "INHERIT"

Whether the dataset is read-only.

##### Must be one of:

- "ON"
- "OFF"
- "INHERIT"

##

#### Share Type

Type: enum (of string) Default: "GENERIC"

Optimization type for the dataset based on its intended use.

##### Must be one of:

- "GENERIC"
- "MULTIPROTOCOL"
- "NFS"
- "SMB"
- "APPS"

##

#### PoolCreateEncryptionOptions

Type: object

Configuration for encryption of dataset for `name` pool.

No Additional Properties

##

#### Generate Key

Type: boolean Default: false

Automatically generate the key to be used for dataset encryption.

##

#### Pbkdf2Iters

Type: integer Default: 350000

Number of PBKDF2 iterations for key derivation from passphrase. Higher iterations improve security against brute force attacks but increase unlock time. Default 350,000 balances security and performance.

Value must be greater or equal to `100000`

##

#### Algorithm

Type: enum (of string) Default: "AES-256-GCM"

Encryption algorithm to use for dataset encryption.

##### Must be one of:

- "AES-128-CCM"
- "AES-192-CCM"
- "AES-256-CCM"
- "AES-128-GCM"
- "AES-192-GCM"
- "AES-256-GCM"

##

#### Passphrase

Default: null

Must be specified if encryption for root dataset is desired with a passphrase as a key.

## Any of

Type: string

Must be at least `8` characters long

Type: null

##

#### Key

Default: null

A hex-encoded key specified as an alternative to using `passphrase`.

## Any of

Type: string

Must be at least `64` characters long

Must be at most `64` characters long

Type: null

##

#### Encryption

Type: boolean Default: false

Create a ZFS encrypted root dataset for `name` pool.
There is 1 case where ZFS encryption is not allowed for a dataset:
1) If the parent dataset is encrypted with a passphrase and `name` is being created with a key for encrypting the dataset.

##

#### Inherit Encryption

Type: boolean Default: true

Whether to inherit encryption settings from the parent dataset.

##

#### User Properties

Type: array of object Default: []

Custom user-defined properties to set on the dataset.

No Additional Items

##### Each item of this array must be:

#### PoolDatasetCreateUserProperty

Type: object
No Additional Properties

##

#### Key

Type: string

User property key in namespace:property format.

Must match regular expression: `.*:.*`
Examples:

    "custom:backup_policy"

    "org:created_by"

##

#### Value

Type: string

The value to assign to the user property.

##

#### Create Ancestors

Type: boolean Default: false

Whether to create any missing parent datasets.

##

#### Type

Type: const Default: "FILESYSTEM"

Type of dataset to create - filesystem.

Specific value: `"FILESYSTEM"`

##

#### Aclmode

Type: enum (of string)

How Access Control Lists are handled when chmod is used.

##### Must be one of:

- "PASSTHROUGH"
- "RESTRICTED"
- "DISCARD"
- "INHERIT"

##

#### Acltype

Type: enum (of string)

The type of Access Control List system to use.

##### Must be one of:

- "OFF"
- "NFSV4"
- "POSIX"
- "INHERIT"

##

#### Atime

Type: enum (of string)

Whether file access times are updated when files are accessed.

##### Must be one of:

- "ON"
- "OFF"
- "INHERIT"

##

#### Casesensitivity

Type: enum (of string)

File name case sensitivity setting.

##### Must be one of:

- "SENSITIVE"
- "INSENSITIVE"
- "INHERIT"

##

#### Quota

Maximum disk space this dataset and its children can consume in bytes.

## Any of

Type: integer

Value must be greater or equal to `1073741824`

Type: enum (of integer or null)

##### Must be one of:

- 0
- null

##

#### Refquota

Maximum disk space this dataset itself can consume in bytes.

## Any of

Type: integer

Value must be greater or equal to `1073741824`

Type: enum (of integer or null)

##### Must be one of:

- 0
- null

##

#### Recordsize

Type: string

The suggested block size for files in this filesystem dataset.

#### PoolDatasetCreateVolume

Type: object
No Additional Properties

##

#### Name

Type: string

The name of the dataset to create.

Must be at least `1` characters long

##

#### Comments

Type: string Default: "INHERIT"

Comments or description for the dataset.

##

#### Sync

Type: enum (of string) Default: "INHERIT"

Synchronous write behavior for the dataset.

##### Must be one of:

- "STANDARD"
- "ALWAYS"
- "DISABLED"
- "INHERIT"

##

#### Snapdev

Type: enum (of string)

Controls visibility of volume snapshots under /dev/zvol/.

##### Must be one of:

- "HIDDEN"
- "VISIBLE"
- "INHERIT"

##

#### Compression

Type: enum (of string) Default: "INHERIT"

Compression algorithm to use for the dataset. Higher numbered variants provide better compression but use more CPU. 'INHERIT' uses the parent dataset's setting.

##### Must be one of:

- "ON"
- "OFF"
- "LZ4"
- "GZIP"
- "GZIP-1"
- "GZIP-9"
- "ZSTD"
- "ZSTD-FAST"
- "ZLE"
- "LZJB"
- "ZSTD-1"
- "ZSTD-2"
- "ZSTD-3"
- "ZSTD-4"
- "ZSTD-5"
- "ZSTD-6"
- "ZSTD-7"
- "ZSTD-8"
- "ZSTD-9"
- "ZSTD-10"
- "ZSTD-11"
- "ZSTD-12"
- "ZSTD-13"
- "ZSTD-14"
- "ZSTD-15"
- "ZSTD-16"
- "ZSTD-17"
- "ZSTD-18"
- "ZSTD-19"
- "ZSTD-FAST-1"
- "ZSTD-FAST-2"
- "ZSTD-FAST-3"
- "ZSTD-FAST-4"
- "ZSTD-FAST-5"
- "ZSTD-FAST-6"
- "ZSTD-FAST-7"
- "ZSTD-FAST-8"
- "ZSTD-FAST-9"
- "ZSTD-FAST-10"
- "ZSTD-FAST-20"
- "ZSTD-FAST-30"
- "ZSTD-FAST-40"
- "ZSTD-FAST-50"
- "ZSTD-FAST-60"
- "ZSTD-FAST-70"
- "ZSTD-FAST-80"
- "ZSTD-FAST-90"
- "ZSTD-FAST-100"
- "ZSTD-FAST-500"
- "ZSTD-FAST-1000"
- "INHERIT"

##

#### Exec

Type: enum (of string) Default: "INHERIT"

Whether files in this dataset can be executed.

##### Must be one of:

- "ON"
- "OFF"
- "INHERIT"

##

#### Managedby

Type: string Default: "INHERIT"

Identifies which service or system manages this dataset.

Must be at least `1` characters long

##

#### Quota Warning

Default: "INHERIT"

Percentage of dataset quota at which to issue a warning. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Quota Critical

Default: "INHERIT"

Percentage of dataset quota at which to issue a critical alert. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Refquota Warning

Default: "INHERIT"

Percentage of reference quota at which to issue a warning. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Refquota Critical

Default: "INHERIT"

Percentage of reference quota at which to issue a critical alert. 0-100 or 'INHERIT'.

## Any of

Type: integer

Value must be greater or equal to `0` and lesser or equal to `100`

Type: const
Specific value: `"INHERIT"`

##

#### Reservation

Type: integer

Minimum disk space guaranteed to this dataset and its children in bytes.

##

#### Refreservation

Type: integer

Minimum disk space guaranteed to this dataset itself in bytes.

##

#### Special Small Block Size

Size threshold below which blocks are stored on special vdevs.

## Any of

Type: integer
Type: const
Specific value: `"INHERIT"`

##

#### Copies

Default: "INHERIT"

Number of copies of data blocks to maintain for redundancy.

## Any of

Type: integer
Type: const
Specific value: `"INHERIT"`

##

#### Snapdir

Type: enum (of string) Default: "INHERIT"

Controls visibility of the `.zfs/snapshot` directory. 'DISABLED' hides snapshots, 'VISIBLE' shows them, 'HIDDEN' makes them accessible but not listed.

##### Must be one of:

- "DISABLED"
- "VISIBLE"
- "HIDDEN"
- "INHERIT"

##

#### Deduplication

Type: enum (of string) Default: "INHERIT"

Deduplication setting. 'ON' enables dedup, 'VERIFY' enables with checksum verification, 'OFF' disables.

##### Must be one of:

- "ON"
- "VERIFY"
- "OFF"
- "INHERIT"

##

#### Checksum

Type: enum (of string) Default: "INHERIT"

Checksum algorithm to verify data integrity. Higher security algorithms like SHA256 provide better protection but use more CPU.

##### Must be one of:

- "ON"
- "OFF"
- "FLETCHER2"
- "FLETCHER4"
- "SHA256"
- "SHA512"
- "SKEIN"
- "EDONR"
- "BLAKE3"
- "INHERIT"

##

#### Readonly

Type: enum (of string) Default: "INHERIT"

Whether the dataset is read-only.

##### Must be one of:

- "ON"
- "OFF"
- "INHERIT"

##

#### Share Type

Type: enum (of string) Default: "GENERIC"

Optimization type for the dataset based on its intended use.

##### Must be one of:

- "GENERIC"
- "MULTIPROTOCOL"
- "NFS"
- "SMB"
- "APPS"

##

#### PoolCreateEncryptionOptions

Type: object

Configuration for encryption of dataset for `name` pool.

No Additional Properties

##

#### Generate Key

Type: boolean Default: false

Automatically generate the key to be used for dataset encryption.

##

#### Pbkdf2Iters

Type: integer Default: 350000

Number of PBKDF2 iterations for key derivation from passphrase. Higher iterations improve security against brute force attacks but increase unlock time. Default 350,000 balances security and performance.

Value must be greater or equal to `100000`

##

#### Algorithm

Type: enum (of string) Default: "AES-256-GCM"

Encryption algorithm to use for dataset encryption.

##### Must be one of:

- "AES-128-CCM"
- "AES-192-CCM"
- "AES-256-CCM"
- "AES-128-GCM"
- "AES-192-GCM"
- "AES-256-GCM"

##

#### Passphrase

Default: null

Must be specified if encryption for root dataset is desired with a passphrase as a key.

## Any of

Type: string

Must be at least `8` characters long

Type: null

##

#### Key

Default: null

A hex-encoded key specified as an alternative to using `passphrase`.

## Any of

Type: string

Must be at least `64` characters long

Must be at most `64` characters long

Type: null

##

#### Encryption

Type: boolean Default: false

Create a ZFS encrypted root dataset for `name` pool.
There is 1 case where ZFS encryption is not allowed for a dataset:
1) If the parent dataset is encrypted with a passphrase and `name` is being created with a key for encrypting the dataset.

##

#### Inherit Encryption

Type: boolean Default: true

Whether to inherit encryption settings from the parent dataset.

##

#### User Properties

Type: array of object Default: []

Custom user-defined properties to set on the dataset.

No Additional Items

##### Each item of this array must be:

#### PoolDatasetCreateUserProperty

Type: object
No Additional Properties

##

#### Key

Type: string

User property key in namespace:property format.

Must match regular expression: `.*:.*`
Examples:

    "custom:backup_policy"

    "org:created_by"

##

#### Value

Type: string

The value to assign to the user property.

##

#### Create Ancestors

Type: boolean Default: false

Whether to create any missing parent datasets.

##

#### Type

Type: const Default: "VOLUME"

Type of dataset to create - volume (zvol).

Specific value: `"VOLUME"`

##

#### Force Size

Type: boolean

Force creation even if the size is not optimal.

##

#### Sparse

Type: boolean

Whether to use sparse (thin) provisioning for the volume.

##

#### Volsize

Type: integer

The volume size in bytes; supposed to be a multiple of the block size.

##

#### Volblocksize

Type: enum (of string)

Defaults to `128K` if the parent pool is a DRAID pool or `16K` otherwise.

##### Must be one of:

- "512"
- "512B"
- "1K"
- "2K"
- "4K"
- "8K"
- "16K"
- "32K"
- "64K"
- "128K"

##

Type: object

The newly created dataset information.

Required roles: DATASET_WRITE