TrueNAS Scale installation on partitioned drive

sinni97

Cadet
Joined
Jun 1, 2021
Messages
3
Hello,

i was messing around with TrueNAS Scale lately and i came across a guide on how to install TrueNAS on a partitioned drive by mirroring the initial installation onto the target drive with gpart. Unfortunately gpart isnt available in TrueNAS-SCALE-21.04-ALPHA.1 so far. The guide was this one.
For my specific setup it does make sense to split a 512GB SSD in half for Scale and for a regular Pool that will contain a bunch of docker images later instead of wasting the whole SSD for Scale.

Does someone found a solution to flash Scale on a small partition and use the remaining size for pools?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Unfortunately gpart isnt available in TrueNAS-SCALE-21.04-ALPHA.1
fdisk or gdisk?

If the content you want to store isn't incredibly important and won't change too often, maybe this would be a relatively simple option to use:
 

sinni97

Cadet
Joined
Jun 1, 2021
Messages
3
fdisk or gdisk?
those ones are available but iam very unfamiliar with them. Do you have a guide for those utilities too?

If the content you want to store isn't incredibly important and won't change too often, maybe this would be a relatively simple option to use:
I've looked through them but its and try the guides out, thanks.
 

sinni97

Cadet
Joined
Jun 1, 2021
Messages
3
I did some testing and it worked well. So for everyone stumbling across this post i have noted down my steps to easily reproduce the setup.

sda -> small drive
sdb -> large drive

1: install TrueNAS Scale on smaller disk as usual

2: attach second drive and boot up

3: enable SSH in the UI and log into shell

4: backup partition tables from sda with gdisk
gdisk /dev/sda b (enter filename)

5: restore partition backup to sdb with gdisk
gdisk /dev/sdb r (recover and then l to load backup filename

6: Check the boot-pool status
It should display boot-pool and the largest partition of the sda drive like following
zpool status boot-pool pool: boot-pool state: ONLINE config: NAME STATE READ WRITE CKSUM boot-pool ONLINE 0 0 0 sda3 ONLINE 0 0 0 errors: No known data errors

7: Attach the sdb to the zpool
Keep in mind to use the largest partition which should be the same as on sda
zpool attach boot-pool sdb3

8: Copy the EFI Boot partition
dd if=/dev/sda2 of=/dev/sdb2

9: Copy the BIOS Boot partition (not sure if needed)
dd if=/dev/sda1 of=/dev/sdb1

10: Detach old disk (sda) from boot-pool
zpool offline boot-pool sda3 zpool detach boot-pool sda3
if it doesnt work boot from different disk and remove the other drive with
zpool detach boot-pool sdb3


Creating data pool
11: create additional partition starting from the end sector + 1 from the previously highest
gdisk /dev/sdb n (largest sector + 1 / BF01 type)

12: Get ID of new partition in expert menu (similiar 89530227-834A-4C91-8900-7B4210212E27)
I am not sure if it is really needed if you have a simple setup..
gdisk /dev/sdb x ( i to see GUID)

13: reboot and create pool from new partition
zpool create user-data /dev/sdb5 gptid/{ID}
alternatively without gptid but its harder to determine which drive it is on fault
zpool create user-data /dev/sdb5

14: Export the pool
zpool export user-data

15: Import pool in UI
 

imsocold

Dabbler
Joined
Dec 13, 2021
Messages
43
what if you only have a single drive?
Can you DD the drive to a file on another machine and then resize the partition?
 
Top