TrueNAS Scale

How to use a single NVMe as boot, cache and slog device

Please read our disclaimer https://docs.ibracorp.io/#disclaimer.

Caution

Installation

  1. Boot from the ISO

2. Start the Shell. On the # prompt type

bash

bash has autocompletion. Use the tab key once you started typing a file/folder name.

cd /usr/sbin/
vi truenas-install

Search for Create boot pool by typing

/Create boot pool

Press Enter and the cursor should jump to the text block we are looking for.

Move the cursor on top of the 0 like above and delete it by pressing x

Press i to start the insert mode and add +32GiB (where 32 is the size, you can choose your own size)

Press the ESC key to stop the insert mode. Type :wq and press Enter to write the changes and quit vi.

Execute the install script

truenas-install

Choose 1 Install/Upgrade. Pick the drive you want to boot from, select with Spacebar and OK.

Follow the prompts as normal. Do not create a swap partition.

After the reboot / shutdown & restart login into the web interface with the address you see on the console.

Once logged in, go to Storage and create a pool with the other available drives.

After the pool is online, open a Shell under System Settings.

Get an overview what the drive configuration is.

lsblk

Locate the drive with your boot partition.

In the example above we can see that sda has 3 partitions. No we add partition 4 occupying the free space so we can add that partition as cache space to the pool. The 4 in the command (both) reflects that we add the next free partition which 3+1 = 4. If for some reason you have 4 already (i.e. you went for a swap partition) use 5.

sgdisk -n4:0:0 -t4:BF01 /dev/sda

We need to update the linux kernel table.

partprobe

Verify that the new partition has been added.

lsblk

Note the new partition name. In our example it is sda4. Now we add the partition as cache to the pool. pool being the name of the pool you created earlier.

zpool add pool cache sda4

To add a partition as zil/slog:

zpool add pool log sda5

In the web interface go to Storage, click in the top right on pool operations and choose Status.

If you see your partition under cache all worked out as planned.

Partition commands

sgdisk -p /dev/sda

Delete a partition

sgdisk -d 1 /dev/sda

Special Thanks

  • Our Discord community and our Admins Sycotix and Hawks for their input and documentation.

Please support the developers and creators involved in this work to help show them some love. ❤️

Final Words

We hope you enjoyed this guide. It was conceptualized, written, and implemented by our Admin DiscDuck.

Support Us

Our work sometimes takes months to research and develop. If you want to help support us please consider:

Thank you for being part of our community!

Last updated

Was this helpful?