disks
在 ClickHouse Cloud 中查询
此系统表中的数据本地保存在 ClickHouse Cloud 的每个节点上。 因此,要获得所有数据的完整视图,需要使用 clusterAllReplicas
函数。 有关更多详细信息,请参阅此处。
包含在 服务器配置中定义的磁盘信息。
列
name
(String) — 服务器配置中磁盘的名称。path
(String) — 文件系统中挂载点的路径。free_space
(UInt64) — 磁盘上的可用空间,以字节为单位。total_space
(UInt64) — 磁盘容量,以字节为单位。unreserved_space
(UInt64) — 未被预留占用的可用空间(free_space
减去当前正在运行的合并、插入和其他磁盘写入操作所占用的预留大小)。keep_free_space
(UInt64) — 磁盘上应保持空闲的磁盘空间量,以字节为单位。 在磁盘配置的keep_free_space_bytes
参数中定义。
示例
SELECT * FROM system.disks;
┌─name────┬─path─────────────────┬───free_space─┬──total_space─┬─keep_free_space─┐
│ default │ /var/lib/clickhouse/ │ 276392587264 │ 490652508160 │ 0 │
└─────────┴──────────────────────┴──────────────┴──────────────┴─────────────────┘
1 rows in set. Elapsed: 0.001 sec.