Skip to content
Go Shell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

go-billy-gluster GoDoc Build Status

This package provides a basic go-billy driver to access gluster volumes. It uses libgfapi so it's not needed to mount the volume locally.

So far, following actions are implemented:

  • Create
  • Open
  • OpenFile
  • Stat
  • Rename
  • Remove
  • Readdir
  • MkdirAll

For more information head to the documentation


This package requires native libgfapi library that is contained in the development client packages of gluster.

  • Arch / Manjaro:
pacman -S glusterfs
  • Ubuntu / Debian:
apt-get install glusterfs-common
  • CentOS / RHEL:
yum install glusterfs-api

After installing the dependency you can install the library with go get:

go get

Example of utilization

package main

import (


func main() {
	fs, err := gluster.New("server", "volume")
	if err != nil {
		panic(fmt.Sprintf("cannot connect to gluster volume %s", err))

	f, err := fs.Create("filename.ext")
	if err != nil {
		panic(fmt.Sprintf("cannot create file %s", err))

	_, err = f.Write([]byte("text"))
	if err != nil {
		panic(fmt.Sprintf("cannot write to file %s", err))

	err = f.Close()
	if err != nil {
		panic(fmt.Sprintf("cannot close file %s", err))

	err = fs.Close()
	if err != nil {
		panic(fmt.Sprintf("cannot disconnect from volume %s", err))


Contributions are more than welcome, if you are interested please take a look to our Contributing Guidelines.

Code of Conduct

All activities under source{d} projects are governed by the source{d} code of conduct.


Apache License Version 2.0, see LICENSE.

You can’t perform that action at this time.