wrapper around tools that mount archives and an overlayfs on top to make writable.
Find a file
2026-01-10 14:17:29 +08:00
.gitignore Initial commit 2026-01-09 13:30:15 +00:00
_mount-impl.sh feat: init commit 2026-01-09 22:16:14 +08:00
LICENSE Initial commit 2026-01-09 13:30:15 +00:00
README.md chore: add more stuff to todo 2026-01-10 14:17:29 +08:00
setup-mount.sh feat: init commit 2026-01-09 22:16:14 +08:00

fuse-archive-mounter

name is tentative. suggestions welcome

what?

wrapper around overlayfs, fuse-archive and fuse that mount archives, plus an overlayfs on top mounted somewhere else to be writable.

why?

i have over 80 GiB of games inside .*\.(zip|rar|7z|tar\..+) archives. i don't delete the archives (in case i fuck up anything,) unless i despise said game. that means i basically have to spend 2x my disk space for a single game. with this, duplicate disk space usage is gone and my disk quota is happy.

where?

the scripts should work on most linux distros, though it will need some manual changes to work for most distros as well, details below.

i use nixos, so it has been imbued with nix specific things like nix-shell. for the few special snowflakes out there that also use nix, it's practically ready to go.

it's not going to work on macos or windows, because neither platform know what overlayfs is, one doesn't even know what fuse is.

at the bare minimum, you will need a system that: has a reasonably recent verison of bash, support for fuse and has the required dependencies installed.

dependencies

  • fuse-archive
  • fuse-overlayfs
  • psmisc

arch linux

$ sudo pacman -Syu fuse-overlayfs psmisc
$ paru -Syu fuse-archive
# or you know, do a paru one-liner, it's all up to you.

how?

  1. copy both sh files somewhere. chmod +x if needed.

    you can edit the filenames however you like. just make sure to update existing mount.sh files (if any) and setup-mount.sh to point at the correct file.

  2. edit setup-mount.sh:

  • set DEST_ARCHIVE_DIR to the place where you want your archive files to be moved to during setup.
  • set IMPL_SCRIPT_LOCATION to the full path of _mount-impl.sh. if you know what you're doing, do it your way.
  1. (only for non-nix users) modify _mount-impl.sh, replace the shebang with your regular bash, i.e. #!/usr/bin/bash

  2. profit. run setup-mount.sh theArchiveNameWithAFuckedUpZipFilenameEncoding.zip.tar.gz.xz.7z.rar, and it'll do stuff. check the on-screen prompt

doesn't work?

there are a few things that fuse assumes or requires for things to work. here's a list of scenario(s) that i've discovered that doesn't work.

  • preceding mounts are not mounts on concrete devices or doesn't support memcpy
    • i am not actually sure if either are the case, but on nixos sometimes my / becomes a tmpfs for whatever reason. that won't work and fuse will throw up. relog usually fixes this.

if it says setup-mount.sh: command not found, i hope you remember where you put the scripts.

improvements?

many improvements can be made, but i cannot be arsed at the moment. things include:

  • allow configuration of fuse-{overlayfs,archive} since not everyone has 64G of ram or enough /tmp space.
  • global configuration for things that need configuration
  • allow layering more stuff like bepinex for more storage savings