首页 > 解决方案 > Ceph RBD 实际空间使用量远大于挂载后的磁盘使用量

问题描述

我试图了解如何找出 ceph 集群的当前和实际磁盘使用情况,我注意到rbd du的输出与df -h的输出在rbd 挂载为磁盘后完全不同。

例子:

在工具箱中,我有以下内容:

$ rbd du replicapool/csi-vol-da731ad9-eebe-11eb-9fbd-f2c976e9e23a
warning: fast-diff map is not enabled for csi-vol-da731ad9-eebe-11eb-9fbd-f2c976e9e23a. operation may be slow.
2021-09-01T13:53:23.482+0000 7f8c56ffd700 -1 librbd::object_map::DiffRequest: 0x557402c909c0 handle_load_object_map: failed to load object map: rbd_object_map.8cdeb6e704c7e0
NAME                                          PROVISIONED  USED
csi-vol-da731ad9-eebe-11eb-9fbd-f2c976e9e23a      100 GiB  95 GiB

但是,在安装此 rbd 的 Pod 内,我有:

$ k exec -it -n monitoring prometheus-prometheus-operator-prometheus-1 -- sh
Defaulting container name to prometheus.
Use 'kubectl describe pod/prometheus-prometheus-operator-prometheus-1 -n monitoring' to see all of the containers in this pod.
/prometheus $ df -h
Filesystem                Size      Used Available Use% Mounted on
overlay                  38.0G     19.8G     18.2G  52% /
...
/dev/rbd5                97.9G     23.7G     74.2G  24% /prometheus
...

有没有理由让这两个结果如此不同?当 ceph 跟踪集群使用的总空间以了解有多少可用空间时,这会不会是一个问题?

标签: kubernetesceph

解决方案


推荐阅读