diff --git a/pkg/mounter/mounter.go b/pkg/mounter/mounter.go index d190f20..9d78799 100644 --- a/pkg/mounter/mounter.go +++ b/pkg/mounter/mounter.go @@ -73,7 +73,13 @@ func fuseMount(path string, command string, args []string, envs []string) error } func Unmount(path string) error { - if err := mount.New("").Unmount(path); err != nil { + mounter := mount.New("") + isNotMountPoint, err := mounter.IsNotMountPoint(path) + if isNotMountPoint || err != nil { + glog.Warningf("Skip Unmount since path (%s) may not a valid mount point: %v", path, err) + return nil + } + if err := mounter.Unmount(path); err != nil { return err } return nil