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

<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.
```
