How is the disk capacity calculated in the cluster information under Disk after installing and deploying TiDB 7.4.0?

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

Original topic: TiDB_7.4.0_安装部署后,集群信息–磁盘–磁盘容量的是如何计算的

| username: Aionn

【TiDB Usage Environment】Testing on this machine
【TiDB Version】7.4.0
【Reproduction Path】Installation and deployment
【Encountered Issue: Phenomenon and Impact】The calculation rule for “Disk Capacity” displayed on the page. My current disk information is as follows
【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots/Logs/Monitoring】


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

This statistic seems to be inaccurate. It’s best to check the server with df -h.

| username: 舞动梦灵 | Original post link

The graphical interface shows less than the system’s df -h command. The graphical result is obtained by dividing the df -m result by 1024 again. For example, the partition is 99G, and the result of df -m is 10665. Dividing 10665 by 1024 gives 98.3. As shown in the second image, it is 98.3G.

| username: Aionn | Original post link

Thank you for the explanation. I think I should provide my data here for analysis.

The result obtained using df -h

The result obtained using df -m

From the first image, it can indeed be seen as 233GB, and from the second image, it appears to be around 239GB.

| username: 舞动梦灵 | Original post link

How do you see it as 239G?? 239072 is in MB, divided by 1024 equals 233.468. The graphical display shows 233.5, which is just the result of rounding. This is correct. The df -h result is 233, which means it directly takes 233 and ignores everything after the decimal point.

| username: Aionn | Original post link

Got it, understood. The unit here should be MB.

| username: 舞动梦灵 | Original post link

Correct, the ‘-m’ option in ‘df -m’ displays the result in MB. If you use ‘df -k’ or just ‘df’, the result will be in KB.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.