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, boot, tmp, var, or any name already showing up in a node's virsh pool-list. The provisioner will refuse with a 400 if you do.

Quick steps

  1. Storage → Manage Storage → Enterprise Pools tab → Attach New Storage Pool.
  2. Fill in:
  3. Pool Name — operator-friendly label; becomes the libvirt storage pool name on each node.
  4. Server IP — the NAS / file-server IP.
  5. Remote Path — the exported path (e.g. /exports/mfcloud-vms).
  6. Local Mount — defaults to /var/lib/libvirt/pools/<pool-name>; change if you have a convention.
  7. Cluster — which cluster's hosts get the mount; defaults to All clusters (fleet-wide).
  8. Mount on Cluster. MFCloud runs an idempotent script on each targeted 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 /var/lib/libvirt/pools/<pool-name> && echo OK
virsh pool-list --all | grep <pool-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 → Network Attached Storage (NFS) table → right-click the 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