FUSE-T on MacOS

Would FUSE-T be usable for Restic on Mac? I have MacFUSE working right now just fine, but I know Apple is trying to force users away from kernel extensions. A userspace FUSE makes sense. I’m just not sure if Restic could be made to utilize it?

I came across this while trying to mount an NTFS volume, and found instructions on how to hack FUSE-T in and use it instead of MacFUSE:

https://www.reddit.com/r/MacOS/comments/16vmecr/ntfs_on_macos_sonoma_hacky_but_works/

I am with you on this - FUSE-T support would be something extremely beneficial for macOS crowd. MacFUSE days are over already.

It looks like fuse-t can be supported without using CGO. There’s initial support in Get FUSE-T support stable · Issue #4 · anacrolix/fuse · GitHub . It would help if someone could give build(deps): bump github.com/anacrolix/fuse from 0.2.0 to 0.3.0 by dependabot[bot] · Pull Request #4556 · restic/restic · GitHub a try. However, last time I looked the code failed to compile on Linux, such that we likely have to wait for a new release of the fuse library.

1 Like

I was able to build it and mount my repo on an Intel MacBook :+1:

It mounted differently. It usually mounts on the desktop with “macFUSE Volume 0 (restic)” as the name. This time it mounted with the name of the mount folder instead. It also appears to have mounted MUCH more quickly with this new build. Promising indeed!

Oh wow! It was even able to mount my work repo.

So my home repo is about ~4TB. It mounts just fine with the main build and this build. But since this build did it faster, I was curious if it would mount my work repo.

My work repo is about ~7TB. On both my Intel and M1 Mac, it swells to about ~15GB of RAM then is killed by Zsh. Both Macs only have 16GB of RAM. I typically have to restic copy to a local, smaller repo, and can then mount it. Or use a combination of ls and restore to figure out what I want and restore it.

With this build, it took a good 10 minutes, but it only swelled to about ~13GB of RAM then successfully mounted and released all that RAM. So this PR is definitely on to something. :slight_smile:

EDIT: If I eject it via MacOS instead of CTRL+C in the Terminal, I do get a runtime error haha

repository f186139f opened (version 2, compression level max)
[1:50] 100.00%  476 / 476 index files loaded
Now serving the repository at /Users/akrabu/mnt/3
Use another terminal or tool to browse the contents of this folder.
When finished, quit with Ctrl-c here or umount the mountpoint.
panic: runtime error: slice bounds out of range [4:0]

goroutine 1 [running]:
github.com/anacrolix/fuse.(*Conn).ReadSingle(0x274a100?, {0xc0ee17a000, 0x1001000, 0x1001000})
	github.com/anacrolix/fuse@v0.3.0/fuse.go:611 +0xdd
github.com/anacrolix/fuse.(*Conn).ReadRequest(0xc05897f200)
	github.com/anacrolix/fuse@v0.3.0/fuse.go:628 +0xfa
github.com/anacrolix/fuse/fs.(*Server).Serve(0xc00035a000, {0x1f816c0?, 0xc0001d83c0})
	github.com/anacrolix/fuse@v0.3.0/fs/serve.go:503 +0x385
github.com/anacrolix/fuse/fs.Serve(0xc05897f200, {0x1f816c0, 0xc0001d83c0})
	github.com/anacrolix/fuse@v0.3.0/fs/serve.go:524 +0x135
main.runMount({_, _}, {0x0, 0x0, 0x0, {{}, {0x0, 0x0, 0x0}, {0x0, ...}, ...}, ...}, ...)
	github.com/restic/restic/cmd/restic/cmd_mount.go:198 +0x7c7
main.glob..func17(0xc000209700?, {0xc00040c0b0?, 0x4?, 0x1db6f12?})
	github.com/restic/restic/cmd/restic/cmd_mount.go:71 +0x89
github.com/spf13/cobra.(*Command).execute(0x275a820, {0xc00040c070, 0x1, 0x1})
	github.com/spf13/cobra@v1.7.0/command.go:940 +0x87c
github.com/spf13/cobra.(*Command).ExecuteC(0x275c7c0)
	github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v1.7.0/command.go:992
github.com/spf13/cobra.(*Command).ExecuteContext(...)
	github.com/spf13/cobra@v1.7.0/command.go:985
main.main()
	github.com/restic/restic/cmd/restic/main.go:109 +0x1a5