Skip to content

Instantly share code, notes, and snippets.

@siscia
Last active January 13, 2020 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siscia/11a906b47ddafcdb653379bcff8dc21c to your computer and use it in GitHub Desktop.
Save siscia/11a906b47ddafcdb653379bcff8dc21c to your computer and use it in GitHub Desktop.
A filesystem structure to serve container from local storage

DUCC filesystem structure

The DUCC filesystem structure is developed inside CERN to allow the efficient distribution of containers images. The structure itself is orthogonal to the filesystem implementation, but it was designed to work effiecientely with CernVM-FS.

Why formalize it

o) Naming o) Having a common understading of the benefits

Proposed structure

The structure is simple and straighforward.

The filesystem contains a .layer directory.

The .layer directory contains 256 subdirectory in the form: 00, 01, 02, ..., 10, 11, 12, ..., a0, a1, a2, ..., f0, f1, ..., ff. We will call this directories, aggregate directories.

Each aggregate directory will contains the layers which digest begins with the name of the directory.

Eg. the layer ff886ab914c256f29a3cf0453e20428d050a4760eb834a2b778528faa3bfd526 will be in the aggregate directory ff, while the layer d0957ffdf8a2ea8c8925903862b65a1b6850dbb019f88d45e927d3d5a3fa0c31 will be in the aggregate directory d0.

Inside the aggregate directory, each layer will have its own directory, called exactly as the hash of the layer itself, without the information regarding the type of hashing used. We will call this directories layer directories.

Eg. the layer sha256:ff886ab914c256f29a3cf0453e20428d050a4760eb834a2b778528faa3bfd526 will leave in the layer directory: ff886ab914c256f29a3cf0453e20428d050a4760eb834a2b778528faa3bfd526.

Each layer directory contains two other directories: 1)

Implemetation

Working on a containerd implementation, considering a podman implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment