{"id":21317967,"url":"https://github.com/tibold/docker-volume-sharedfs","last_synced_at":"2026-05-03T15:32:19.504Z","repository":{"id":71382638,"uuid":"179062170","full_name":"tibold/docker-volume-sharedfs","owner":"tibold","description":"A docker volume driver for shared filesystems.","archived":false,"fork":false,"pushed_at":"2019-04-25T10:28:13.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T15:28:35.376Z","etag":null,"topics":["distributed-file-system","docker","docker-plugin","docker-volume-driver","docker-volume-plugin","volume"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/p/tibold/sharedfs","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tibold.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-02T11:21:34.000Z","updated_at":"2023-09-08T17:52:16.000Z","dependencies_parsed_at":"2023-02-23T06:15:31.944Z","dependency_job_id":null,"html_url":"https://github.com/tibold/docker-volume-sharedfs","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tibold/docker-volume-sharedfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibold%2Fdocker-volume-sharedfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibold%2Fdocker-volume-sharedfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibold%2Fdocker-volume-sharedfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibold%2Fdocker-volume-sharedfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tibold","download_url":"https://codeload.github.com/tibold/docker-volume-sharedfs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tibold%2Fdocker-volume-sharedfs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32574987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["distributed-file-system","docker","docker-plugin","docker-volume-driver","docker-volume-plugin","volume"],"created_at":"2024-11-21T19:10:18.745Z","updated_at":"2026-05-03T15:32:19.494Z","avatar_url":"https://github.com/tibold.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-volume-sharedfs\n\nDocker Volume plugin to create persistent volumes on a shared filesystem such as beegfs or gfs2.\n\n## Preconditions\n\n- Your choice of shared filesystem has to be operational.\n- The plugin does not do anything to verify the operation of the filesystem.\n\n## Installation\n\n### Docker Hub\n\nInstall the plugin from docker hub\n\n    docker plugin install --alias sharedfs --grant-all-permissions tibold/sharedfs  volumes.source=\u003cwherever you want to store the volumes\u003e\n\n### Systemd\n\nA pre-built binary as well as `rpm` and `deb` packages are available from the [releases](https://github.com/tibold/docker-volume-sharedfs/releases) page.\n\n### From source code\n\nGet the code:\n\n    go get github.com/tibold/docker-volume-sharedfs\n\nThe plugin uses [govendor](https://github.com/kardianos/govendor) to manage dependencies.\n\n    go get -u github.com/kardianos/govendor\n\nRestore dependencies:\n    \n    govendor sync\n\nBuild the plugin:\n\n    go build\n\n#### Docker plugin\n\nThere is a `Makefile.docker` that describes the steps required:\n\n    make -f Makefile.docker\n\nThis is equivalent to the `docker plugin install` command.\nSet the volumes location:\n    \n    docker plugin set sharedfs volumes.source=\u003cwherever you want to store the volumes\u003e\n\nEnable the plugin:\n\n    docker plugin enable tibold/sharedfs:next\n\n#### RedHat/CentOS 7\n\nAn rpm can be built with:\n\n    make -f Makefile.systemd rpm\n\nThen install and start the service:\n\n    yum localinstall docker-volume-sharedfs-$VERSION.rpm\n    systemctl start docker-volume-sharedfs\n\n#### Debian 8\n\nDebian packages are currently built on a RedHat system, but the `Makefile.systemd`\ndescribes which packages to install on Debian when building from scratch.\nBuilding the actual package can be done on a Debian system without Makefile modifications:\n\n    make -f Makefile.systemd deb\n\nNow you can install and start the service:\n\n    dpkg -i docker-volume-sharedfs_$VERSION.deb\n    systemctl start docker-volume-sharedfs\n\n\n## Usage\n\nFirst create a volume:\n\n    docker volume create -d sharedfs --name postgres-portroach\n\nThen use the volume by passing the name (`postgres-1`):\n\n    docker run -ti -v postgres-portroach:/var/lib/postgresql/data --volume-driver=sharedfs -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres\n\nInspect the volume:\n\n    docker volume inspect postgres-portroach\n\nRemove the volume (note that this will _not_ remove the actual data):\n\n    docker volume rm postgres-portroach\n\n### Plugin Options\n\nPlugin options are set using environment variables. These are settable using the `docker plugin set` command. All variables have the `SFS_` prefix to support running as a systemd service.\n\n* `SFS_DEBUG`: Enable debug logging `SFS_DEBUG.Value=1`\n* `SFS_LOCK_INTERVAL`: Set the lock keepalive interval in *seconds* `SFS_LOCK_INTERVAL.Value=20`\n* `SFS_LOCK_TIMEOUT`: Set the lock timeout in *seconds* `SFS_LOCK_TIMEOUT.Value=60`\n* `SFS_CLEANUP_INTERVAL`: Set the cleanup interval in *minutes* `SFS_CLEANUP_INTERVAL.Value=60`\n* `SFS_DEFAULT_PROTECTED`: Sets the default value for the 'protected' volume option `SFS_DEFAULT_PROTECTED.Value=0`\n* `SFS_DEFAULT_EXCLUSIVE`: Sets the default value for the 'exclusive' volume option `SFS_DEFAULT_EXCLUSIVE.Value=0`\n\n### Volume Options\n\n* `exclusive`: Restrict to one concurrent mount. Default: `true`\n* `protected`: Forbid deleting the data from disk. Default: `false`\n\nWhen protected mode is activated, the volume will be removed from docker's bookeeping, but the data will be left intact. Recreating the volume with the same name will reuse the already existing data files.\n\nChanging the properties after a volume was created is not supported. When creating a volume in docker, if the volume already exists on disk the options provided through docker are ignored. This also means that a protected volume can not be deleted by docker ever.\n\n### Volume\n\nWhen the volume is created in docker the driver creates the following folder structure:\n\n```\n. Volumes root\n+-- _data                  : stores data files\n+-- _locks                 : stores lock files\n|  +-- \u003chostname\u003e.lock     : a lock file is created by every driver instance\n|  +-- \u003cmount id\u003e.mount    : a mount file is created for every mount when not exclusive\n|  +-- exclusive.mount     : a mount file is created when mounting an exclusive volume\n+-- meta.json              : stores the metadata about the volume\n```\n\nEvery mount file will have the hostname of the mountee written in it.\n\n`docker inspect volume \u003cvolume-name\u003e` will list all locks and mounts and display the used options in the `Status` field.\n\n### Deleting protected volumes\n\nNavigate to the volume you want to delete in the filesystem. If the the `_locks` folder is empty you can manually delete the volume. Do __not__ delete the volume if there are any files in the `_locks` folder.\n\n## Roadmap\n\n- Improve the tests executed on docker hub.\n\n## License\n\nMIT, please see the LICENSE file.\n\n## Credit\n\nThis project was inspired by:\n* https://github.com/vieux/docker-volume-sshfs\n* https://github.com/RedCoolBeans/docker-volume-beegfs\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibold%2Fdocker-volume-sharedfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftibold%2Fdocker-volume-sharedfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftibold%2Fdocker-volume-sharedfs/lists"}