Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon/graphdriver: don't unmount graphdriver root #41903

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jan 20, 2021

depends on moby/sys#62
fixes #39267

Most graphdrivers no longer re-mount the graphdriver root, so we should not try to unmount the root itself, to allow users to mount a custom storage location at the graphdriver's root.

Some exceptions:

NOTE: Perhaps no unmounting is needed at all, looking at;

  • commit 3609b05 (scoped "makeprivate" to graphdriver root only)
  • commit 9803272 (removed the "makeprivate")

- Description for the changelog

- Don't unmount graph-driver root directory on daemon shutdown, to allow custom storage mounts

- A picture of a cute animal (not mandatory but encouraged)

Most graphdrivers no longer re-mount the graphdriver root, so
we should not try to unmount the root itself, to allow users
to mount a custom storage location at the graphdriver's root.

Some exceptions:

- BTRFS looks to still do a remount; https://github.com/moby/moby/blob/v20.10.2/daemon/graphdriver/btrfs/btrfs.go#L86-L90
- Devicemapper's "shutdown" function calls "unmountAndDeactivateAl()", which unmounts
  all mounts https://github.com/moby/moby/blob/v20.10.2/daemon/graphdriver/devmapper/deviceset.go#L2245-L2277

NOTE: Perhaps no unmounting is needed at all, looking at;

- commit 3609b05 (scoped "makeprivate" to graphdriver root only)
- commit 9803272 (removed the "makeprivate")

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

overlay2 mount point lost if mount to /var/lib/docker/overlay2
1 participant