Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Expanding the Data Disk Capacity of a ClickHouse Node

Updated on 2024-05-28 GMT+08:00

With the service volume increase, the data disk capacity of the ClickHouse node cannot meet service requirements and needs to be expanded.

CAUTION:

For a pay-per-use MRS cluster, the billing mode cannot be changed to yearly/monthly after the disk capacity is expanded.

This section applies only to MRS 3.1.0.

Prerequisites

  • The ClickHouse cluster and instances are normal.
  • You have evaluated the data disk capacity of the ClickHouse node to be expanded.

Expanding the Capacity of a Data Disk

  1. Log in to the MRS console. In the left navigation pane, choose Active Clusters and click a cluster name.
  2. Click Nodes. In the corresponding ClickHouse node group, click the name of the node to be expanded. The Disks page is displayed.

  3. In the row of the target data disk, click Expand Capacity.

    NOTE:

    If only the system disk is displayed on the current page and no data disk exists, the data disk of the ClickHouse node cannot be expanded using this method.

  4. Modify the disk capacity to be added in Add Capacity (GB) and click Next.

  5. Read the note for capacity expansion carefully, click Expand Capacity, confirm the information about the expanded disk capacity, and click Submit.

  6. Log in to the expanded ClickHouse node as user root and run the df -hl command to view information about the existing data directory and disk partition.

    The default format of a ClickHouse data directory is /srv/BigData/dataN. The preceding figure shows that the ClickHouse data directory is /srv/BigData/data1 and the corresponding partition is /dev/vdb1.

  7. Perform the following operations to make the new disk capacity take effect.

    • To add a partition, go to 8. Adding a partition is to allocate the added disk capacity to a new partition and mount a new ClickHouse data directory to the new partition. This operation does not interrupt services.
    • To extend an existing partition, go to 15. Extending an existing partition is to allocate the added disk capacity to an existing partition. Services will be interrupted during the operation. You are advised to stop services before the operation.

  8. For details about how to add a partition, see "Creating a New MBR Partition" or "Creating a New GPT Partition" in Extending Partitions and File Systems for Data Disks (Linux).
  9. Log in to the expanded ClickHouse node as user root and run the following commands to create a ClickHouse data directory and create a mount point for the new partition. It is recommended that the directories be numbered in ascending order based on the current number.

    For example, if the current data directory is /srv/BigData/data1, the added directory should be /srv/BigData/data2.

    cd /srv/BigData/

    mkdir data2

    cd data2

    mkdir clickhouse

    cd /srv/BigData/

    chmod 750 -R data2

    chown omm:wheel -R data2

  10. Run the following command to mount the new partition:

    mount Disk partition Mounted directory

    For example, if the new partition is /dev/vdb2 and the mounted directory is /srv/BigData/data2, run the following command:

    mount /dev/vdb2 /srv/BigData/data2

    NOTE:

    If the ECS is restarted, the mounting will become invalid. You can set automatic mounting for partitions at system start by modifying the /etc/fstab file. For details, see Configuring Automatic Mounting at System Start.

  11. Log in to FusionInsight Manager. For details, see Accessing FusionInsight Manager (MRS 3.x or Later). Choose Cluster > ClickHouse > Configurations > All Configurations.
  12. Search for _clickhouse.storage_configuration.disks and add the new ClickHouse data directory to the configuration item.

    NOTE:

    Separate multiple directories with commas (,) and ensure that each directory ends with a slash (/).

    For example, add /srv/BigData/data2/clickhouse/ to /srv/BigData/data1/clickhouse/, and the new directory is /srv/BigData/data1/clickhouse/,/srv/BigData/data2/clickhouse/.

  13. After the new directory is added, click Save to save the configuration. Click Dashboard, choose More > Synchronize Configuration, and click OK.
  14. Log in to the expanded ClickHouse node, go to the following directory, and check whether the new data directory has been updated to the configuration file. After confirming that the information is correct, the operation is complete.

    cd ${BIGDATA_HOME}/FusionInsight_ClickHouse_*/x_x_ClickHouse instance name/etc

    cat config.xml

    The following figure shows an example that the /srv/BigData/data2/clickhouse/ directory has been added to the config.xml file.

  15. To extend an existing partition, ensure that the ClickHouse service has been stopped before the operation. Otherwise, services will be interrupted during the operation.
  16. Determine the partition to be extended based on 6 and extend the partition by referring to "Extending an Existing MBR or GPT Partition" in Extending Partitions and File Systems for Data Disks (Linux).
  17. After the existing partition is extended, run the ClickHouse service again.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback