Skip to content

Add an NFS Datastore

Wire an external NFS share into MFCloud so VMs and backups can use it as a storage backend.

Prerequisites

  • An NFS server reachable from every compute node (port 2049/tcp + 111/tcp+udp open in both directions).
  • An export path with rw,no_root_squash so libvirt can write VM images as root.
  • A unique, lowercase pool name with no spaces — this becomes the libvirt storage pool name on each node.

Reserved pool names

Don't reuse default, images, iso, or any name already showing up in a node's virsh pool-list. The provisioner will refuse with a friendly 409 if you do.

Quick steps

  1. Settings → Datastores → + Add Datastore.
  2. Choose NFS as the backend.
  3. Fill in:
  4. Name — operator-friendly label.
  5. Server IP — the NAS / file-server IP.
  6. Remote Path — the exported path (e.g. /exports/mfcloud-vms).
  7. Local Mount — defaults to /mnt/<name>; change if you have a convention.
  8. Save. MFCloud runs an idempotent script on each Active node:
  9. Installs nfs-utils if missing.
  10. Adds the mount to /etc/fstab (dedup'd via awk on the mountpoint).
  11. Mounts the share.
  12. Registers a libvirt storage pool that points at the mount.

The datastore appears under Storage within ~30 s of the script finishing on the last node.

Verifying the mount

On any compute node:

mountpoint -q /mnt/<name> && echo OK
virsh pool-list --all | grep <name>

If mountpoint says it's not mounted, check journalctl -u mfcloud-agent -n 50 — the install script logs each step.

Removing a datastore

Storage → row → Remove. The agent will:

  1. Stop and undefine the libvirt pool on every node.
  2. umount the share (preceded by a mountpoint -q gate to avoid umount: not mounted noise).
  3. Strip the matching line from /etc/fstab.
  4. Delete the row.

VMs whose disks live on the datastore are not removed — the operator must reassign or delete those VMs first. Otherwise the unmount will fail with device is busy and the row stays in place.

See also