https://github.com/trinitronx/lyraphase-nfs
A cookbook for managing NFSv4 bind mounts and exports.
https://github.com/trinitronx/lyraphase-nfs
Last synced: about 1 month ago
JSON representation
A cookbook for managing NFSv4 bind mounts and exports.
- Host: GitHub
- URL: https://github.com/trinitronx/lyraphase-nfs
- Owner: trinitronx
- Created: 2015-11-14T05:19:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-14T08:03:33.000Z (over 10 years ago)
- Last Synced: 2025-01-10T07:47:15.436Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
lyraphase-nfs cookbook
======================
[](https://travis-ci.org/trinitronx/lyraphase-nfs)
[](https://www.gittip.com/trinitronx)
A cookbook for managing NFSv4 bind mounts and exports.
# Requirements
- [nfs][1] cookbook
# Usage
Create a role for your `nfs_server` host that includes a list of NFS exports file entries.
Note: for NFSv4, you must have a "root" `/export` path with `fsid=0` first, then bind mount other dirs under here for export.
From the [Ubuntu NFSv4 Howto][3]:
NFSv4 exports exist in a single pseudo filesystem, where the real directories are mounted with the `--bind` option.
```ruby
name "nfs_server"
description "Role applied to the system that should be an NFS server."
override_attributes(
"lyraphase-nfs" => {
"nfs_exports" => [
{'path' => '/export', 'network' => '192.168.1.1/24', 'writeable' => true, 'sync' => true, 'options' => ['fsid=0','insecure','no_subtree_check'] },
{'path' => '/export/src-test-nfsv4', 'src_path' => '/home/trinitronx/src', 'network' => '192.168.1.1/24', 'writeable' => true, 'sync' => true, 'options' => ['nohide','insecure','no_subtree_check'] }
]
}
)
run_list [ "lyraphase-nfs::exports" ]
```
# Attributes
- `node['lyraphase-nfs']['nfs_exports']`: An Array of hashes containing NFS exports file entries. See Usage above for expected format.
# Recipes
## lyraphase-nfs::default
Includes the `nfs::client4` recipe to install the `idmap` service for an effective protocol level of NFSv4
## lyraphase-nfs::exports
Includes the `nfs::server4` recipe to install the NFS server platform-specific services for an effective protocol level of NFSv4.
Creates a top-level NFS root dir: `/export`, then creates bind mounts for any `src_path` entries found in the `nfs_exports` Array of Hashes.
Finally, `nfs_exports` entries are added to `/etc/exports`.
# Author
Author:: James Cuzella (@trinitronx)
[1]: https://supermarket.chef.io/cookbooks/nfs
[2]: https://supermarket.chef.io/cookbooks/nfs#readme
[3]: https://help.ubuntu.com/community/NFSv4Howto