Skip to content

[MIRROR] Deployment of NFS server, to share contents (Docker Swarm volumes) between different hosts

License

Notifications You must be signed in to change notification settings

redmic-project/storage-nfs-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

nfs-server

Deployment of NFS server, to share contents (Docker Swarm volumes) between different hosts

AppArmor

If your Docker host has AppArmor activated, you'll need to perform additional steps to allow the container to start an NFS server.

  1. Ensure you have the apparmor-utils and lxc packages installed on the Docker host. e.g. for Debian or Ubuntu:

    sudo apt-get install apparmor-utils lxc
    
  2. Create a file on the Docker host with the following contents:

    #include <tunables/global>
    profile nfs-server flags=(attach_disconnected,mediate_deleted) {
      #include <abstractions/lxc/container-base>
      mount fstype=nfs*,
      mount fstype=rpc_pipefs,
    }
    
  3. Load this profile into the kernel with apparmor_parser:

    sudo apparmor_parser -r -W /path/to/file/from/previous/step
    
  4. If profile does not survive reboot, place it at /etc/apparmor.d/.

About

[MIRROR] Deployment of NFS server, to share contents (Docker Swarm volumes) between different hosts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages