JustToThePoint English Website Version
JustToThePoint en español
Colaborate with us

Virtualizing TrueNAS SCALE on Proxmox: Setup with ZFS & NFS

I’d far rather be happy than right any day, Douglas Adams, The Hitchhiker’s Guide to the Galaxy

image info

TrueNAS install

Network Attached Storage, or NAS, is a dedicated storage solution that allows multiple users and devices to access and store data from a centralized location. Unlike traditional hard drives that are directly connected to a single computer, a NAS is connected to a network, providing more flexible and collaborative data management. TrueNAS SCALE (an Open Source storage platform) can be virtualized on Proxmox VE to provide network-attached storage for your VMs and clients.

Step 1. Uploading the TrueNAS SCALE ISO to Proxmox Download the latest version of TrueNAS Community Edition (SCALE). In the Proxmox web interface, navigate to Datacenter, Node (e.g., myserver), go to your storage (e.g. “local”) and select the ISO Images menu. Click the Upload button, then browse and select the TrueNAS SCALE ISO file from your computer.

Step 2. Creating a Virtual Machine for TrueNAS. In the top right corner (Proxmox web UI), select Create VM. This opens the VM creation wizard. Then, follow these instructions:

Step 3. Add Virtual Disk for TrueNAS Data Storage. Before installing TrueNAS, add one or more additional virtual disks to serve as the data drives for the ZFS storage pool.

Select the newly created TrueNAS VM (e.g., truenasvm) in the Proxmox web UI, then go to the Hardware tab, click Add, Hard Disk. Then, leave SCSI Controller as VirtIO SCSI, choose your storage (where the virtual disk is, e.g., mypool-backup), and set a Disk size (GiB, e.g., 32 GB, 100 GB or more). Repeat this process for each additional virtual disk you want TrueNAS to manage.

image info

After adding your virtual disks to the VM, you should be able to see them listed under the VM’s Hardware tab.

Step 4. Installing TrueNAS SCALE on the VM. Start the TrueNAS virtual machine and run through the TrueNAS installation process:

  1. Boot from ISO. Select the VM, click Start, then Console to open the TrueNAS virtual machine’s Console.
  2. You should see the TrueNAS boot menu, choose Install/upgrade.
  3. Choose Destination Media. Choose the small disk (e.g., sda QEMU HARDDISK – 32 GiB) as the target drive for installation.
  4. Confirm Disk Wipe. The wizard installer will warn you that the disk will be wiped. Click Yes and press Enter to continue the installation.
  5. Web UI Authentication Method. By default, the option 1. Administrative user (truenas_admin) is highlighted and recommended for most uses as a security improvement (TrueNAS SCALE uses a separate admin account for web UI login instead of root).
  6. Set (a strong) Admin Password and Boot Mode. Allow EFI boot? Yes.
  7. The installation wizard will begin the installation process, setting up your TrueNAS VM.
  8. Finish installation. The installer will prompt you to reboot and remove the installation media (VM, Hardware, CD/DVD Drive, Do not use any media). After reboot, TrueNAS SCALE will perform its first boot setup where an IP address will be shown, The web user interface is at http://< TrueNassIPAddress >, e.g, my TrueNassIPAddress is 192.168.1.42.

Initial Configuration and Accessing TrueNAS WebUI

Once TrueNAS is running, from a web browser on your network, navigate to http://< TrueNassIPAddress >so you can perform initial configuration via the web interface.

At the login screen, enter as username: truenas_admin and the password you set previously during the installation process, and then you should gain access to the TrueNAS SCALE dashboard.

TrueNas

Ensure TrueNAS has the expected network settings in the web UI under Network settings. Update your system: System, Update.

Launch your favorite web browser and go to the web user interface address. Select Storage, Create Pool, give it a name proxmoxpool, select all available disks and move them into Data VDevs, pick a raid (Raid-z, Raid-z2 -very safe, but less capacity, etc.), and click on Create.

Creating a ZFS Storage Pool in TrueNAS

With TrueNAS up and running, let's create a ZFS Storage pool using the (data) virtual disks we previously added (no the boot disk).

  1. The additional disks we added in Proxmox should be visible to TrueNAS: Storage, Pool
  2. Create Pool. You will be prompt with a message It seems you haven't configured pools yet. Please click the button below to create a pool, click the Create Pool button, and give it a name (e.g., mynaspool).
  3. Select the disks and layout you want to use in the pool: You will see your available disks listed, e.g., Automated Disk Selection, Disk Size: 1000 GB, Layout: Stripe or if you added two disks and want a mirror, select both and choose Layout: Mirror. Save and Confirm by clicking on Create Pool. After creation, you should see the new pool in the Storage section.

Creating a Dataset for Sharing

Within our pool, it’s best practice to create a dataset for the actual data we plan to share, rather than sharing the root dataset (e.g., mynaspool) directly. Creating child datasets under mynaspool for your shares offers significant advantages in terms of organization, security, and management, even in a home lab setup, e.g, applying permissions to specific child datasets is much cleaner and more granular than trying to manage access at the root level. Besides, you can create different datasets for different purposes (e.g., mynaspool/documents, mynaspool/media, mynaspool/backups_vm).

