Skip to content

TureNAS CORE

Base Install

This guide is intended to be used for installing TrueNAS Core 13 on HyperCloud Clusters.

Create an install ISO image

  1. Download the latest stable version of TrueNAS Core from the iXsystems website.

    • https://www.truenas.com/truenas-core/
  2. In the HyperCloud web GUI, browse to Storage -> Images.

  3. Click the green dropdown button and select Create.
  4. Add a “Name” for the ISO image.
  5. In the “Type” drop-down box, select “Read-only CD-ROM”.
  6. Choose a Datastore - usually default.
  7. Click the “Upload” radio button then “Browse" to choose the downloaded ISO file from your local disk.
  8. Click the green Create button to finish the setup for the ISO image.

The image will upload in the background.

Create an empty block device

This empty block device will be the disk where the installation media and configurations are saved to create an reusable VM Template.

  1. From the Images pane, click the green dropdown button and select Create again.
  2. Add a “Name” for the root device.
  3. In the “Type” drop-down box, select “Operating System image”.
  4. Choose a Datastore - usually default.
  5. Ensure that “This image is persistent” is set to “YES”.
  6. Click the “Empty disk image” radio button.
  7. Set 16GB as the “Size”.
  8. Expand the “Advanced Options” dropdown and set “BUS” to “Virtio”.
  9. Click the green Create button to finish the setup for the empty block device.

Recommendation

If more than one instance of TrueNAS will be required, it is recommended to create an initial install, then either clone the persistent image, or using it as a base in the normal way (i.e. non-persistent snapshots).

Create a template

  1. Navigate to Templates -> VMs.
  2. Click the green dropdown button and select Create.
  3. Add a “Name” for this template.
  4. Add “Memory” - the recommended minimum is 8GB.
  5. Enter values for “Physical CPU” and “Virtual CPU” - depending on requirements, a starting point of 1 physical and 4 virtual would be reasonable.
  6. Swap to the Storage tab and select the ISO image as “DISK 0”.

    disk 0

  7. Click the blue + button to add another disk (“DISK 1”) and select the persistent block device.

  8. Swap to the Network tab and select a network from the list.
    • Ensure the desired Security Group is selected for ingoing/outgoing traffic.
    • Type virtio in the “Default hardware model to emulate for all NICs” box
  9. Swap to the OS & CPU header; under “Boot” (left-hand menu), add a tick to disk0 - which should be the install ISO.
    • Select “CPU Model” from the menu and choose host-passthrough from the drop-down list.
  10. Swap to the Input/Output tab and for Inputs select tablet for Type and usb for Bus, this will allow interaction within the VNC window.

    Other options for advanced settings are beyond the scope of this document.

  11. Click the green Create button to finish the setup for the VM Template.

Instantiate the VM

After creating the template, the VM can be stood up to install the software on the device. Navigate to the list of VM Templates.

  1. Select the newly created template and click “Instantiate”.
  2. Add a “VM name”.
  3. Confirm that the settings are as expected.
  4. Click the green Instantiate button to schedule the VM.

Software setup

  1. Browse to “VMs” and select the newly created instance.
  2. Click the viewer button vnc and select VNC.

    Tip

    If you do this within a few seconds of instantiation, you should see the TrueNAS boot splash - press enter to start installer; otherwise, the VM may have started booting and you will see a blue start screen.

    installer splash

    If on blue screen console setup

  3. Press enter to select Install/Upgrade.

  4. Press the space bar to add an * to the vtdb0 disk.
  5. Press enter to “Proceed with the installation”.
  6. Enter a password, and repeat in the second box (use the tab key to move between boxes).
    • The username for this password is root.
  7. Press enter on the OK button.
  8. Press enter to “Boot via BIOS”.
    • TrueNAS will now install the OS which should take a few minutes.
  9. Press enter at the message to return to console setup screen:

    succeed

  10. Select item 4 “Shutdown System” using the arrow keys and press enter.

    • In the HyperCloud GUI it will take a few seconds to register that the VM has powered off, but use blue Refresh button to refresh the list until the VM shows as “POWEROFF”.
    • Click on the Storage header, and remove the ISO image by clicking on the X (tooltip: detach) on the disk's (should be ID 0) row under Actions.

At this point the image has a base install which can be cloned or used as a base for non-persistent VMs. Not cloning at this point will result in all subsequent clones or snapshots having the same ssh system keys, etc.

Network setup

These instructions continue using the VM as is.

  • With the ISO image removed, start the VM again by clicking on blue Resume button.
  • Use blue Refresh button to refresh until the VM shows as “RUNNING”.
  • Click vnc button and select VNC.
    • The VM will boot as normal generating system keys etc.

