-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
What is the problem you're trying to solve
Overlayfs snapshotter use overlay filesystem in a way when in case of write access the full content of a file will be copied from lowerdir to upperdir. During container start the containerd performs GID/UID remapping using "chown" for whole content of container rootfs. This leads to copying of whole rootfs content from lowerdir to upperdir. As result container start can take significant amount of time especially in case of huge files in container image.
Describe the solution you'd like
The overlayfs filesystem has "metadata" mount option that should solve this issue.
In case of overlayfs mount will be created with -o metadata the only files metadata be copied to upperdir. Upperdir will contain empty files with necessary attributes, but files content will be copied up in a lazy manner, when somebody attempts to open file for write.
Additional context
Thanks Rodrigo aka @rata for mentioning this possibility here:
#5890
Initial discussion for metadata only copy up support:
#5890 (comment)