Skip to main content
Skip to main content

system.disks

Querying in ClickHouse Cloud

The data in this system table is held locally on each node in ClickHouse Cloud. Obtaining a complete view of all data, therefore, requires the clusterAllReplicas function. See here for further details.

Contains information about disks defined in the server configuration.

Columns:

  • name (String) — Name of a disk in the server configuration.
  • path (String) — Path to the mount point in the file system.
  • free_space (UInt64) — Free space on disk in bytes.
  • total_space (UInt64) — Disk volume in bytes.
  • unreserved_space (UInt64) — Free space which is not taken by reservations (free_space minus the size of reservations taken by merges, inserts, and other disk write operations currently running).
  • keep_free_space (UInt64) — Amount of disk space that should stay free on disk in bytes. Defined in the keep_free_space_bytes parameter of disk configuration.
  • type (String) — The disk type which tells where this disk stores the data - RAM, local drive or remote storage.
  • object_storage_type (String) — Type of object storage if disk type is object_storage
  • metadata_type (String) — Type of metadata storage if disk type is object_storage
  • is_encrypted (UInt8) — Flag which shows whether this disk ecrypts the underlying data.
  • is_read_only (UInt8) — Flag which indicates that you can only perform read operations with this disk.
  • is_write_once (UInt8) — Flag which indicates if disk is write-once. Which means that it does support BACKUP to this disk, but does not support INSERT into MergeTree table on this disk.
  • is_remote (UInt8) — Flag which indicated what operations with this disk involve network interaction.
  • is_broken (UInt8) — Flag which indicates if disk is broken. Broken disks will have 0 space and cannot be used.
  • cache_path (String) — The path to the cache directory on local drive in case when the disk supports caching.

Example

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.