Creating a Child Dataset for Sharing. In the TrueNAS UI, go to Datasets, select the root dataset (e.g., mynaspool, your root pool), click the Add Dataset button, and configure the new dataset.

Parent Path: mynaspool, Name (enter a name for your dataset): data, so the full path will be mynaspool/data; Dataset Preset, leave it as Generic.

Generic dataset suitable for any share type.

Click Save to create the dataset. You now have a dataset mynaspool/data ready to be shared. It should now appear under the pool (mynaspool).

Configuring an NFS Share (Unix Share) on TrueNAS

NFS (Network File System) is widely used for sharing files and directories with Linux/macOS clients (including Proxmox itself, for instance, for VM backups or ISO storage).

Setting Dataset Permissions for NFS. By default, our new dataset likely inherited ownership from the parent (truenas_admin) and mode bits (755).

For simplicity, let’s make the dataset owned by the TrueNAS built-in nobody user and allow wide-open access, then rely on NFS “mapall” to map remote users to that owner.

In Dataset, select the dataset (e.g., “data”). Permissions, Edit Permission. Set Owner, User to nobody and Owner, Group to nogroup (it might also be called nobody). These are special IDs that can act as a catch-all for anonymous NFS access. Check the boxes to Apply user and (Apply) group.

Set the permission mode for User/Group/Other as needed – for wide-open NFS in a lab scenario, set mode to 777 (rwx for all) for easiest access in a lab scenario. This basically means that any NFS client mapped to nobody (or any client if we open to Other) can read and write.

Create an NFS share for the dataset in TrueNAS. Navigate to Shares, Unix Shares (NFS), and click Add. In the Path field, browse to the dataset you have previously created (e.g., “/mnt/mynaspool/data”). Ensure the Enabled box is checked.

Under Networks and Hosts specify restrictions if needed. Typically (in a home lab), you should leave them blank to allow all clients from your local network. Click Advanced Options to tune access and set Mapall User to nobody and Mapall Group to nogroup so that all connecting users map to the nobody account on the server (ensuring permissions match because every NFS operation runs as the nobody user on TrueNAS).

Finally, click Save to create the NFS share. After clicking the save button, if the NFS service is not already on, TrueNAS will ask if you want to Enable the NFS service now: NFS Service is not currently running. Start the service now? Click Confirm so that the NFS share is active.

Mounting the NFS Share on a Linux Client

Finally, on a Linux VM or client machine on the same network, we can mount the NFS export.

  1. Ensure the NFS client packages are installed.

    # NixOS. Add nfs-utils to your system packages in configuration.nix:
    environment.systemPackages = with pkgs; [ nfs-utils ];
    # Then, rebuild the system:
    sudo nixos-rebuild switch
    
    # On Ubuntu and Debian:
    sudo apt update sudo apt install nfs-common
    
  2. Create a local directory. This will be the mount point for the NFS share, e.g., sudo mkdir -p /mnt/fileserver.

  3. Mount the NFS File Share by running the mount command: sudo mount -t nfs < TrueNAS-IP >:/mnt/< poolname >/< dataset > /mnt/fileserver, e.g., sudo mount -t nfs 192.168.1.42:/mnt/mynaspool/data /mnt/fileserver where TrueNAS-IP is the IP or hostname of your NAS and < poolname >/< dataset > is the folder path on the NFS server.

  4. Once the NFS Share is mounted, test access: cd /mnt/fileserver, nvim test.txt

    ❯ ls -l /mnt/fileserver
    total 1
    -rw-r--r-- 1 nobody nogroup 5 may 14 10:55 test.txt
    
  5. Unmount the NFS File Share: sudo umount /mnt/fileserver.

  6. Mounting NFS File Shares Permanently.

To permanently mount an NFS share in NixOS, add this to your configuration.nix:

{ config, pkgs, ... }:
{
  # Enable NFS Support
  boot.supportedFilesystems = [ "nfs" "nfs4" ];

  environment.systemPackages = with pkgs; [ nfs-utils ];

  # NFS mount declaration
  fileSystems."/mnt/fileserver" = {
    device = "192.168.1.42:/mnt/mynaspool/data";
    fsType = "nfs";
    options = [
      "x-systemd.automount" # Mount on first access
      "noauto"              # Don't mount at boot
      "_netdev"             # It delays until network is up
      "nfsvers=4.2"         # Force NFSv4.2
      "nofail"              # Continue boot if the NFS server is unreachable
    ];
  };
}

If you are using other Linux distros, you can just add an entry to /etc/fstab on the client for persistent mounting: 192.168.1.42:/mnt/mynaspool/data /mnt/fileserver nfs defaults,_netdev 0 0. This ensures the NFS share mounts at boot ( _netdev waits until network is up and running).

Biography

Bitcoin donation

JustToThePoint Copyright © 2011 - 2025 Anawim. ALL RIGHTS RESERVED. Bilingual e-books, articles, and videos to help your child and your entire family succeed, develop a healthy lifestyle, and have a lot of fun. Social Issues, Join us.

This website uses cookies to improve your navigation experience.
By continuing, you are consenting to our use of cookies, in accordance with our Cookies Policy and Website Terms and Conditions of use.