> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> System table containing a list of disk types supported by the server along with their embedded documentation.

# system.disk_types

<h2 id="description">
  Description
</h2>

Contains the list of disk types supported by the server, along with embedded documentation for each type. A disk type is specified in the `type` of a disk configuration and determines where and how a disk stores its data (local filesystem, object storage, a cache over another disk, and so on).

Note that this table lists the available disk *types*, whereas [`system.disks`](/reference/system-tables/disks) lists the disk instances configured on the server.

<h2 id="columns">
  Columns
</h2>

* `name` ([String](/reference/data-types/index)) — The name of the disk type, as specified in the `type` of a disk configuration.
* `description` ([String](/reference/data-types/index)) — A high-level description of what the disk type does.
* `syntax` ([String](/reference/data-types/index)) — How the disk type is specified in a disk configuration.
* `examples` ([String](/reference/data-types/index)) — Usage examples.
* `introduced_in` ([String](/reference/data-types/index)) — The ClickHouse version in which the disk type was first introduced, in the form major.minor.
* `related` ([Array(String)](/reference/data-types/index)) — The names of related disk types.

<h2 id="configuration-examples">
  Configuration examples
</h2>

A disk can be configured in two ways: **statically**, in the server configuration files (XML or YAML), or **dynamically**, in the settings of a `CREATE`/`ATTACH` query using the `disk` function. The same disk type and parameters are accepted in both cases.

<h3 id="static-configuration">
  Static configuration
</h3>

Disks are defined under `storage_configuration` in the server configuration. The following example defines an `s3` disk and a storage policy that uses it.

```xml title="config.xml" theme={null}
<clickhouse>
    <storage_configuration>
        <disks>
            <s3_disk>
                <type>s3</type>
                <endpoint>https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/</endpoint>
                <use_environment_credentials>1</use_environment_credentials>
            </s3_disk>
        </disks>
        <policies>
            <s3_policy>
                <volumes>
                    <main>
                        <disk>s3_disk</disk>
                    </main>
                </volumes>
            </s3_policy>
        </policies>
    </storage_configuration>
</clickhouse>
```

The same configuration in YAML:

```yaml title="config.yaml" theme={null}
storage_configuration:
  disks:
    s3_disk:
      type: s3
      endpoint: https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/
      use_environment_credentials: 1
  policies:
    s3_policy:
      volumes:
        main:
          disk: s3_disk
```

A table can then use the disk through its storage policy:

```sql title="Query" theme={null}
CREATE TABLE test (a Int32, b String)
ENGINE = MergeTree() ORDER BY a
SETTINGS storage_policy = 's3_policy';
```

<h3 id="dynamic-configuration">
  Dynamic configuration
</h3>

A disk can also be defined directly in the settings of a `CREATE`/`ATTACH` query, without a predefined disk in the configuration files, using the `disk` function:

```sql title="Query" theme={null}
CREATE TABLE test (a Int32, b String)
ENGINE = MergeTree() ORDER BY a
SETTINGS disk = disk(
    type = s3,
    endpoint = 'https://s3.eu-west-1.amazonaws.com/clickhouse-eu-west-1.clickhouse.com/data/',
    use_environment_credentials = 1
);
```

See [Configuring external storage](/concepts/features/configuration/server-config/storing-data) for the full list of parameters of each disk type.

<h2 id="example">
  Example
</h2>

```sql title="Query" theme={null}
SELECT name, description
FROM system.disk_types
WHERE name IN ('local', 'object_storage')
ORDER BY name
```

<h2 id="see-also">
  See also
</h2>

* [`system.disks`](/reference/system-tables/disks) — The disk instances configured on the server.
* [`system.storage_policies`](/reference/system-tables/storage_policies) — Storage policies and volumes.
