ipfs/kubo · error
unmount: unimplemented
Error message
unmount: unimplemented
What it means
UnmountCmd builds the platform-specific unmount command for a mountpoint; on platforms other than linux (and darwin/other handled branches above) it returns the error 'unmount: unimplemented', meaning ForceUnmount cannot work on this GOOS.
Source
Thrown at fuse/mount/mount.go:74
return fmt.Errorf("umount timeout")
case err := <-errc:
return err
}
}
// UnmountCmd creates an exec.Cmd that is GOOS-specific
// for unmount a FUSE mount.
func UnmountCmd(point string) (*exec.Cmd, error) {
switch runtime.GOOS {
case "darwin":
return exec.Command("diskutil", "umount", "force", point), nil
case "linux":
if _, err := exec.LookPath("fusermount3"); err == nil {
return exec.Command("fusermount3", "-u", point), nil
}
return exec.Command("fusermount", "-u", point), nil
default:
return nil, fmt.Errorf("unmount: unimplemented")
}
}
// ForceUnmountManyTimes attempts to forcibly unmount a given mount,
// many times. It does so by calling diskutil or fusermount directly.
// Attempts a given number of times.
func ForceUnmountManyTimes(m Mount, attempts int) error {
var err error
for range attempts {
err = ForceUnmount(m)
if err == nil {
return err
}
<-time.After(time.Millisecond * 500)
}
return fmt.Errorf("unmount %s failed after 10 seconds of trying", m.MountPoint())
}View on GitHub (pinned to 329838acdf)
Solutions
- Run on Linux (fusermount3/fusermount) or macOS (diskutil) where unmount is implemented
- On unsupported platforms, avoid ForceUnmount and use the mount server's own Unmount() (go-fuse) instead
- Guard code paths with runtime.GOOS checks so forced unmounts are only attempted on supported systems
Example fix
// before
err := mount.ForceUnmountManyTimes(m, 10)
// after
if runtime.GOOS != "linux" && runtime.GOOS != "darwin" {
err = m.Unmount() // go-fuse server unmount, portable
} else {
err = mount.ForceUnmountManyTimes(m, 10)
} Defensive patterns
Strategy: validation
Validate before calling
switch runtime.GOOS {
case "linux", "darwin":
// safe to call UnmountCmd
default:
// do not call; use m.Unmount() or skip
} Prevention
- Gate ForceUnmount calls behind runtime.GOOS checks
- On unsupported platforms rely on the go-fuse server's own Unmount
- Test mount code paths per target OS in CI
When it happens
Trigger: Calling ForceUnmount/UnmountCmd on a GOOS that lacks a dedicated case (e.g. windows, freebsd, openbsd) — any forced-unmount attempt at runtime on an unsupported platform.
Common situations: Running kubo FUSE mount tests or auto-unmount logic on an OS without fusermount/diskutil support; cross-platform code assuming Linux semantics.
Related errors
- not mounted
- umount timeout
- unmount %s failed after 10 seconds of trying
- mountFuse: GetConfig() failed: %s
- mountFuse: ConstructNode() failed: %s
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/298d2dde05af947f.
Report an issue: GitHub.