Skip to main content

Module unmount

Module unmount 

Source
Expand description

Unmounting of FUSE-mounted Hexz filesystems.

This command safely detaches Hexz snapshots that were mounted as filesystems using the mount command. It uses platform-specific unmount tools and handles error cases gracefully.

§Unmount Strategy

The command tries unmount methods in order:

  1. Linux: fusermount -u (preferred for FUSE mounts)
  2. Fallback: umount (generic unmount tool)

§Usage

# Unmount a previously mounted snapshot
hexz vm unmount /mnt/snapshot

§Error Handling

The command handles several cases gracefully:

  • Not mounted: Returns success (already unmounted)
  • Busy: Reports error if mountpoint is in use
  • Permission denied: Reports error if insufficient privileges

§Safety

  • Does not modify the snapshot or overlay files
  • Safe to run even if already unmounted
  • Does not affect other mounts

§Overlay Persistence

If the mount was created with an overlay (--overlay), the overlay file remains intact after unmounting and can be used for future mounts or commits.

Functions§

run
Unmounts a previously mounted Hexz filesystem.