Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
/ balena-nfs Public archive

NFS Server and Client Project for @balena-os

License

Notifications You must be signed in to change notification settings

VolkovLabs/balena-nfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Balena NFS Server and Client Project

Diagram

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".

Using Network File System (NFS) in Balena | Share external storage between containers

Requirements

  • balenaOS 2.105.19 is required for Nvidia Jetson AGX Orin Devkit with NFS version 4.
  • 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

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.
  • Allows to set NFS in sync or async modes.

Tested

  • Nvidia Jetson AGX Orin Devkit (jetson-agx-orin-devkit)
  • Raspberry Pi4-64 (raspberrypi4-64)
  • Jetson Xavier (jetson-xavier)
  • x86-64 (genericx86-64-ext)

Environment Variables

Environment Variable Value Description
STORAGE_LABEL storage External Storage ID, if not found tmpfs will be used instead.
STORAGE_MOUNT_POINT /mnt/nvme Local mount point to mount Storage or tmpfs.
POSTGRES_PASSWORD postgres Password for the PostgreSQL database.
PGDATA /mnt/nvme/postgresql/data PostgreSQL path on the Storage or tmpfs mount point.
NFS_HOST localhost NFS 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/nvme Mount point to mount NFS export.
NFS_SYNC_MODE async Async or Sync mode.
NFS_VERSION nfs Set nfs4 to force use NFS version 4.

NFS version 3

To support NFS version 3 please update Environment Variables:

NFS3

Balena Application

The Balena Application for Grafana allows to display device information and manage services using Balena Supervisor API.

Working in a productive alliance, Balena, Grafana, and the Balena Application plugin simplify managing a network of non-homogenous IoT devices.

Balena Application

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.
  • Sponsor our open-source plugins for Grafana with GitHub Sponsor.
  • Star the repository to show your support.

License

  • Apache License Version 2.0, see LICENSE.