HOWTO: setup a pair of larger SSDs for boot pool and data

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Moderator Warning: This HOWTO will damage the ability of your TrueNAS appliance to properly maintain itself, will break the ability to replace failed drives, and may cause problems with upgrades and updates. TrueNAS is not designed to do this sort of partitioning, and the developers are not interested in supporting this. You may be on your own if you do this. Further discussion of the topic is available here in this resource.

Hi all,

first of all: this is an unsupported configuration. I run it myself for quite some time and I'm confident that it will continue to work, but you proceed at your own risk.

1. Motivation

Current series of new SSDs frequently start at 250 GB or even 500 GB size. It is a waste of space and money to only put the boot pool on a drive this large. OTOH in a production installation it is highly desirable to use SSDs instead of USB thumb drives.
My system has two SSDs for the boot pool and another pool with virtual machines. The ZVOLs in the latter are regularly replicated to my main data pool (RAIDZ2) comprised of spinning disks.

2. Prerequisites

If you already run FreeNAS from one or two SSDs that you like to repurpose, you must perform a fresh installation. It is not possible to shrink a vdev, so we need to repartition.

Parts:
  • 1 USB drive of suitable size, 16 or 32 GB
  • 1, better 2 SSDs for the boot pool and additional data
My target drives:

Code:
ada4: <Samsung SSD 860 PRO 512GB RVM01B6Q> ACS-4 ATA SATA 3.x device
ada4: Serial Number S42YNX0MA13733E
ada4: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada4: Command Queueing enabled
ada4: 488386MB (1000215216 512 byte sectors)
ada5 at ahcich5 bus 0 scbus5 target 0 lun 0
ada5: <Samsung SSD 860 PRO 512GB RVM01B6Q> ACS-4 ATA SATA 3.x device
ada5: Serial Number S42YNX0MA13643E
ada5: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 512bytes)
ada5: Command Queueing enabled
ada5: 488386MB (1000215216 512 byte sectors)

I'll assume UEFI boot throughout this post.

3. Preparation

As stated, if you are already running the system, a complete reinstall is necessary, so:
  • Backup your configuration
  • Export your data pools from the UI
4. Install to the USB drive

Use your preferred method (I frequently use VMware Fusion on my Mac) to perform a fresh FreeNAS install. Actually there's nothing that fundamentally prohibits what we are trying to achieve now, it is just the installer that won't let us partition the system drive(s) manually. Hence the workaround with a smaller initial drive.

5. Boot the USB installation

This should be easy using the boot menu of your EFI BIOS. The tricky part is that you want to make sure you are really running off the USB drive and don't import and mount the pool still on your SSDs. They are both named the same ("boot-pool"), so the system might get confused. I do not have the time to try it in a VM and do a transcript. Up to this point you will definitely not damage anything, stay calm ;)

6. Enable SSH and login

Configure the "new" FreeNAS installation to the point where you can get a shell via SSH. Then do

Code:
zpool status boot-pool
  pool: boot-pool
state: ONLINE
config:

    NAME        STATE     READ WRITE CKSUM
    boot-pool  ONLINE       0     0     0
      da0p2  ONLINE       0     0     0

errors: No known data errors

So we are running from USB (da0) ...

7. Wipe your SSDs

My SSDs are ada4 and ada5 (see above), ada0 - ada3 are the spinning disks that build my main storage pool. Danger, Will Robinson! We are deleting the old installation, now. Don't confuse the disk drives!

Code:
zpool labelclear ada4p2
zpool labelclear ada5p2
gpart delete -i2 ada4
gpart delete -i2 ada5
gpart delete -i1 ada4
gpart delete -i1 ada5
gpart destroy ada4
gpart destroy ada5


8. Transfer the new system to the SSDs

Copy the partition table:

Code:
gpart backup da0 | gpart restore ada4
gpart backup da0 | gpart restore ada5


Attach the devices to the zpool:

Code:
zpool attach boot-pool da0p2 ada4p2
zpool attach boot-pool da0p2 ada5p2


Copy the EFI boot partition:

Code:
dd if=/dev/da0p1 of=/dev/ada4p1
dd if=/dev/da0p1 of=/dev/ada5p1


