A Container Storage Interface (CSI) plug-in that provides virtual filesystem (VFS) support.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
provider
service
vendor
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
VERSION
main.go
plugin.go

README.md

CSI-VFS

CSI-VFS is a Container Storage Interface (CSI) plug-in that provides virtual filesystem (VFS) support.

This project may be compiled as a stand-alone binary using Golang that, when run, provides a valid CSI endpoint. This project can also be vendored or built as a Golang plug-in in order to extend the functionality of other programs.

Installation

CSI-VFS can be installed with Go and the following command:

$ go get github.com/rexray/csi-vfs

The resulting binary will be installed to $GOPATH/bin/csi-vfs.

Starting the Plug-in

Before starting the plug-in please set the environment variable CSI_ENDPOINT to a valid Go network address such as csi.sock:

$ CSI_ENDPOINT=csi.sock csi-vfs
INFO[0000] serving                                       address="unix://csi.sock" service=csi-vfs

The server can be shutdown by using Ctrl-C or sending the process any of the standard exit signals.

Using the Plug-in

The CSI specification uses the gRPC protocol for plug-in communication. The easiest way to interact with a CSI plug-in is via the Container Storage Client (csc) program provided via the GoCSI project:

$ go get github.com/rexray/gocsi
$ go install github.com/rexray/gocsi/csc

Configuration

This section details the environment variables used to configure CSI-VFS.

VFS

The VFS plug-in attempts to approximate the normal workflow of a storage platform by having separate directories for volumes, devices, and private mounts. These directories can be configured with the following environment variables:

Name Default Description
X_CSI_VFS_DATA $HOME/.csi-vfs The root data directory
X_CSI_VFS_VOL $X_CSI_VFS_DATA/vol Where volumes (directories) are created
X_CSI_VFS_DEV $X_CSI_VFS_DATA/dev A directory from $X_CSI_VFS_VOL is bind mounted to an eponymous directory in this location when ControllerPublishVolume is called
X_CSI_VFS_MNT $X_CSI_VFS_DATA/mnt A directory from $X_CSI_VFS_DEV is bind mounted to an eponymous directory in this location when NodePublishVolume is called

GoCSI

The CSI-VFS SP is built using GoCSI. Please see its configuration section for a complete list of the environment variables that may be used to configure this SP.

The following table is a list of this SP's default values for the following GoCSI environment variables:

Name Value
X_CSI_SERIAL_VOL_ACCESS true
X_CSI_REQUIRE_NODE_ID true
X_CSI_REQUIRE_PUB_VOL_INFO true
X_CSI_SUPPORTED_VERSIONS 0.0.0 0.1.0