The final step here is to configure the network so that the TrueNAS web front end can be accessed for further configuration. The screen will pause at the Console Setup selection menu.

  1. Enter 1 to Configure Network Interfaces and press enter.
  2. Enter 1 again to select the first interface (e.g. vtnet0).
  3. Enter n to retain the current settings of the interface and press enter.
  4. Enter n to refrain from configuring the DHCP and press enter.
  5. Enter y and press enter to configure IPv4.
    • Press enter to leave the interface with the default name (or enter a name if desired).
  6. Type in the IP Address assigned by HyperCloud to the VM and press enter.
    • For example: 192.168.1.10/24
  7. Configure the IPv6 if desired, or press n and enter.
  8. Follow the instructions to complete the network configuration.
    • Details can be added more conveniently using the web GUI, you may only need to add a default gateway at this point (option 4).

You should now be able to browse to the TrueNAS web front end on the IP address you set up - using root:YourPassword and continue configuration.

Add storage devices

  • Use the Create a new block device instructions to add storage devices for TrueNAS.
  • Each “Empty disk image” should be configured as Persistent

    Warning

    If this is not set, all data will be lost if a VM is destroyed.

  • Type should be “Generic storage datablock”.

Each volume can be added to the VM live using the HyperCloud GUI under Storage tab of the VM by clicking the green Attach disk button.

Recommendations

These can be options can be altered via the TrueNAS web GUI. Remember to save configuration at bottom of page.

  • Disable

    • Crash Reporting
      • System > General > Other Options (uncheck box)
    • Usage Collection
      • System > General > Other Options (uncheck box)
    • TLSv1.2 if required
      • System > General > HTTPS Protocols (drop-down field)
  • Enable

    • Web Interface HTTP -> HTTPS Redirect
      • System > General > GUI (check box)
    • SSH if required
      • System > SSH Connections and/or SSH Key pairs
  • Set NTP servers

    • System > NTP Servers
  • The system dataset will be moved to the first added block device, moving it back to the boot-pool may improve performance.

  • If SSD or NVMe storage pools are available, add ZIL/Log and Cache devices to pools.

The following performance tuning has been found to be beneficial in certain use cases. The GUI wizard is System > Tuneables > Add, or via modifying /etc/sysctl.conf.

sync_write_min_active=100
sync_write_max_active=100
sync_read_min_active=100
sync_read_max_active=100
async_write_min_active=100
async_write_max_active=20000
async_read_min_active=10
async_read_max_active=20000
vdev.max_active=40000
max_recordsize=4194304
vdev.aggregation_limit=4194304

Replication between Instances

Replication using ZFS send and receive is built in to TrueNAS.

Assumptions

  • Pool(s) or dataset(s) have been created. (Found in GUI under Storage > Pools)
  • The network between the instances is trusted and SSH can be used without encryption - this will improve performance noticeably.
    • System > SSH Connections (using new keypair)
  • A new SSH key will be generated for the replication process.
    • System > SSH Key pairs
  1. In order to set up replication, log into the GUI of the source appliance.
  2. Navigate to Tasks > Replication Tasks.
  3. Click Add.
  4. Click the Source Location drop-down list and select On this System.
  5. Browse the source drop-down until you find the pool and dataset you want to replicate.
  6. Add a tick to the check box next to the dataset.
  7. Add a tick to the Recursive checkbox.
  8. Under SSH Transfer Security click the No Encryption (less secure, but faster) radio button.
  9. Click the Destination Location drop-down list and select On a Different System.
  10. Click SSH Connections and select Create New.

    • In the pop up box:
      • Add a name.
      • Add the DNS name or IP address of the remote system to the TrueNAS URL.
      • Enter the password for the remote system login to the Password box.
      • Click the Private Key dropdown and select Generate New.
      • Click the Cipher drop down and select Disabled (Not encrypted).
      • Finish setup by clicking CREATE SSH CONNECTION.

    You should now be able to use the file browser to select the remote pool you wish to send the data to.

  11. Click NEXT.

  12. Click the Schedule dropdown, and either use one of the default schedules, or create a custom one (creating a custom schedule is beyond the scope of this document).
  13. Customize the other options as required - you may; for example, want to have snapshots on the remote system expire and be deleted after a fixed period of time using Destination Snapshot Lifetime.
  14. Click START REPLICATION.

At this point snapshots of the local dataset will be created hourly (assuming the defaults were used) and the process will be started at the top of the next hour.

The screen will show your newly created Replication Task. If desired you can click the blue > icon on the right side of the screen and see the status. After expanding the task info, it is possible to manually RUN NOW the process.

Local snapshots

  1. From the Tasks drop-down menu in the web GUI, select 'Periodic Snapshot Tasks'.
  2. Click the Add button.
  3. Select the dataset to be snapshot, and tick the 'Recursive' box for continually updated snapshotting.
  4. Select the desired Snapshot Lifetime, Naming Schema, and Schedule for this task.
  5. Click 'Submit' to finish the snapshot setup.