SOLVED Boot Vol upgrade: autoexpand?

depasseg

FreeNAS Replicant
Joined
Sep 16, 2014
Messages
2,874
So I've been thinking about this, and all I did was use the GUI to replace each drive with the larger one (and then removed the old one). Once I had the 2 larger drives running, I used those steps above to do the expansion.

Code:
[root@freenas1] ~# zpool status freenas-boot  [used to check that everything is healthy and to get the partition names]
[root@freenas1] ~# zpool set autoexpand=on freenas-boot [set option to auto expand]
[root@freenas1] ~# zfs list freenas-boot [confirm space prior to expansion]
[root@freenas1] ~# zpool offline freenas-boot ada2p2  [removes the first partition from the pool (substitute with your first drive)]
[root@freenas1] ~# zpool online -e freenas-boot ada2p2 [adds the partition to the pool, with the expansion option set]
[root@freenas1] ~# zpool offline freenas-boot ada3p2 [removes the second partition from the pool (substitute with your 2nd device)]
[root@freenas1] ~# zpool online -e freenas-boot ada3p2 [adds the partition to the pool, with the expansion option set]
[root@freenas1] ~# zpool status freenas-boot [check the status]
[root@freenas1] ~# zfs list freenas-boot [check the size and compare to the beginning]
[root@freenas1] ~# zpool set autoexpand=off freenas-boot [remove option to auto expand] 
 
  • Like
Reactions: mka

aookeopinetree

Dabbler
Joined
May 25, 2015
Messages
10
Thanks. I followed those instructions and I got it working. Unfortunately it turns out it wasnt right for what I wanted to do so I ended up redoing the freenas installation from scratch. lol. Thanks anyway.
 

bilson

Dabbler
Joined
Mar 10, 2015
Messages
12
This worked for me as well with a slight tweak. USB sticks listed as da2p2 and da3p2 but when I tried to offline by using that I was getting "cannot offline da3p2: no such device in pool"
Thanks to this link I used vdev guids to run the command and it worked.
Code:
[root@freenas] ~# zpool offline freenas-boot da3p2
cannot offline da3p2: no such device in pool
[root@freenas] ~# zdb|grep -B 1 gptid/cbcbef8f-6d18-11e6-9928-002590981832
                guid: 252447176895781121
                path: '/dev/gptid/cbcbef8f-6d18-11e6-9928-002590981832'
[root@freenas] ~#
[root@freenas] ~# zdb|grep -B 1 gptid/32238427-1aff-11e6-8aab-6c0b8409f520
                guid: 6387067850111012908
                path: '/dev/gptid/32238427-1aff-11e6-8aab-6c0b8409f520'
[root@freenas] ~#
[root@freenas] ~# zpool offline freenas-boot 252447176895781121
[root@freenas] ~# zpool online -e freenas-boot 252447176895781121
[root@freenas] ~# zpool offline freenas-boot 6387067850111012908
[root@freenas] ~# zpool online -e freenas-boot 6387067850111012908
[root@freenas] ~# zpool status
 pool: freenas-boot
 state: ONLINE
  scan: resilvered 218K in 0h0m with 0 errors on Sun Sep 11 23:54:56 2016
config:

        NAME                                            STATE     READ WRITE CKSUM
        freenas-boot                                    ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/cbcbef8f-6d18-11e6-9928-002590981832  ONLINE       0     0     0
            gptid/32238427-1aff-11e6-8aab-6c0b8409f520  ONLINE       0     0     0

errors: No known data errors
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Very interesting bug report and oracle docs. Looks like it's possible to move to the bigger devices, then either set autoexpand=on (temporarily to expand then set to off), or zpool online -e.
http://docs.oracle.com/cd/E19253-01/819-5461/githb/index.html

Can confirm that mounting with expand on does do the trick. IIRC you can actually issue the "zpool online -e" command to a pool which is already online in order to expand it.

I did this on my bootpool when I expanded to 16GB USBs from 8GB. I didn't want to have auto-expand on in case I round-tripped through larger devices in the future.
 

koudy

Cadet
Joined
Dec 10, 2018
Messages
4
I was trying to find some solution for expanding my boot volume, but I'm not sure, which way to go.
From start I had 4GB stick on FreeNAS, then I created mirror to move on bigger SSD 120 GB did a sync and removed 4GB stick. After some years I noticed now that boot size is still 4GB, so I tried to set autoexpand=on for boot pool but with no effect (if I get it right I have to change boot device before autoexpand-on right?). I don't need to have system on two drives, it's only home NAS for photos and movies, so:
1) what is the best way to use whole space on my system SSD?
2) how do I get rid off of notification: "Boot Pool Status Is DEGRADED" when I removed the 4GB stick from mirror several years ago?

Thanks a lot for some suggestions!
 

Bugstar

Cadet
Joined
Feb 24, 2021
Messages
5
Thanks depasseg,

This code block worked perfectly for expanding the boot-pool from 2x4GB sticks to 2x32GB sticks. I know iXSystems no longer recommend USB sticks for the boot-pool, but mirrored in a home set-up, I'm prepared to take the punt.

The only change needed was freenas-boot has been modified to boot-pool in TrueNAS Core 12.

Cheers.

So I've been thinking about this, and all I did was use the GUI to replace each drive with the larger one (and then removed the old one). Once I had the 2 larger drives running, I used those steps above to do the expansion.

Code:
[root@freenas1] ~# zpool status freenas-boot  [used to check that everything is healthy and to get the partition names]
[root@freenas1] ~# zpool set autoexpand=on freenas-boot [set option to auto expand]
[root@freenas1] ~# zfs list freenas-boot [confirm space prior to expansion]
[root@freenas1] ~# zpool offline freenas-boot ada2p2  [removes the first partition from the pool (substitute with your first drive)]
[root@freenas1] ~# zpool online -e freenas-boot ada2p2 [adds the partition to the pool, with the expansion option set]
[root@freenas1] ~# zpool offline freenas-boot ada3p2 [removes the second partition from the pool (substitute with your 2nd device)]
[root@freenas1] ~# zpool online -e freenas-boot ada3p2 [adds the partition to the pool, with the expansion option set]
[root@freenas1] ~# zpool status freenas-boot [check the status]
[root@freenas1] ~# zfs list freenas-boot [check the size and compare to the beginning]
[root@freenas1] ~# zpool set autoexpand=off freenas-boot [remove option to auto expand] 
 
Top