# Find snapshot path SNAPSHOT_PATH=$(crictl inspect <container> | jq -r '.info.rootDir') cp -al $SNAPSHOT_PATH /tmp/clone-rootfs Now modify /tmp/clone-rootfs without affecting the original (COW at file level)
"info": "rootDir": "/var/lib/containerd/io.containerd.runtime.v2.task/k8s.io/<container-id>/rootfs" cri file system tools link
Rebuild the image ensuring absolute symlinks or correct relative paths. Scenario 2: Disk space leak from dangling snapshot links Sometimes, the parent link remains even after the child snapshot is deleted, preventing garbage collection. preventing garbage collection.