All Projects → willscott → Go Nfs

willscott / Go Nfs

Licence: apache-2.0
golang NFSv3 server

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Go Nfs

magento2-ansible-vagrant
Ⓜ️2️⃣ Ansible provisioned Ubuntu 16.04 vagrant box for Magento2 development.
Stars: ✭ 25 (-93.07%)
Mutual labels:  nfs
terraform-aws-efs-backup
Terraform module designed to easily backup EFS filesystems to S3 using DataPipeline
Stars: ✭ 40 (-88.92%)
Mutual labels:  nfs
mobymac
Automagically install Docker in a VirtualBox VM with super-fast NFS mounts.
Stars: ✭ 79 (-78.12%)
Mutual labels:  nfs
unfs3
UNFS3 is a user-space implementation of the NFSv3 server specification.
Stars: ✭ 74 (-79.5%)
Mutual labels:  nfs
awesome-storage
A curated list of storage open source tools. Backups, redundancy, sharing, distribution, encryption, etc.
Stars: ✭ 324 (-10.25%)
Mutual labels:  nfs
docker-machine-mac-nfs-mount
Docker machine Mac OS X nfs mount
Stars: ✭ 17 (-95.29%)
Mutual labels:  nfs
wyzecam-hls
Converts MP4 files from WyzeCam NFS to HLS stream. Much more stable alternative to RTSP firmware.
Stars: ✭ 58 (-83.93%)
Mutual labels:  nfs
csi-driver-nfs
This driver allows Kubernetes to access NFS server on Linux node.
Stars: ✭ 227 (-37.12%)
Mutual labels:  nfs
RPCScan
Tool to communicate with RPC services and check misconfigurations on NFS shares
Stars: ✭ 53 (-85.32%)
Mutual labels:  nfs
silverbox
Guide describing how to setup compact, silent and energy-efficient GNU/Linux home server
Stars: ✭ 42 (-88.37%)
Mutual labels:  nfs
docker-nfs4
Simple containerized NFS v4 server running on Alpine Linux
Stars: ✭ 19 (-94.74%)
Mutual labels:  nfs
nfsdtop
Display top I/O on NFS servers using bpftrace on Linux and DTrace on FreeBSD
Stars: ✭ 27 (-92.52%)
Mutual labels:  nfs
docker-nfs-server
No description or website provided.
Stars: ✭ 31 (-91.41%)
Mutual labels:  nfs
jupyterhub-deploy-swarm
A DockerSwarm Jupyterhub setup, which uses a NFS Server running in a Docker Container for persistent storage
Stars: ✭ 19 (-94.74%)
Mutual labels:  nfs
ioBroker.backitup
Backitup enables the cyclical creation of backups of an IoBroker / Homematic installation
Stars: ✭ 43 (-88.09%)
Mutual labels:  nfs
pmOCR
A wrapper for tesseract / abbyyOCR11 ocr4linux finereader cli that can perform batch operations or monitor a directory and launch an OCR conversion on file activity
Stars: ✭ 53 (-85.32%)
Mutual labels:  nfs
fuse-nfs-crossbuild-scripts
fuse-nfs for windows using dokany
Stars: ✭ 35 (-90.3%)
Mutual labels:  nfs
Edgefs
EdgeFS - decentralized, scalable data fabric platform for Edge/IoT Computing and Kubernetes apps
Stars: ✭ 358 (-0.83%)
Mutual labels:  nfs
docker-volume-plugins
Managed docker volume plugins
Stars: ✭ 126 (-65.1%)
Mutual labels:  nfs
magento2-fast-vm
Optimal vagrant developer box for Magento2. Folders synced by nfs/rsync. This box includes Magento developer utilities.
Stars: ✭ 89 (-75.35%)
Mutual labels:  nfs

Golang Network File Server

NFSv3 protocol implementation in pure Golang.

Current Status:

  • Minimally tested
  • Mounts, read-only and read-write support

Usage

The most interesting demo is currently in example/osview.

Start the server go run ./example/osview ..

The local folder at . will be the initial view in the mount. mutations to metadata or contents will be stored purely in memory and not written back to the OS. When run, this demo will print the port it is listening on.

The mount can be accessed using a command similar to mount -o port=<n>,mountport=<n> -t nfs localhost:/mount <mountpoint> (For Mac users)

or

mount -o port=<n>,mountport=<n>,nfsvers=3,noacl,tcp -t nfs localhost:/mount <mountpoint> (For Linux users)

API

The NFS server runs on a net.Listener to export a file system to NFS clients. Usage is structured similarly to many other golang network servers.

import (
   	"github.com/go-git/go-billy/v5/memfs"

	nfs "github.com/willscott/go-nfs"
	nfshelper "github.com/willscott/go-nfs/helpers"
)

listener, _ := net.Listen("tcp", ":0")
fmt.Printf("Server running at %s\n", listener.Addr())

mem := memfs.New()
f, err := mem.Create("hello.txt")
f.Write([]byte("hello world"))
f.Close()

handler := nfshelper.NewNullAuthHandler(mem)
cacheHelper := nfshelper.NewCachingHandler(handler)
nfs.Serve(listener, cacheHelper)

Notes

  • Ports are typically determined through portmap. The need for running portmap (which is the only part that needs a privileged listening port) can be avoided through specific mount options. e.g. mount -o port=n,mountport=n -t nfs host:/mount /localmount

  • This server currently uses billy to provide a file system abstraction layer. There are some edges of the NFS protocol which do not translate to this abstraction.

    • NFS expects access to an inode or equivalent unique identifier to reference files in a file system. These are considered opaque identifiers here, which means they will not work as expected in cases of hard linking.
    • The billy abstraction layer does not extend to exposing uid and gid ownership of files. If ownership is important to your file system, you will need to ensure that the os.FileInfo meets additional constraints. In particular, the Sys() escape hatch is queried by this library, and if your file system populates a syscall.Stat_t concrete struct, the ownership specified in that object will be used.
  • Relevant RFCS: 5531 - RPC protocol, 1813 - NFSv3, 1094 - NFS

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].