nfs #3

  • By charm-demo
  • Latest version (#3)
  • trusty
  • Stable
  • Edge

Description

Installs and configures an nfs4 daemon with
the standard accompanying services, portmapd
and idmapd.

To use this, client services must implement
hooks for a storage relation that is compatible
with the 'mount' interface, see http://jujucharms.com/interfaces/mount.

Exported shares get created as new services
are joined.

For now, service units with the same servicename
share the same exported filesystem.


Overview

This charm provides NFSv4 (http://nfs.sourceforge.net/). Installs and configures an NFSv4 daemon with the standard accompanying services, portmapd and idmapd.

Usage

Owncloud

juju deploy nfs
juju deploy mysql
juju deploy owncloud
juju add-relation mysql:owncloud
juju add-relation nfs:nfs owncloud:shared-fs

The above example deploys OwnCloud personal cloud storage, and provides remote storage via the NFS host.

Wordpress

juju deploy nfs
juju deploy mysql
juju deploy wordpress
juju add-relation mysql:db wordpress:db
juju add-relation nfs:nfs wordpress:nfs

Known Limitations and Issues

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.

If you are attempting to deploy NFS to an LXC container, such as the juju local provider, there are additional steps that need to be taken prior to deploying the NFS charm.

On the LXC host:

apt-get install nfs-common
modprobe nfsd
mount -t nfsd nfsd /proc/fs/nfsd

Edit /etc/apparmor.d/lxc/lxc-default and add the following three lines to it:

mount fstype=nfs,
mount fstype=nfs4,
    mount fstype=nfsd,
mount fstype=rpc_pipefs,

after which:

sudo /etc/init.d/apparmor restart

Finally:

juju deploy nfs

Configuration

  • initial_daemon_count: The number of nfs daemons to run on startup
  • storage_root: The root path where exported directories will be created
  • export_options: The default export options. Ships with rw,sync,no_root_squash,no_all_squash

Contact Information

Mark Mims mark.mims@canonical.com

Upstream NFS Project

Configuration

export_options
(string) The default export options
rw,sync,no_root_squash,no_all_squash
storage_root
(string) The root path where exported directories will be created
/srv/data
initial_daemon_count
(int) The number of nfs daemons to run on startup
40