All Projects → hanwen → Go Fuse

hanwen / Go Fuse

Licence: other
FUSE bindings for Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Go Fuse

Google Drive Ocamlfuse
FUSE filesystem over Google Drive
Stars: ✭ 4,447 (+250.99%)
Mutual labels:  fuse, filesystem
Dbxfs
User-space file system for Dropbox
Stars: ✭ 673 (-46.88%)
Mutual labels:  fuse, filesystem
Securefs
Filesystem in userspace (FUSE) with transparent authenticated encryption
Stars: ✭ 518 (-59.12%)
Mutual labels:  fuse, filesystem
Polyfuse
A FUSE (Filesystem in Userspace) library for Rust
Stars: ✭ 76 (-94%)
Mutual labels:  fuse, filesystem
Fuse Copyfs
CopyFS is the copy-on-write (COW) versioned filesystem for FUSE. Years ago I added features to CopyFS 1.0, then 1.0.1 came out and I never bothered to forward-port my changes. Now I have. Master is 1.3.1M, which is CopyFS 1.0.1 + 1.3M
Stars: ✭ 24 (-98.11%)
Mutual labels:  fuse, filesystem
Dokany
User mode file system library for windows with FUSE Wrapper
Stars: ✭ 4,055 (+220.05%)
Mutual labels:  fuse, filesystem
S3fs Fuse
FUSE-based file system backed by Amazon S3
Stars: ✭ 5,733 (+352.49%)
Mutual labels:  fuse, filesystem
Goofys
a high-performance, POSIX-ish Amazon S3 file system written in Go
Stars: ✭ 3,932 (+210.34%)
Mutual labels:  fuse, filesystem
Fuse Ts
Stars: ✭ 6 (-99.53%)
Mutual labels:  fuse, filesystem
Distribyted
📂 ➡️ 📺 🎶 🎮 Torrent client with on-demand file downloading as a filesystem.
Stars: ✭ 791 (-37.57%)
Mutual labels:  fuse, filesystem
Onedrive Fuse Fs
Script to mount Microsoft OneDrive (formerly known as SkyDrive) folder as a FUSE filesystem
Stars: ✭ 68 (-94.63%)
Mutual labels:  fuse, filesystem
Moosefs
MooseFS – Open Source, Petabyte, Fault-Tolerant, Highly Performing, Scalable Network Distributed File System (Software-Defined Storage)
Stars: ✭ 1,025 (-19.1%)
Mutual labels:  fuse, filesystem
Svfs
The Swift Virtual File System
Stars: ✭ 375 (-70.4%)
Mutual labels:  fuse, filesystem
Catfs
Cache AnyThing filesystem written in Rust
Stars: ✭ 404 (-68.11%)
Mutual labels:  fuse, filesystem
Infinit
The Infinit policy-based software-defined storage platform.
Stars: ✭ 363 (-71.35%)
Mutual labels:  fuse, filesystem
Exfat
Free exFAT file system implementation
Stars: ✭ 528 (-58.33%)
Mutual labels:  fuse, filesystem
Btfs
A bittorrent filesystem based on FUSE.
Stars: ✭ 2,984 (+135.52%)
Mutual labels:  fuse, filesystem
Winfsp
Windows File System Proxy - FUSE for Windows
Stars: ✭ 4,071 (+221.31%)
Mutual labels:  fuse, filesystem
Fuse Rs
Rust library for filesystems in userspace (FUSE)
Stars: ✭ 735 (-41.99%)
Mutual labels:  fuse, filesystem
Fusell Seed
FUSE (the low-level interface) file system boilerplate 📂 🔌 💾
Stars: ✭ 9 (-99.29%)
Mutual labels:  fuse, filesystem

GO-FUSE

Build Status GoDoc

Go native bindings for the FUSE kernel module.

You should import and use github.com/hanwen/go-fuse/fs library. It follows the wire protocol closely, but provides convenient abstractions for building both node and path based file systems

Older, deprecated APIs are available at github.com/hanwen/go-fuse/fuse/pathfs and github.com/hanwen/go-fuse/fuse/nodefs.

Comparison with other FUSE libraries

The FUSE library gained a new, cleaned-up API during a rewrite completed in 2019. Find extensive documentation here.

