diff --git a/content/post/18-create-nas-server-with-truenas.md b/content/post/18-create-nas-server-with-truenas.md index 2aa0ede..c78cceb 100644 --- a/content/post/18-create-nas-server-with-truenas.md +++ b/content/post/18-create-nas-server-with-truenas.md @@ -37,7 +37,14 @@ While the speed is negligible to me because my network can't handle it, the othe My first choice was the [Aiffro K100](https://www.aiffro.com/fr/products/all-ssd-nas-k100). But I couldn't find a way to have it deliver in France without doubling the price. Finally I managed to buy a [Beelink ME mini](https://www.bee-link.com/products/beelink-me-mini-n150?variant=48678160236786). -This small cube has 2x 2.5Gbps Ethernet ports and can host up to 6x NVMe drives, plus a 64 GB eMMC chip to install an OS. I started with 2 drives for now, 2 TB each. +This small cube has: +- N200 CPU +- 12 GB of RAM +- 2x 2.5Gbps Ethernet ports +- can host up to 6x NVMe drives +- a 64 GB eMMC chip to install an OS. + +I started with 2 drives for now, 2 TB each. ### Software @@ -54,11 +61,71 @@ After comparing the solutions, the choice was made to use TrueNAS Community Edit ## Install TrueNAS -The installation of TrueNAS didn't go +The installation of TrueNAS didn't go as smooth as I expected id to be. + +I'm using [Ventoy](https://www.ventoy.net/en/index.html) to store multiple ISO in a single USB stick. I was in version 1.0.99, and the ISO wouldn't launch. I had to update to version 1.1.10 to make it work: +![TrueNAS installation splash screen](img/truenas-iso-installation-splash.png) + +But here I encounter another problem when launching the installation on my eMMC storage device: +``` +Failed to find partition number 2 on mmcblk0 +``` + +I found a solution on this [post](https://forums.truenas.com/t/installation-failed-on-emmc-odroid-h4/15317/12): +- Enter the shell +![Enter the shell in TrueNAS installer](img/truenas-iso-enter-shell.png) +- Edit the file `/lib/python3/dist-packages/truenas_installer/utils.py` +- Move the line `await asyncio.sleep(1)` right beneath `for _try in range(tries):` +- Edit line 46 to add `+ 'p'`: +`for partdir in filter(lambda x: x.is_dir() and x.name.startswith(device + 'p'), dir_contents):` +![Fixed file in the TrueNAS installer](img/truenas-iso-fix-installer.png) +- Exit the shell and start the installation without reboot + +The installer was finally able to get through: +![TrueNAS installation progress](img/truenas-iso-installation.png) + +Once the installation is complete, I shutdown the machine. Then I install it into my rack on top of the 3 Proxmox VE nodes. I plug both Ethernet cables from my switch, the power and turn it on. ## Configuration of TrueNAS -### basic conf -### pool creation + +By default TrueNAS is using DHCP. I check the UniFi interface to gather its MAC, then in OPNsense, I define a new host override in Dnsmasq. Finally in the Caddy plugin, I create a new domain for TrueNAS with that IP. I restart the machine a last time. + +✅ After a few minutes, TrueNAS is now available on https://nas.vezpi.com. +### General Settings + +During the installation I didn't choose to define a password for the user `truenas_admin`. I'm requested to change it as soon as I reach the login page: +![TrueNAS login page to change `truenas_admin` password](img/truenas-login-page-change-password.png) + +Once the password is updated, I land on the dashbaord. The UI feels great at first glance: +![TrueNAS dashboard](img/truenas-fresh-install-dashboard.png) + +The first thing I do is to change the hostname to `granite` and check the box below to define the domain inherited from DHCP: +![TrueNAS hostname configuration](img/truenas-config-change-hostname.png) + +In the `General Settings`, I change the `Localization` settings. I set the Console Keyboard Map to `French (AZERTY)` and the Timezone to `Europe/Paris`. + +I create a new user `vez`, with `Full Admin` role within TrueNAS. I allow SSH access but only with a SSH key, not with password: +![TrueNAS user creation](img/truenas-create-new-user.png) + +Finally I remove the admin role from `truenas_admin` and lock the account. + +### Pool creation + +{what is pool} + +In the `Storage` page, I can find my `Disks`, where I can confirm TrueNAS can see my couple of NVMe drives: +![truenas-storage-disks-unconfigured.png](img/truenas-storage-disks-unconfigured.png) + +Now back in the `Storage Dashboard`, I click the `Create Pool` button. I name the pool `storage`: +![truenas-pool-creation-general.png](img/truenas-pool-creation-general.png) + +Then I select the `Mirror` layout: +![truenas-pool-creation-layout.png](img/truenas-pool-creation-layout.png) + +I explore quickly the optional options but none makes sense for my setup. At the end, before creating the pool, there is a Review section: +![truenas-pool-creation-review.png](img/truenas-pool-creation-review.png) + +After hitting `Create Pool`, I'm warned that everything on the disks will be erased, which I have to confirm. Finally the pool is created. ### dataset config diff --git a/static/img/truenas-config-change-hostname.png b/static/img/truenas-config-change-hostname.png new file mode 100644 index 0000000..b6bd034 Binary files /dev/null and b/static/img/truenas-config-change-hostname.png differ diff --git a/static/img/truenas-create-new-user.png b/static/img/truenas-create-new-user.png new file mode 100644 index 0000000..a80eed0 Binary files /dev/null and b/static/img/truenas-create-new-user.png differ diff --git a/static/img/truenas-fresh-install-dashboard.png b/static/img/truenas-fresh-install-dashboard.png new file mode 100644 index 0000000..bc6882f Binary files /dev/null and b/static/img/truenas-fresh-install-dashboard.png differ diff --git a/static/img/truenas-iso-enter-shell.png b/static/img/truenas-iso-enter-shell.png new file mode 100644 index 0000000..0dfd935 Binary files /dev/null and b/static/img/truenas-iso-enter-shell.png differ diff --git a/static/img/truenas-iso-fix-installer.png b/static/img/truenas-iso-fix-installer.png new file mode 100644 index 0000000..e0b947a Binary files /dev/null and b/static/img/truenas-iso-fix-installer.png differ diff --git a/static/img/truenas-iso-installation-splash.png b/static/img/truenas-iso-installation-splash.png new file mode 100644 index 0000000..d73ec20 Binary files /dev/null and b/static/img/truenas-iso-installation-splash.png differ diff --git a/static/img/truenas-iso-installation.png b/static/img/truenas-iso-installation.png new file mode 100644 index 0000000..31d5549 Binary files /dev/null and b/static/img/truenas-iso-installation.png differ diff --git a/static/img/truenas-login-page-change-password.png b/static/img/truenas-login-page-change-password.png new file mode 100644 index 0000000..bebc77b Binary files /dev/null and b/static/img/truenas-login-page-change-password.png differ diff --git a/static/img/truenas-pool-creation-general.png b/static/img/truenas-pool-creation-general.png new file mode 100644 index 0000000..8563afa Binary files /dev/null and b/static/img/truenas-pool-creation-general.png differ diff --git a/static/img/truenas-pool-creation-layout.png b/static/img/truenas-pool-creation-layout.png new file mode 100644 index 0000000..d88d45a Binary files /dev/null and b/static/img/truenas-pool-creation-layout.png differ diff --git a/static/img/truenas-pool-creation-review.png b/static/img/truenas-pool-creation-review.png new file mode 100644 index 0000000..345cf36 Binary files /dev/null and b/static/img/truenas-pool-creation-review.png differ diff --git a/static/img/truenas-storage-disks-unconfigured.png b/static/img/truenas-storage-disks-unconfigured.png new file mode 100644 index 0000000..7e0771a Binary files /dev/null and b/static/img/truenas-storage-disks-unconfigured.png differ