Skip to main content

Balena NFS

Grafana 9 Balena

Introduction

The Balena NFS project demonstrates how to deploy the NFS Server and Client in balenaCloud. Read more in the Balena blog post, "Using NFS Server to share external storage between containers".

Requirements

  • balenaOS 2.99.27+rev1 is required for NFS version 4.
  • balenaOS 2.98 is required for NFS version 3.

balenaCloud

The Balena NFS project can be deployed directly to balenaCloud:

Deploy with balena

Deploy

Features

  • Includes a NFS Server build on top of the PostgreSQL Alpine image using OpenRC to manage NFS services.
  • Supports various environment variables to specify storage label, mount point, etc.
  • Includes a NFS Client build on top of the NGINX Alpine image using custom Entrypoint script to mount NFS export.
  • Provides Grafana Dashboard to manage running services and display configuration using Supervisor API. Default Grafana username and password is admin/admin.
  • Supports NFS version 4 and version 3. NFS version 4 is set by default.

Environment Variables

Environment VariableValueDescription
STORAGE_LABELstorageExternal Storage ID, if not found tmpfs will be used instead.
STORAGE_MOUNT_POINT/mnt/nvmeLocal mount point to mount Storage or tmpfs.
POSTGRES_PASSWORDpostgresPassword for the PostgreSQL database.
PGDATA/mnt/nvme/postgresql/dataPostgreSQL path on the Storage or tmpfs mount point.
NFS_HOSTlocalhostNFS host, should be localhost for the local container.
NFS_HOST_MOUNT/NFS exported mount. Set full path /mnt/nvme for NFS version 3.
NFS_MOUNT_POINT/mnt/nvmeMount point to mount NFS export.
NFS_VERSIONnfs4Set nfs to use NFS version 3.

NFS version 3

To support NFS version 3 please update Environment Variables:

Diagram

Feedback

We love to hear from users, developers, and the whole community interested in this project. These are various ways to get in touch with us:

  • Ask a question, request a new feature, and file a bug with GitHub issues.
  • Star the repository to show your support.

License

  • Apache License Version 2.0, see LICENSE.