Further highlights of this library is

  • Comprehensive and up to date protocol support (up to 7.12.28).

  • Performance that is competitive with libfuse.

Examples

  • example/hello/main.go contains a 60-line "hello world" filesystem

  • zipfs/zipfs.go contains a small and simple read-only filesystem for zip and tar files. The corresponding command is in example/zipfs/ For example,

    mkdir /tmp/mountpoint
    example/zipfs/zipfs /tmp/mountpoint file.zip &
    ls /tmp/mountpoint
    fusermount -u /tmp/mountpoint
    
  • zipfs/multizipfs.go shows how to use in-process mounts to combine multiple Go-FUSE filesystems into a larger filesystem.

  • fuse/loopback.go mounts another piece of the filesystem. Functionally, it is similar to a symlink. A binary to run is in example/loopback/ . For example

    mkdir /tmp/mountpoint
    example/loopback/loopback -debug /tmp/mountpoint /some/other/directory &
    ls /tmp/mountpoint
    fusermount -u /tmp/mountpoint
    

macOS Support

go-fuse works somewhat on OSX. Known limitations:

  • All of the limitations of OSXFUSE, including lack of support for NOTIFY.

  • OSX issues STATFS calls continuously (leading to performance concerns).

  • OSX has trouble with concurrent reads from the FUSE device, leading to performance concerns.

  • Tests are expected to pass; report any failure as a bug!

Credits

Bugs

Yes, probably. Report them through https://github.com/hanwen/go-fuse/issues

Disclaimer

This is not an official Google product.

Known Problems

Grep source code for TODO. Major topics:

  • Missing support for CUSE, BMAP, IOCTL

License

Like Go, this library is distributed under the new BSD license. See accompanying LICENSE file.


Appendix I. Go-FUSE log format

To increase signal/noise ratio Go-FUSE uses abbreviations in its debug log output. Here is how to read it:

  • iX means inode X;
  • gX means generation X;
  • tA and tE means timeout for attributes and directory entry correspondingly;
  • [<off> +<size>) means data range from <off> inclusive till <off>+<size> exclusive;
  • Xb means X bytes.

Every line is prefixed with either rx <unique> or tx <unique> to denote whether it was for kernel request, which Go-FUSE received, or reply, which Go-FUSE sent back to kernel.

Example debug log output:

rx 2: LOOKUP i1 [".wcfs"] 6b
tx 2:     OK, {i3 g2 tE=1s tA=1s {M040755 SZ=0 L=0 1000:1000 B0*0 i0:3 A 0.000000 M 0.000000 C 0.000000}}
rx 3: LOOKUP i3 ["zurl"] 5b
tx 3:     OK, {i4 g3 tE=1s tA=1s {M0100644 SZ=33 L=1 1000:1000 B0*0 i0:4 A 0.000000 M 0.000000 C 0.000000}}
rx 4: OPEN i4 {O_RDONLY,0x8000}
tx 4:     38=function not implemented, {Fh 0 }
rx 5: READ i4 {Fh 0 [0 +4096)  L 0 RDONLY,0x8000}
tx 5:     OK,  33b data "file:///"...
rx 6: GETATTR i4 {Fh 0}
tx 6:     OK, {tA=1s {M0100644 SZ=33 L=1 1000:1000 B0*0 i0:4 A 0.000000 M 0.000000 C 0.000000}}
rx 7: FLUSH i4 {Fh 0}
tx 7:     OK
rx 8: LOOKUP i1 ["head"] 5b
tx 8:     OK, {i5 g4 tE=1s tA=1s {M040755 SZ=0 L=0 1000:1000 B0*0 i0:5 A 0.000000 M 0.000000 C 0.000000}}
rx 9: LOOKUP i5 ["bigfile"] 8b
tx 9:     OK, {i6 g5 tE=1s tA=1s {M040755 SZ=0 L=0 1000:1000 B0*0 i0:6 A 0.000000 M 0.000000 C 0.000000}}
rx 10: FLUSH i4 {Fh 0}
tx 10:     OK
rx 11: GETATTR i1 {Fh 0}
tx 11:     OK, {tA=1s {M040755 SZ=0 L=1 1000:1000 B0*0 i0:1 A 0.000000 M 0.000000 C 0.000000}}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].