Home » HOWTO: TrueNAS Scale – Split SSD with boot-pool to create partition for data (no USB install, easy config migration)

HOWTO: TrueNAS Scale – Split SSD with boot-pool to create partition for data (no USB install, easy config migration)

0 comment 82 views

Follow below steps

Hello, while there already exist HOWTOs about “shrinking” boot-pool, e.g.
HOWTO: Using a pair of large SSDs with boot and data pools for SCALE
HOWTO: TrueNAS Scale: from 32gb USB to booting from mirrored larger enterprise SSD’s, create add’l partition/data pool from remaining free space

Credit:
While writing this guide, I found a reddit thread reporting the identical steps.
Since I didn’t find it before spending two days figuring out installation process, and this guide is sufficiently complete, I’m posting this anyway.

I encountered an issue with the 1st step in both of them – namely installing TrueNAS on USB didn’t work with any of my hardware.

After having a look around, I found awesome truenas-install script, where the disks are partitioned.
It was extremely easy to adjust the script to not occupy whole ssd with boot-pool.

The method should work without any issue for any number of SSDs (verified with one disk).
The method is likely able to preserve your configuration (verified on a VM).
THIS METHOD IS LIKELY TO BREAK UPDATES, BACK-UP YOUR DATA BEFORE RUNNING AN UPDATE !!!

UNSUPPORTED DEPLOYMENT AHEAD, DEPENDS ON TRUENAS INSTALLER WORKING THE SAME WAY AS IT DOES NOW, PROCEED WITH CAUTION

But to be honest, I see no reason why this shouldn’t work fine. Just mirror more SSDs if you’re worried, and backup things once in a while.

Steps​

Main assumption – you have graphical access to the system where is/are the disk/s for installation.

This method works even on top of actually working system (verified on a VM with _single_ virtual drive, YMMV).
You are of course encouraged to export your zpools, back-up your data and proceed with caution.

Installation​

  • Use installer, boot with installer
  • Select “shell” from the installer menu
  • Edit `/sbin/truenas-install` (use vi)

Code:

# This is currently line 410 in the truenas-install
# This is part of create_partitions function

# Create boot pool
if ! sgdisk -n3:0:<put your desired size here, e.g. +50G> -t3:BF01 /dev/${_disk}; then
return 1
fi
  • Note BF01 – this is marking disk as ZFS; Refer to sgdisk man for details
  • Once done editing, run `truenas-install` and proceed as usual
    • You can select multiple disks if you’d like to have duplication, but I didn’t verify if this will work
  • You can choose to migrate your data or install anew
  • I replaced the boot environment, unsure what exactly that (or create new one) does

New partition creation​

After you installed and booted TrueNAS, you’re free to allocate free disk space (pun intended) however you want.

I used
“`
gdisk /dev/sXX

n <for new part>
<default start – after last part>
<default size – till the end>
BF01 <to mark disk as ZFS>
w <write>
“`

“`
zpool create <pool name> /dev/sxxN
zpool export <pool name>
“`

Now you can import the pool from the UI and do whatever you want with it.
I recommend only using it for something you don’t care about, like k8s containers and VMs you don’t mind having to re-create.

Refer – https://www.truenas.com/community/threads/howto-split-ssd-with-boot-pool-to-create-partition-for-data-no-usb-install-easy-config-migration.102641/

Leave a Comment