Score:1

What path on disk does a containerd snapshot key map to?

in flag

I want to remove a snapshot from a node in our Kubernates cluster:

/var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/NNNN

But I am unable to map this path to any snapshots as reported by ctr -n k8s.io snapshots list. I have tried the usage command, but the INODE does not seem to map to the NNNN entry in the snapshots directory, because the "usage" list is not a subset of the entries in the directory.

Is there a way to understand if snapshot/NNNN is in use?

Score:0
cn flag

The mapping is stored in /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs/metadata.db

This database file map between the SHA256 hash of the snapshot and the snapshot id (the 'nnnn' number used as a directory name). the database format is Bolt DB (the library used for read/write is bbolt).

I have written an open source project that, among other things, reads that database.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.