Wait for the resilver to finish! (should not take long)

Detach the USB drive from the pool:

Code:
zpool offline boot-pool da0p2
zpool detach boot-pool da0p2


Result:

Code:
zpool status boot-pool
  pool: boot-pool
state: ONLINE
  scan: scrub repaired 0 in 0 days 00:00:02 with 0 errors on Thu Jan  9 03:45:02 2020
config:

    NAME        STATE     READ WRITE CKSUM
    boot-pool  ONLINE       0     0     0
      mirror-0  ONLINE       0     0     0
        ada4p2  ONLINE       0     0     0
        ada5p2  ONLINE       0     0     0

errors: No known data errors
gpart show ada4
=>        40  1000215136  ada4  GPT  (477G)
          40        2008        - free -  (1.0M)
        2048      524288     1  efi  (256M)
      526336    67108864     2  freebsd-zfs  (32G)
    67635200   932579976     - free -   (445G)

You should have quite some free space on your SSDs, now.

9. Shutdown, unplug the USB drive, boot from your SSDs, restore services

If the system boots alright, you might want to take the time to import your main data pool and restore your configuration, now.

Apart from the smaller partition size (which the installer refuses to create) there is absolutely nothing different from a regular install. So unless some future upgrade decides to wipe and repartition the system drives during the process this setup will definitely work like any other. We had that (wipe and repartition) once in the past when FreeNAS switched from UFS to ZFS for the boot drive. There might be a situation in the future when the boot loader changes (again) - you are on your own, watch the release notes for every major upgrade!

10. Create a new pool in the available space

Again we will need the command line, when we are finished the pool will be available in the GUI like any other:

Code:
gpart add -t freebsd-zfs -a 1m ada4
gpart add -t freebsd-zfs -a 1m ada5
gpart list ada4
gpart list ada5

Look for these in the output of the gpart list command:

Code:
3. Name: ada4p3
[...]
   rawuuid: 25fe934a-19d6-11ea-82a1-ac1f6b76641c
[...]
3. Name: ada5p3
[...]
   rawuuid: 3fc8e29a-19d0-11ea-9848-ac1f6b76641c


Now create the pool - use the UUIDs from the previous step:

Code:
zpool create ssd mirror gptid/25fe934a-19d6-11ea-82a1-ac1f6b76641c gptid/3fc8e29a-19d0-11ea-9848-ac1f6b76641c


Last we export the pool from the command line:

Code:
zpool export ssd


11. Import the new pool from the GUI

Done! Enjoy :)

Patrick


Edit 20210514: replace "freenas-boot" with "boot-pool" for current versions
 
Last edited by a moderator:

sdgenxr

Contributor
Joined
Sep 4, 2014
Messages
131
Thanks for the detailed write-up @Patrick M. Hausen ! This is definitely something that I've been wanting to accomplish ever since I switched from a USB boot device to a pair of SSD's. However, I'm having difficulty getting my SSD's to boot. They've been set as the boot device in the bios but I get an error about no installation media detected, or something along those lines. When I plug the USB drive back in and boot from that, it boots just fine. The only thing I can think of is I didn't allow enough time for the resilvering to complete. How long should I be waiting, is there something that I might have missed?
Code:
root@freenas[~]# zpool status freenas-boot
  pool: freenas-boot
 state: ONLINE
  scan: resilvered 2.00G in 0 days 00:01:45 with 0 errors on Fri Jun  5 10:43:36 2020
config:

        NAME        STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada0p2  ONLINE       0     0     0
            ada1p2  ONLINE       0     0     0

errors: No known data errors
root@freenas[~]# gpart show ada0
=>       40  234441568  ada0  GPT  (112G)
         40     532480     1  efi  (260M)
     532520   60030976     2  freebsd-zfs  (29G)
   60563496  173878112        - free -  (83G)

root@freenas[~]# gpart show ada1
=>       40  234441568  ada1  GPT  (112G)
         40     532480     1  efi  (260M)
     532520   60030976     2  freebsd-zfs  (29G)
   60563496  173878112        - free -  (83G)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If your zpool is "complete", the resilvering is. Did you dd the boot partition over?

