简体   繁体   English

如何解释 Ceph 空间使用

[英]How to explain Ceph space usage

I looked up RBD disk space usage, but found different statistics from Ceph and the host which mounts the disk.我查看了 RBD 磁盘空间使用情况,但发现来自 Ceph 和挂载磁盘的主机的统计数据不同。

From Ceph:来自 Ceph:

$ rbd -p rbd du
NAME                                                        PROVISIONED    USED
kubernetes-dynamic-pvc-13a2d932-6be0-11e9-b53a-0a580a800339       40GiB 37.8GiB

From the host which mounts the disk从挂载磁盘的主机

$ df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/rbd0                39.2G     26.6G     10.6G  72% /data

How could I explain the difference?我如何解释这种差异?

You can check mount options of /dev/rbd0 device.您可以检查 /dev/rbd0 设备的挂载选项。 There should be no 'discard' option.不应该有“丢弃”选项。 Without that option filesystem cannot report to Ceph about reclaimed space.如果没有该选项,文件系统就无法向 Ceph 报告回收空间的情况。 So Ceph has no idea how much space is actually occupied on rbd volume.所以 Ceph 不知道 rbd 卷上实际占用了多少空间。 This is not a big problem and can be safely ignored.这不是一个大问题,可以安全地忽略。 You can rely on stats reported by kubelet.您可以依赖 kubelet 报告的统计数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM