Open tripitakav opened 7 months ago
containerd not support fs disk usage yet
when use containerd cri, we could get mountinfo from proc/self/mountinfo
like this:
2826 28 0:478 / /run/containerd/io.containerd.runtime.v2.task/k8s.io/02f14690a20e38c89d9f1c251b2b043c542e49d9aa62baa3408fb3e51d369819/rootfs rw,relatime shared:811 - overlay overlay rw,lowerdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66230/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66153/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66152/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66151/fs:/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/59780/fs,upperdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66239/fs,workdir=/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/66239/work,index=off
Therefore, when we query the disk usage of contianerd, we can use this directory/run/containerd/io.containerd.runtime.v2.task/k8s.io/02f14690a20e38c89d9f1c251b2b043c542e49d9aa62baa3408fb3e51d369819/rootfs
get disk usage by containerd rootfs:
kubectl version: v1.24.15-eks contained: 1.6.19