<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TrueNAS on Wael Nasreddine</title><link>https://risala.pages.dev/tags/truenas/</link><description>Recent content in TrueNAS on Wael Nasreddine</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://risala.pages.dev/tags/truenas/index.xml" rel="self" type="application/rss+xml"/><item><title>TrueNAS - Add Certificate via ACME</title><link>https://risala.pages.dev/posts/truenas-add-cert-via-acme/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://risala.pages.dev/posts/truenas-add-cert-via-acme/</guid><description>&lt;h1 id="truenas---add-certificate-via-acme"&gt;&#10; TrueNAS - Add Certificate via ACME&#10; &lt;a class="heading-link" href="#truenas---add-certificate-via-acme"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h1&gt;&#10;&lt;h2 id="problem"&gt;&#10; Problem&#10; &lt;a class="heading-link" href="#problem"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;I need TrueNAS to have a valid certificate for use by democratic-csi (for iSCSI and NFS) and for use on the UI.&lt;/p&gt;&#10;&lt;h2 id="solution"&gt;&#10; Solution&#10; &lt;a class="heading-link" href="#solution"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://www.truenas.com/docs/scale/scaletutorials/credentials/certificates/settingupletsencryptcertificates/" class="external-link" target="_blank" rel="noopener"&gt;Official Documentation&lt;/a&gt;&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Go to &lt;a href="https://dash.cloudflare.com/profile/api-tokens" class="external-link" target="_blank" rel="noopener"&gt;Cloudflare &amp;gt; My Profile &amp;gt; API Tokens&lt;/a&gt; and create a new Edit zone DNS Token.&lt;/li&gt;&#10;&lt;li&gt;Go to Credentials &amp;gt; Certificates &lt;img src="truenas-add-cert-via-acme_Screenshot-2025-05-29-at-14.56.45.png" alt="Screenshot 2025-05-29 at 14.56.45.png"&gt;&lt;/li&gt;&#10;&lt;li&gt;Click Add next to ACME DNS-Authenticators, fill in the API Token generated on step 1 and save. &lt;img src="truenas-add-cert-via-acme_Screenshot-2025-05-29-at-14.57.55.png" alt="Screenshot 2025-05-29 at 14.57.55.png"&gt;&lt;/li&gt;&#10;&lt;li&gt;Add a new Certificate Signing Request (CSR)&lt;/li&gt;&#10;&lt;li&gt;Click the wrench icon next to the new CSR to create the new certificate with ACME.&lt;/li&gt;&#10;&lt;li&gt;Set the GUI SSL Certificate by going to &lt;strong&gt;System &amp;gt; General Settings&lt;/strong&gt; and click &lt;strong&gt;Settings&lt;/strong&gt; in the GUI widget.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;h2 id="related"&gt;&#10; Related&#10; &lt;a class="heading-link" href="#related"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="#root/mtH688R3M098" &gt;ProxmoxVE - VM - TrueNAS Scale&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://www.truenas.com/docs/scale/scaletutorials/credentials/certificates/settingupletsencryptcertificates/" class="external-link" target="_blank" rel="noopener"&gt;TrueNAS ACME Certificate&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item><item><title>TrueNAS - VM Sizing and Configuration Best Practices</title><link>https://risala.pages.dev/posts/truenas-vm-sizing-and-configuration-best-practices/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://risala.pages.dev/posts/truenas-vm-sizing-and-configuration-best-practices/</guid><description>&lt;h1 id="truenas---vm-sizing-and-configuration-best-practices"&gt;&#10; TrueNAS - VM Sizing and Configuration Best Practices&#10; &lt;a class="heading-link" href="#truenas---vm-sizing-and-configuration-best-practices"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h1&gt;&#10;&lt;p&gt;Running TrueNAS (CORE or SCALE) as a virtual machine (VM) in a hypervisor like ProxmoxVE requires careful sizing and configuration to ensure stability, performance, and data integrity. This note outlines key best practices.&lt;/p&gt;&#10;&lt;h2 id="1-memory-ram-allocation"&gt;&#10; 1. Memory (RAM) Allocation&#10; &lt;a class="heading-link" href="#1-memory-ram-allocation"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Minimum:&lt;/strong&gt; TrueNAS CORE officially states 8GB of RAM as a minimum. TrueNAS SCALE also benefits from at least 8GB.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ZFS ARC:&lt;/strong&gt; The most critical consumer of RAM is the ZFS Adaptive Replacement Cache (ARC). A common rule of thumb is &lt;strong&gt;1GB of RAM per 1TB of raw storage capacity&lt;/strong&gt; for optimal ARC performance, though this can vary based on workload. More RAM for ARC generally means better read performance.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Services:&lt;/strong&gt; Account for RAM needed by TrueNAS services (SMB, NFS, iSCSI, Jails, Plugins, Apps, etc.).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Static Allocation:&lt;/strong&gt; &lt;strong&gt;Crucially, assign a static amount of RAM to the TrueNAS VM.&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Disable Memory Ballooning:&lt;/strong&gt; As detailed in &lt;a href="https://risala.pages.dev/posts/proxmoxve-truenas-disable-memory-ballooning/" &gt;ProxmoxVE - TrueNAS VM - Disable Memory Ballooning&lt;/a&gt;, this feature is detrimental to ZFS ARC performance and stability.&lt;/li&gt;&#10;&lt;li&gt;Avoid dynamic memory or memory overcommitment for the TrueNAS VM.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ECC RAM:&lt;/strong&gt; While this applies to the host hardware, if TrueNAS is critical, the host system should ideally use ECC RAM to protect ZFS data integrity from memory errors.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="2-cpu-allocation"&gt;&#10; 2. CPU Allocation&#10; &lt;a class="heading-link" href="#2-cpu-allocation"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Cores:&lt;/strong&gt; A minimum of 2 CPU cores is generally recommended. More cores can be beneficial if running many services, plugins/apps, or handling high network throughput, especially with encryption (e.g., SMB encryption, VPNs).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;CPU Type:&lt;/strong&gt; Modern CPUs with AES-NI support are beneficial if using ZFS encryption or other cryptographic workloads.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Host Passthrough (Optional but Recommended):&lt;/strong&gt; If your hypervisor supports it (like ProxmoxVE's &lt;code&gt;host&lt;/code&gt; CPU type), passing through the host CPU model can provide better performance and access to all CPU features.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Avoid Over-Allocation:&lt;/strong&gt; While ZFS itself isn't always CPU-bound for basic NAS tasks, services running on TrueNAS can be. Monitor CPU usage and avoid excessive over-allocation that could lead to contention on the host.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="3-storage-configuration"&gt;&#10; 3. Storage Configuration&#10; &lt;a class="heading-link" href="#3-storage-configuration"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Disk Passthrough (HBA Passthrough):&lt;/strong&gt; &lt;strong&gt;This is the highly recommended method.&lt;/strong&gt; Pass an entire HBA (Host Bus Adapter) directly to the TrueNAS VM.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Benefits:&lt;/strong&gt; TrueNAS gets direct, unimpeded access to the raw disks. This allows ZFS to manage SMART data, disk health, and perform its functions optimally. It's the most reliable and performant method.&lt;/li&gt;&#10;&lt;li&gt;Requires VT-d/AMD-Vi enabled on the host.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Individual Disk Passthrough (RDM, Virtual Disks):&lt;/strong&gt; If HBA passthrough isn't feasible, passing individual disks as raw device mappings (RDMs) or as virtual disks (e.g., VMDK, qcow2) is an alternative.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Raw Disks (e.g.&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;virtio-scsi&lt;/code&gt;&lt;/strong&gt; &lt;strong&gt;with&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;scsiblock=true&lt;/code&gt;&lt;/strong&gt; &lt;strong&gt;in Proxmox):&lt;/strong&gt; Generally preferred over file-backed virtual disks for performance.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;File-backed Virtual Disks:&lt;/strong&gt; Can work, but may introduce a slight performance overhead and abstract SMART data. If used, ensure they are preallocated/thick-provisioned for better performance and to avoid issues with thin provisioning on the ZFS layer.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Boot Drive:&lt;/strong&gt; The TrueNAS boot drive can be a small virtual disk (e.g., 16-32GB SSD-backed virtual disk is fine). It does not need to be part of the main storage pool HBA passthrough.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ZFS Pool Design:&lt;/strong&gt; Standard ZFS pool design principles (RAIDZ levels, mirroring, vdevs) apply within the VM, regardless of how disks are presented.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="4-network-configuration"&gt;&#10; 4. Network Configuration&#10; &lt;a class="heading-link" href="#4-network-configuration"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Virtual NIC:&lt;/strong&gt; Use a performant virtual network interface, such as &lt;code&gt;virtio&lt;/code&gt; (common in KVM/Proxmox).&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Dedicated Physical NIC (Optional):&lt;/strong&gt; For high-performance needs, consider passing through a dedicated physical NIC to the TrueNAS VM, or using SR-IOV if available.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Jumbo Frames:&lt;/strong&gt; If your physical network supports it and you need maximum throughput for large file transfers, configure jumbo frames (MTU 9000) consistently across the TrueNAS VM, hypervisor, physical switches, and clients.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="5-hypervisor-specific-settings-example-proxmoxve"&gt;&#10; 5. Hypervisor-Specific Settings (Example: ProxmoxVE)&#10; &lt;a class="heading-link" href="#5-hypervisor-specific-settings-example-proxmoxve"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;BIOS:&lt;/strong&gt; OVMF (UEFI) is generally recommended for modern OSes like TrueNAS.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Machine Type:&lt;/strong&gt; &lt;code&gt;q35&lt;/code&gt; is a common modern choice.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;SCSI Controller:&lt;/strong&gt; For virtual disks or passthrough disks not on a dedicated HBA, &lt;code&gt;VirtIO SCSI single&lt;/code&gt; (with &lt;code&gt;iothread=1&lt;/code&gt; enabled on the disk) can offer good performance.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;QEMU Guest Agent:&lt;/strong&gt; Install and enable the QEMU guest agent in the TrueNAS VM for better integration with the hypervisor (e.g., clean shutdowns, IP address reporting).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="6-backup-and-snapshots"&gt;&#10; 6. Backup and Snapshots&#10; &lt;a class="heading-link" href="#6-backup-and-snapshots"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Hypervisor Snapshots vs. ZFS Snapshots:&lt;/strong&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;ZFS Snapshots:&lt;/strong&gt; Use ZFS's native snapshot capabilities within TrueNAS for your data pools. These are efficient and application-consistent for ZFS.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Hypervisor Snapshots:&lt;/strong&gt; Be cautious with hypervisor-level snapshots of a running TrueNAS VM, especially if it's actively performing I/O. While often safe, there's a small risk of issues if the snapshot doesn't perfectly capture in-flight I/O. If used, ensure the QEMU guest agent is running to help quiesce the filesystem. For the data pools themselves, ZFS snapshots are superior.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Backups:&lt;/strong&gt; Plan a robust backup strategy for your TrueNAS data, independent of hypervisor snapshots (e.g., ZFS replication to another TrueNAS instance or a cloud provider).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="related"&gt;&#10; Related&#10; &lt;a class="heading-link" href="#related"&gt;&#10; &lt;i class="fa-solid fa-link" aria-hidden="true" title="Link to heading"&gt;&lt;/i&gt;&#10; &lt;span class="sr-only"&gt;Link to heading&lt;/span&gt;&#10; &lt;/a&gt;&#10;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://risala.pages.dev/posts/proxmoxve-truenas-disable-memory-ballooning/" &gt;ProxmoxVE - TrueNAS VM - Disable Memory Ballooning&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://risala.pages.dev/posts/zfs-adaptive-replacement-cache-explained/" &gt;ZFS - Adaptive Replacement Cache (ARC) Explained&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://risala.pages.dev/posts/proxmoxve-vm-performance-tuning/" &gt;ProxmoxVE - VM Performance Tuning&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;</description></item></channel></rss>