TiKV Disk Expansion

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIKV磁盘扩容

| username: TiDBer_bOR8eMEn

[TiDB Usage Environment] Production Environment
[TiDB Version] 5.2.3
[Reproduction Path] Currently, the disk utilization rate of TiKV nodes in production has reached 80%. Now we want to expand the disk capacity of these three machines. What should we pay attention to?
Without adding nodes, can we just expand the disks on these three machines?

| username: 连连看db | Original post link

Adding nodes is horizontal scaling.

| username: 像风一样的男子 | Original post link

Horizontal scaling means adding nodes, and the data will automatically balance to the newly added nodes. Adding disks is the simplest solution.

| username: Miracle | Original post link

What he probably means is adding a disk.

| username: TiDBer_bOR8eMEn | Original post link

Is it possible to expand the disk capacity of these three machines without adding nodes? Will there be any issues in the process? I see that online, most people talk about scaling nodes, and it’s rare to directly add disks.

| username: TiDBer_bOR8eMEn | Original post link

Can we directly add a disk without any issues? Our company uses Tencent Cloud.

| username: TiDBer_jYQINSnf | Original post link

If the CPU is not under much pressure, adding disks through LVM is imperceptible to TiKV. Other methods would require shutting down one TiKV, adjusting the disk, starting it up, and then shutting down another.

| username: Fly-bird | Original post link

Expanding the disk will suffice.

| username: TiDBer_bOR8eMEn | Original post link

Oh, oh, for which machine to expand, just shut it down first, and then you can directly expand the disk when the cluster is healthy, right?

| username: 连连看db | Original post link

Expanding the cloud disk is seamless, just go ahead and do it.

| username: 像风一样的男子 | Original post link

Sure, you can find documentation on Tencent Cloud for a disk expansion tutorial.

| username: zhanggame1 | Original post link

How do you plan to expand the disk capacity?

| username: TiDBer_jYQINSnf | Original post link

Looking at other people’s replies about cloud hosts, cloud hosts are more convenient, and disk expansion is seamless. Is your environment a cloud host? If not, check if your disk is mounted under LVM. If it is mounted under LVM, you can also expand seamlessly. If it’s not LVM, then shut down for expansion: evict the leader, shut down, expand, restart, and move on to the next one.

| username: Kongdom | Original post link

:thinking: From what I understand, expanding a disk just means adding more space to it, right? It should be fine as long as you don’t format the disk to add space.

| username: TiDBer_jYQINSnf | Original post link

Expansion like LVM:
Format the new disk, create a PV, add it to the VG, expand the LV, and expand the FS. It’s not very simple; if you’re familiar with it, it’s easy, but if you’re not, it can be quite challenging to understand.

| username: 这里介绍不了我 | Original post link

How many nodes are there in this cluster?

| username: TiDBer_bOR8eMEn | Original post link

3 nodes

| username: TiDBer_bOR8eMEn | Original post link

Got it, thank you.

| username: lemonade010 | Original post link

It’s just applying for a new disk, expanding the VG, and expanding the FS. This has nothing to do with the cluster, right? It can be expanded online.

| username: TiDBer_bOR8eMEn | Original post link

The image you provided is not visible. Please provide the text you need translated.