BTW: I just checked the current documentation - you can do all of this in the UI now. You can attach a second device (SSD) to your single device boot pool (USB) in the UI and optionally set the new device to only use the same size as the old one.
Then detach the USB device, reboot, manually attach the second SSD or try the UI again - I have not tried that, yet.
 

sdgenxr

Contributor
Joined
Sep 4, 2014
Messages
131
OK, on the boot front, it looks like my system prefers to boot via BIOS and not UEFI.

Thanks for the info on the UI allowing us to use the same boot size as the old one and I was able to get that to work. I got both SSD's to only use 29G of the total space. After manually creating the "ssd" pool, I could add it as an existing pool.

I really appreciate your help with this @Patrick M. Hausen !!
 
Last edited:

Grogdor

Dabbler
Joined
Jan 26, 2016
Messages
12
FYI to save you some time as this is the first search hit - this method won't work unless both devices are 512k or 4k blocks, ie. no USB stick to SSD. Surely there's a ashift/dd combo method of some kind...

Code:
can only attach to mirrors and top-level disks


 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
Ok. So I installed OS on USB.

Booted from USB
added one of the SSD to USB disk "boot pool".
shutdown system.
removed USB.
started system on SSD (ada6) (mirror)
"replaced" USB with another SSD (ada5)
refreshed boot-pool status.
shows ada5 and ada6 as clean mirrors of boot-pool.

But Now I am confused, as when i list disks in GUI it does not show extra partition as another disk??? How can I use the left over space ?

Code:
]# zpool status boot-pool
  pool: boot-pool
 state: ONLINE
  scan: resilvered 1.22G in 00:00:10 with 0 errors on Sun Aug 15 11:49:31 2021
config:

        NAME        STATE     READ WRITE CKSUM
        boot-pool   ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada5p2  ONLINE       0     0     0
            ada6p2  ONLINE       0     0     0

errors: No known data errors


But when i noticed that gpart is showing whole ada5 in boot-pool partition, removed it from pool.

Code:
root@moon[~]# gpart show ada5
=>       40  250069600  ada5  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064  250068576     2  freebsd-zfs  (119G)    <<<<<<<<<< see full SSD space usage.


root@moon[~]# gpart show ada6
=>       40  250069600  ada6  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064   62488576     2  freebsd-zfs  (30G)
   62489640  187580000        - free -  (89G)


..........removed ada5 from TrueNAS GUI........then,

root@moon[~]# zpool status boot-pool
  pool: boot-pool
 state: ONLINE
  scan: resilvered 1.22G in 00:00:10 with 0 errors on Sun Aug 15 11:49:31 2021
config:

        NAME        STATE     READ WRITE CKSUM
        boot-pool   ONLINE       0     0     0
          ada6p2    ONLINE       0     0     0

errors: No known data errors


root@moon[~]# gpart show ada6
=>       40  250069600  ada6  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064   62488576     2  freebsd-zfs  (30G)
   62489640  187580000        - free -  (89G)

root@moon[~]# gpart show ada5
=>       40  250069600  ada5  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064  250068576     2  freebsd-zfs  (119G)





How can I fix this?

I want to mirror ada6 and ada5, and use the free space (~89G) for app-pool. How can I achieve this? Thank you.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You have to use the command line to use the extra space.

1. Copy partition layout of ada6 to ada5
gpart backup ada6 | gpart restore -F ada5

2. Attach ada5p2 to the boot-pool
zpool attach boot-pool ada6p2 ada5p2

3. Copy the freebsd-boot partition to ada5, so we can boot from it if ada6 fails
dd if=/dev/ada6p1 of=/dev/ada5p1

4. Now we can allocate two new partitions to use for a new pool
gpart add -t freebsd-zfs ada5; part add -t freebsd-zfs ada6

5. Create a pool from these two partitions
This is the one step that is going to be a bit more complicated. Enter this command:
gpart list ada5; gpart list ada6
Then look for the rawuuid values of ada5p3 and ada6p3 - we will need these for this command:
zpool create <new-pool-name> mirror /dev/gptid/<first raw uuid> /dev/gptid/<second raw uuid>

6. Export the newly created pool from the command line
zpool export <new-pool-name>

7. Import the new pool from the UI

Done.
 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
