Enable tiered storage in Aiven for ClickHouse®
Enable the tiered storage feature on a table in your Aiven for ClickHouse® service.
Limitations
-
You can enable tiered storage on the Aiven tenant (in non-BYOC environments) if your Aiven for ClickHouse service is hosted on Azure, AWS, or GCP.
-
When enabled, the tiered storage feature cannot be deactivated.
tipAs a workaround, you can create a table (without enabling tiered storage on it) and copy the data from the original table (with the tiered storage enabled) to the new table. As soon as the data is copied to the new table, you can remove the original table.
-
With the tiered storage feature activated, it's not possible to connect to an external existing object storage or cloud storage bucket.
Prerequisites
- You have at least one Aiven for ClickHouse service.
- Depending on how to activate tiered storage, you need:
- Aiven Console or
- SQL and an SQL client (for example, the ClickHouse client).
- All maintenance updates are applied on your service (check in the Aiven Console: your service's Overview > Service settings > Service management > Maintenance updates).
Activate tiered storage on a table
You can enable tiered storage both on new tables and on existing ones. For that purpose, you can use either CLI or the Aiven Console.
- Console
- CLI
- Log in to the Aiven Console, and go to your organization, project, and service.
- On the Overview of your service, select Databases and tables from the sidebar.
- In the Databases and tables view, find a table on which to activate tiered storage, and click Actions > Activate tiered storage > Activate.
-
Connect to your Aiven for ClickHouse service using, for example, the ClickHouse client.
-
To activate the tiered storage feature on a specific table, set
storage_policy
totiered
on this table by executing the following SQL statement:ALTER TABLE database-name.table-name MODIFY SETTING storage_policy = 'tiered'
Tiered storage is activated on your table and data in this table is now distributed between two tiers: SSD and object storage.
You can check if tiered storage is now supported (Active/Not active) on your table in the Aiven Console > your service's page > Databases and tables > Your database > Your table > Tiered storage column.
What's next
- Configure data retention thresholds for tiered storage
- Check data volume distribution between different disks