Search code examples
clickhouse

Clickhouse extend storage for the existing table


I have one ClickHouse table and my disk space shows me 1 GB left, I added one more disk, mounted it in ClickHouse and I can see it in system.disks.

How can I extend the current table storage so new data for my table will be written to the new mounted disk?


Solution

  • Have following options here

    1. add a new disk to default storage policy with proper move factor

    2. create a new storage policy with proper move factor and change storage policy via ALTER TABLE db.table MODIFY SETTINGS storage_policy='new_policy

    look details in documentation https://clickhouse.com/docs/en/engines/table-engines/mergetree-family/mergetree#table_engine-mergetree-multiple-volumes_configure