Thank you so much Mr. Hausen,

Sorry for being such pain.
For some reason it was not booting, so I went ahead and reinstalled to the whole thing.

I did all recommended steps and I could see the pool updated. No errors, I transferred boot partition also, but I was not able to boot from SSDs. I had to put back in USB drive to boot. It stops at end of BIOS.. "verifying DMI ...some some....

Code:
Install notes:
    0. My Board only supports BIOS boot.
    1. burn ISO on 32GB USB stick (my case, sandisk USBv2).
    2. install from this to another USB stick on new PC. (my case, target: Lexar 32GB USB ver3.0 disk. motherboard has only USB2.0)
    3. after install finishes, shutdown - remove installer-usb.
    - reboot on Lexar usb.
    4. ssh to shell as root.
    5. Copy the partition table from usb to SSD: (destroyes anythign on disks)
        # gpart backup da0 | gpart restore ada6
        # gpart backup da0 | gpart restore ada5
    6. Attach the devices to the zpool:
        zpool attach [-f] boot-pool da0p2 ada6p2
        zpool attach boot-pool da0p2 ada5p2
    7. Copy the EFI boot partition:   (I am doubting here, as I do not have UEFI, I use BIOS)...
        dd if=/dev/da0p1 of=/dev/ada6p1
        dd if=/dev/da0p1 of=/dev/ada5p1
    8. remove usb from boot-pool:
        zpool offline boot-pool da0p2
        zpool detach boot-pool da0p2
    9. final status:
        # zpool status boot-pool
          pool: boot-pool
         state: ONLINE
          scan: resilvered 27K in 00:00:02 with 0 errors on Sun Aug 15 16:02:48 2021
        config:

                NAME        STATE     READ WRITE CKSUM
                boot-pool   ONLINE       0     0     0
                  mirror-0  ONLINE       0     0     0
                    ada5p2  ONLINE       0     0     0
                    ada6p2  ONLINE       0     0     0

        errors: No known data errors
        #



After this I shutdown from GUI. Remove USB boot media. And then try to boot from SSD.

Kindly advice How can I now boot from SSDs? (After boot from USB.... =>)

Code:
# zpool status boot-pool
  pool: boot-pool
state: ONLINE
  scan: resilvered 27K in 00:00:02 with 0 errors on Sun Aug 15 16:02:48 2021
config:

        NAME        STATE     READ WRITE CKSUM
        boot-pool   ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada5p2  ONLINE       0     0     0
            ada6p2  ONLINE       0     0     0

errors: No known data errors

        partitions...
# gpart show
=>       40  250069600  ada5  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064   62488576     2  freebsd-zfs  (30G)
   62489640  187580000        - free -  (89G)

=>       40  250069600  ada6  GPT  (119G)
         40       1024     1  freebsd-boot  (512K)
       1064   62488576     2  freebsd-zfs  (30G)
   62489640  187580000        - free -  (89G)

=>      40  62517168  da0  GPT  (30G)
        40      1024    1  freebsd-boot  (512K)
      1064  62488576    2  freebsd-zfs  (30G)
  62489640     27568       - free -  (13M)



Also, seeing this alert:
"
CRITICAL
Device: /dev/ada1, 93 Currently unreadable (pending) sectors.
"
earlier this alert was coming for USB drive. (ada1 is 2TB disk i intend to use for data).
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Kindly advice How can I now boot from SSDs?
Go to BIOS setup, pick correct boot devices. Other than that I don't have any more advice. That depends on your specific hardware.
Copying the freebsd-boot partition was correct and of course necessary. If it doesn't boot from ada5, because it looks for a boot sector on ada0 and then gives up, check the motherboard documentation or contact the supplier.
 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
would you suggest?

dd if=/dev/da0 of=/dev/ada6 bs=512 count=1
dd if=/dev/da0 of=/dev/ada5 bs=512 count=1


Thank you.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No, why? You did copy over the partition table with gpart backup | gpart restore, didn't you? And the you copied the freebsd-boot partition with dd if=/dev/da0p1 of=/dev/ada6p1, didn't you? Because that is clearly part of my documentation ...

And then after you reported problems with adding the second SSD I of course assumed you could boot from the first one and just told you how to copy from first SSD (ada6) to second SSD (ada5) ...
 

