> ## 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.disks

<Info>
  **在 ClickHouse Cloud 中查询**

  此系统表中的数据分别保存在 ClickHouse Cloud 各节点的本地。因此，如需查看所有数据的完整情况，需要使用 `clusterAllReplicas` 函数。更多详情请参见[此处](/zh/reference/system-tables/overview#system-tables-in-clickhouse-cloud)。
</Info>

<div id="description">
  ## 描述
</div>

包含有关[服务器配置](/zh/reference/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes_configure)中定义的磁盘的信息。

<div id="columns">
  ## 列
</div>

* `name` ([String](/zh/reference/data-types)) — 服务器配置中磁盘的名称。
* `path` ([String](/zh/reference/data-types)) — 文件系统中挂载点的路径。
* `free_space` ([UInt64](/zh/reference/data-types)) — 磁盘上的可用空间，以字节为单位。
* `total_space` ([UInt64](/zh/reference/data-types)) — 磁盘总容量，以字节为单位。
* `unreserved_space` ([UInt64](/zh/reference/data-types)) — 未被预留占用的可用空间 (`free&#95;space` 减去当前正在运行的合并、插入及其他磁盘写入操作所占用的预留空间大小) 。
* `keep_free_space` ([UInt64](/zh/reference/data-types)) — 磁盘上应保持空闲的空间量，以字节为单位。在磁盘配置的 `keep&#95;free&#95;space&#95;bytes` 参数中定义。
* `type` ([String](/zh/reference/data-types)) — 磁盘类型，用于指示该磁盘将数据存储在何处——RAM、本地驱动器或远程存储。
* `object_storage_type` ([String](/zh/reference/data-types)) — 如果磁盘类型为 `object&#95;storage`，则表示对象存储的类型。
* `metadata_type` ([String](/zh/reference/data-types)) — 如果磁盘类型为 `object&#95;storage`，则表示元数据存储的类型。
* `is_encrypted` ([UInt8](/zh/reference/data-types)) — 标志位，表示该磁盘是否对底层数据进行加密。
* `is_read_only` ([UInt8](/zh/reference/data-types)) — 标志位，表示该磁盘仅支持读取操作。
* `is_write_once` ([UInt8](/zh/reference/data-types)) — 标志位，表示该磁盘是否为一次写入类型。这意味着它支持向该磁盘执行 BACKUP，但不支持向该磁盘上的 MergeTree 表执行 INSERT。
* `is_remote` ([UInt8](/zh/reference/data-types)) — 标志位，表示对该磁盘执行哪些操作会涉及网络交互。
* `is_broken` ([UInt8](/zh/reference/data-types)) — 标志位，表示该磁盘是否已损坏。损坏的磁盘空间将为 0，且无法使用。
* `cache_path` ([String](/zh/reference/data-types)) — 当该磁盘支持缓存时，本地驱动器上缓存目录的路径。

<div id="example">
  ## 示例
</div>

```sql theme={null}
SELECT * FROM system.disks;
```

```response theme={null}
┌─name────┬─path─────────────────┬───free_space─┬──total_space─┬─keep_free_space─┐
│ default │ /var/lib/clickhouse/ │ 276392587264 │ 490652508160 │               0 │
└─────────┴──────────────────────┴──────────────┴──────────────┴─────────────────┘

1 rows in set. Elapsed: 0.001 sec.
```
