Skip to content
Alex Fishman edited this page Sep 5, 2022 · 24 revisions

About

This page is for providing a guidance for developers who wish to implement a filesystem based on fuse or port an existing one. In general, the code that worked with osxfuse should work as-is without any changes except linking to a new fuse-t library provided in the installation package.
The installation package copies the following files to your system:

  • FUSE include headers in /usr/local/include/fuse
  • FUSE dynamic and static library in /usr/local/include/lib: libfuse-t.dylib and libfuse-t.a
  • NFS server and support files in /Library/Application Support/fuse-t

Getting started

Take a look at examples provided by libfuse. It contains samples of working filesystems. In particular take a look at fusexmp_fh which implements a mirror filesystem.

Supported mount options

The following mount options are supported at this moment:

  • -r: Mount a read-only filesystem. Usage: [exec] -r or [exec] -o,ro
  • -volname: Name a volume in Finder. Usage: [exec] -o,volname=somename

Additional options:

  • -d: Debug mode. Usage: [exec] -d . The NFS sever will write debug logs to /Application Support/Logs/fuse-t folder
  • -l: Set NFS listen address instead of a default one. Usage: [exec] -l 0:1234 . Pay attention that this might expose the NFS server to external connectivity and currently there's no authentication implemented.

Unsupported features

Some of the FUSE features are not supported at the moment

  • Locks: Work in progress
  • Notifications: Work in progress
  • IOCTL call
  • BMAP call
  • FALLOCATE call
  • ACCESS and STATFS calls: there's no clear mapping between NFS and FUSE functions, therefore those are uncalled

Caveats

  • A call sequence might look very different from the original osxfuse. It shouldn't cause issues unless the filesystem implementation is buggy.
  • READDIR call should return all results in the first pass. This limitation hopefully should be dropped for the next release
  • Caching of attributes is done by the NFS client. Currently the caching attributes returned by the filesystem implementation are ignored.
Clone this wiki locally