storage-driver: promote overlay2, make Btrfs and ZFS opt-in#42661
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jul 23, 2021
Merged
storage-driver: promote overlay2, make Btrfs and ZFS opt-in#42661thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
thaJeztah
commented
Jul 21, 2021
daemon/graphdriver/driver_linux.go
Outdated
Member
Author
There was a problem hiding this comment.
@AkihiroSuda ptal; I wasn't sure if btrfs/zfs should be tried before or after fuse-overlayfs (I think this is the most logical order, but let me know if not)
Member
Author
AkihiroSuda
approved these changes
Jul 21, 2021
The daemon uses a priority list to automatically select the best-matching storage driver for the backing filesystem that is used. Historically, overlay2 was not supported on Btrfs and ZFS, and the daemon would automatically pick the `btrfs` or `zfs` storage driver if that was the Backing File System. Commits 649e4c8 and e226aea improved our detection to check if overlay2 was supported on the backing file- system, allowing overlay2 to be used on top of Btrfs or ZFS, but did not change the priority list. While both Btrfs and ZFS have advantages for certain use-cases, and provide advanced features that are not available to overlay2, they also are known to require more "handholding", and are generally considered to be mostly useful for "advanced" users. This patch changes the storage-driver priority list, to prefer overlay2 (if supported by the backing filesystem), and effectively makes btrfs and zfs opt-in storage drivers. This change does not affect existing installations; the daemon will detect the storage driver that was previously in use (based on the presence of storage directories in `/var/lib/docker`). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
|
Let me add to the commit message that this won't affect existing installs (for completeness); existing installs will continue the storage driver that is in use after updating (as it detects the storage directory) |
84b1e7d to
d5dbbb5
Compare
Member
Author
|
done. 😅 |
Member
Author
|
Failures are known flaky tests, although hopefully this one would've been fixed by #42625. This is on Windows 2022; Other failure |
tao12345666333
approved these changes
Jul 21, 2021
Contributor
tao12345666333
left a comment
There was a problem hiding this comment.
I think it makes sense, LGTM!
Member
Author
|
🤔 |
Member
Author
|
Yay! All green now |
t-lo
added a commit
to flatcar/mantle
that referenced
this pull request
Oct 25, 2023
This change adds an explicit brtfs driver request in /etc/docker/daemon.json to un-break the docker btrfs test for docker 23 and above. The explicit storage driver configuration does not break docker 20 and older; it works fine if btrfs storage is provided (which it is in the test). Starting with docker 23, overlay2 is the default also for btrfs filesystems, and the btrfs driver is opt-in. See https://docs.docker.com/engine/release-notes/23.0/#bug-fixes-and-enhancements-6 and moby/moby#42661 Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The daemon uses a priority list to automatically select the best-matching storage
driver for the backing filesystem that is used.
Historically, overlay2 was not supported on Btrfs and ZFS, and the daemon would
automatically pick the
btrfsorzfsstorage driver if that was the BackingFile System.
Commits 649e4c8 and e226aea (#40210)
improved our detection to check if overlay2 was supported on the backing file-
system, allowing overlay2 to be used on top of Btrfs or ZFS, but did not change
the priority list.
While both Btrfs and ZFS have advantages for certain use-cases, and provide
advanced features that are not available to overlay2, they also are known
to require more "handholding", and are generally considered to be mostly
useful for "advanced" users.
This patch changes the storage-driver priority list, to prefer overlay2 (if
supported by the backing filesystem), and effectively makes btrfs and zfs
opt-in storage drivers.
This change does not affect existing installations; the daemon will detect
the storage driver that was previously in use (based on the presence of
storage directories in
/var/lib/docker).- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)