diff --git a/contrib/check-config.sh b/contrib/check-config.sh index 54b1359a2..e9fbb21e9 100755 --- a/contrib/check-config.sh +++ b/contrib/check-config.sh @@ -166,7 +166,7 @@ echo '- Storage Drivers:' check_flags BLK_DEV_DM DM_THIN_PROVISIONING EXT4_FS EXT4_FS_POSIX_ACL EXT4_FS_SECURITY | sed 's/^/ /' echo '- "'$(wrap_color 'overlayfs' blue)'":' - check_flags OVERLAYFS_FS | sed 's/^/ /' + check_flags OVERLAY_FS | sed 's/^/ /' } | sed 's/^/ /' echo diff --git a/daemon/graphdriver/overlayfs/overlayfs.go b/daemon/graphdriver/overlayfs/overlayfs.go index a9ce75a37..d7dfcb24a 100644 --- a/daemon/graphdriver/overlayfs/overlayfs.go +++ b/daemon/graphdriver/overlayfs/overlayfs.go @@ -9,7 +9,6 @@ import ( "os" "os/exec" "path" - "strings" "sync" "syscall" @@ -115,7 +114,7 @@ func Init(home string, options []string) (graphdriver.Driver, error) { func supportsOverlayfs() error { // We can try to modprobe overlayfs first before looking at // proc/filesystems for when overlayfs is supported - exec.Command("modprobe", "overlayfs").Run() + exec.Command("modprobe", "overlay").Run() f, err := os.Open("/proc/filesystems") if err != nil { @@ -125,11 +124,11 @@ func supportsOverlayfs() error { s := bufio.NewScanner(f) for s.Scan() { - if strings.Contains(s.Text(), "overlayfs") { + if s.Text() == "nodev\toverlay" { return nil } } - log.Error("'overlayfs' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlayfs support loaded.") + log.Error("'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded.") return graphdriver.ErrNotSupported } @@ -274,7 +273,7 @@ func (d *Driver) Get(id string, mountLabel string) (string, error) { mergedDir := path.Join(dir, "merged") opts := fmt.Sprintf("lowerdir=%s,upperdir=%s,workdir=%s", lowerDir, upperDir, workDir) - if err := syscall.Mount("overlayfs", mergedDir, "overlayfs", 0, label.FormatMountLabel(opts, mountLabel)); err != nil { + if err := syscall.Mount("overlay", mergedDir, "overlay", 0, label.FormatMountLabel(opts, mountLabel)); err != nil { return "", err } mount.path = mergedDir