An NFS-Ganesha server providing storage in a form that other charms can mount.
This charm deploys NFS-Ganesha, a userspace NFS server.
At the moment, there is no clustering or federation (although this may be added in future). This is not a highly-available server.
To deploy an NFS-Ganesha server::
juju deploy nfs-ganesha
Each relation to the NFS-Ganesha charm will result in a new export for the
units in that application. The default location of data is
Note that the NFS-Ganesha charm will not destroy data. This means if you remove a relation to an application, you will need to manually destroy the data saved by that application in the local data location.
This charm currently only supports the VFS file system abstraction layer, and does not support HA or clustering. If you need the latter, you may be better off using the native CephFS NFS share support in OpenStack Pike or later.
conjure-up canonical-kubernetes juju deploy nfs-ganesha juju add-relation nfs-ganesha kubernetes-worker
juju deploy nfs-ganesha juju deploy mysql juju deploy owncloud juju add-relation mysql owncloud juju add-relation nfs-ganesha:nfs-ganesha owncloud:shared-fs
The above example deploys OwnCloud personal cloud storage, and provides remote storage via the NFS host.
juju deploy nfs-ganesha juju deploy mysql juju deploy wordpress juju add-relation mysql:db wordpress:db juju add-relation nfs-ganesha:nfs-ganesha wordpress:nfs
To migrate storage from one NFS-Ganesha unit to another, first add the new unit in such a way as to avoid publishing it before it's ready:
juju config nfs-ganesha active_units=<old unit ID> juju add-unit nfs-ganesha
Now start the downtime:
juju config nfs-ganesha active_units=none
Wait for all clients to unmount, then move the underlying storage to the new unit in whatever way is appropriate for your deployment.
Finish the downtime by publishing the new unit:
juju config nfs-ganesha active_units=<new unit ID>
After clients have mounted the new unit and you've checked that all is well, you can remove the old unit:
juju remove-unit <old unit ID> juju config nfs-ganesha active_units=
Note that the migration process is quite abrupt: the server does not wait for all clients on related units to unmount before stopping. Consider arranging separately for downtime of clients that might write to their NFS mounts.
Known Limitations and Issues
No high availability story
At present the charms consuming an NFS relationship only account for a single host. Most charms assume the first incoming NFS mount-point is the sole replacement, and subsequent NFS relationship-join requests are ignored.
- storage_root: The root path where exported directories will be created.
- squash: What kind of user ID squashing is performed (No_Root_Squash, Root_Id_Squash, Root_Squash, or All_Squash).
- mount_options: The default client mount options.
- active_units: If set, a comma-separated list of unit names that should publish data on the 'mount' relation.
Colin Watson firstname.lastname@example.org
Upstream NFS-Ganesha Project
- To view the source: https://git.launchpad.net/nfs-ganesha-charm
- (string) If set, a comma-separated list of unit names that should publish data on the 'mount' relation. This makes it possible to transition gracefully between instances of this application.
- (string) Space separated list of extra deb packages to install.
- (string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
- (string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
- (string) The default client mount options.
- (string) Used by the nrpe subordinate charms. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
- (string) A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup.
- (string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
- (string) What kind of user ID squashing is performed. Valid values are "No_Root_Squash" (no user ID squashing is performed), "Root_Id_Squash" (UID/GID 0 are squashed to the anonymous UID/GID; supplementary GID 0 is also squashed), "Root_Squash" (UID 0 and GID of any value are squashed to the anonymous UID/GID; supplementary GIDs are discarded); or "All_Squash" (all users are squashed).
- (string) The root path where exported directories will be created.