RJ_fr33

Dabbler
Joined
Jan 10, 2020
Messages
26
yes Sir, I did all the steps.

I figure that when I installed OS on SSD/USB the SATA card was in PCIx1 slot, after that I moved it to x16 Slot. It stopped booting from SSDs on x16 slot. After I moved the card back to x1 Slot it started booting SSDs just fine.

After that I continued to follow your simple and smooth directions.

Now I am all good with mirrored SSDs with fully used disk space. booting fine of the SSD !!

Can't thank you enough.

Take a bow !
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No need for that deep bow. Glad it worked out. Always happy to share, even if I come across grumpy occasionally.
 
Joined
Aug 26, 2021
Messages
2
I stopped when I looked at my gpart list. It shows 3 ada0p's, 1,2 and 3. ada0p2 is the main SSD. I do not have any other SSD's in the machine. My question is, when I start to wipe the SSD's, is that just the ada0?

Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 1875384967
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 524288 (512K)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 20480
Mode: r0w0e0
efimedia: HD(1,GPT,45ed67b0-0198-11ec-b0ed-4c028912cdc9,0x28,0x400)
rawuuid: 45ed67b0-0198-11ec-b0ed-4c028912cdc9
rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
label: (null)
length: 524288
offset: 20480
type: freebsd-boot
index: 1
end: 1063
start: 40
2. Name: ada0p2
Mediasize: 943013756928 (878G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 544768
Mode: r0w0e0
efimedia: HD(2,GPT,45f3b2c4-0198-11ec-b0ed-4c028912cdc9,0x2000428,0x6dc80000)
rawuuid: 45f3b2c4-0198-11ec-b0ed-4c028912cdc9
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: (null)
length: 943013756928
offset: 17180413952
type: freebsd-zfs
index: 2
end: 1875379239
start: 33555496
3. Name: ada0p3
Mediasize: 17179869184 (16G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 544768
Mode: r0w0e0
efimedia: HD(3,GPT,45f02c17-0198-11ec-b0ed-4c028912cdc9,0x428,0x2000000)
rawuuid: 45f02c17-0198-11ec-b0ed-4c028912cdc9
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: (null)
length: 17179869184
offset: 544768
type: freebsd-swap
index: 3
end: 33555495
start: 1064
Consumers:
1. Name: ada0
Mediasize: 960197124096 (894G)
Sectorsize: 512
Mode: r0w0e0

Geom name: da0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 121145303
first: 40
entries: 128
scheme: GPT
Providers:
1. Name: da0p1
Mediasize: 524288 (512K)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 20480
Mode: r0w0e0
efimedia: HD(1,GPT,dcd1b8a3-0518-11ec-a45e-4c028912cdc9,0x28,0x400)
rawuuid: dcd1b8a3-0518-11ec-a45e-4c028912cdc9
rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
label: (null)
length: 524288
offset: 20480
type: freebsd-boot
index: 1
end: 1063
start: 40
2. Name: da0p2
Mediasize: 62025367552 (58G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 544768
Mode: r1w1e1
efimedia: HD(2,GPT,dce91288-0518-11ec-a45e-4c028912cdc9,0x428,0x7388000)
rawuuid: dce91288-0518-11ec-a45e-4c028912cdc9
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: (null)
length: 62025367552
offset: 544768
type: freebsd-zfs
index: 2
end: 121144359
start: 1064
Consumers:
1. Name: da0
Mediasize: 62026416128 (58G)
Sectorsize: 512
Mode: r1w1e2
 

ato

Dabbler
Joined
Aug 2, 2012
Messages
10
would you suggest?

dd if=/dev/da0 of=/dev/ada6 bs=512 count=1
dd if=/dev/da0 of=/dev/ada5 bs=512 count=1


Thank you.

If your MBR is empty (check by fdisk -s <device>) and you boot by BIOS (not UEFI) it is necessary to initilize it after partitioning by:
gpart bootcode -b /boot/pmbr <device>
gpart set -a active <device>
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Modern systems use a GPT partition table, not MBR. Even with MBR I recommend to use gpart, not fdisk. "Gpart" does not mean "GPT partition tool" but "GEOM partition tool". It can edit all partition schemes supported by the OS.
 

ato

Dabbler
Joined
Aug 2, 2012
Messages
10
Modern systems use a GPT partition table, not MBR. Even with MBR I recommend to use gpart, not fdisk. "Gpart" does not mean "GPT partition tool" but "GEOM partition tool". It can edit all partition schemes supported by the OS.
In my post MBR means "Master Boot Record" (sector 0) and it also very important on GPT drives when you boot in BIOS (not UEFI) mode.
You must initialize it properly and set active partition. What is the proper way to do it if not as I described ?
All my drives are GPT but I am booting in BIOS mode as suggested in documentation.
I just tested all this on my machine (TrueNAS-12.0-U5.1) and this step was necessary
to boot from fresh drive (nvd1) which I just added as a mirror to (nvd0).
You can find a log http://ftp2.zet.pw.edu.pl/pub/BSD/TrueNAS/zetis/boot-pool-copy.log of all my steps and drive state.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
The active partition is taken care of by the gpart backup|gpart restore part. But you are correct - if you need legacy boot, you need to install a proper pmbr, too. It just happens that all my systems boot via UEFI.
 

ato

Dabbler
Joined
Aug 2, 2012
Messages
10
The active partition is taken care of by the gpart backup|gpart restore part.
No - it does not set active flag. I just checked it (do you?) :
# cat /etc/version
TrueNAS-12.0-U5.1 (6c639bd48a)
# hd -n 512 /dev/nvd2
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000200
# gpart show nvd0
=> 40 57149360 nvd0 GPT (27G)
40 1024 1 freebsd-boot (512K)
1064 57147392 2 freebsd-zfs (27G)
57148456 944 - free - (472K)
# fdisk -s /dev/nvd0
/dev/nvd0: 3557 cyl 255 hd 63 sec
Part Start Size Type Flags
1: 1 57149439 0xee 0x80 <- active flag present
# gpart backup nvd0 | gpart restore nvd2
# hd -n 512 /dev/nvd2
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001c0 02 00 ee ff ff ff 01 00 00 00 af 36 e4 37 00 00 |...........6.7..|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200
# fdisk -s /dev/nvd2
/dev/nvd2: 58369 cyl 255 hd 63 sec
Part Start Size Type Flags
1: 1 937703087 0xee 0x00 <-- no active flag !

Anyway thanks for your article - it very useful. If you attach to it that for legacy boot it is necessary to do:
gpart bootcode -b /boot/pmbr <device>
gpart set -a active <device>
it will be even better.
 

mattyv316

Dabbler
Joined
Sep 13, 2021
Messages
27
Hi,
I was wondering if someone could assist with getting the partition created. My issue is that the rest of my mirrored SSDs is not in "free" space. It is in freebsd-zfs. See below
How do I get space out of freebsd-zfs and into the free space so I can create the additional partition for my jails/plugins?

root@xxxxxx[~]# zpool status
pool: boot-pool
state: ONLINE
config:

NAME STATE READ WRITE CKSUM
boot-pool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
mfisyspd0p2 ONLINE 0 0 0
mfisyspd1p2 ONLINE 0 0 0

errors: No known data errors
root@xxxxxx[~]# gpart status
Name Status Components
mfisyspd0p1 OK mfisyspd0
mfisyspd0p2 OK mfisyspd0
mfisyspd1p1 OK mfisyspd1
mfisyspd1p2 OK mfisyspd1
root@xxxxxx[~]# gpart show mfisyspd0
=> 40 586072288 mfisyspd0 GPT (279G)
40 532480 1 efi (260M)
532520 585531392 2 freebsd-zfs (279G)
586063912 8416 - free - (4.1M)

root@xxxxxx[~]# gpart show mfisyspd1
=> 40 586072288 mfisyspd1 GPT (279G)
40 532480 1 efi (260M)
532520 585531392 2 freebsd-zfs (279G)
586063912 8416 - free - (4.1M)


Some background:
I am running Truenas on a Dell R720 with an H310. The 2 mirrored SSDs are connected to the embedded H310. I am booting UEFI and this is a clean install.
Any help is greatly appreciated
 
Top