Replacing 8gb USB with 2x 64gb USBs

Status
Not open for further replies.

mjk79

Explorer
Joined
Nov 4, 2014
Messages
67
Guys,

I recently attempted to replace my 8gig usb boot media with 2x 64gb usb sticks. (mirrored)

To do this I attached one of the 64gb usb's into a mirrored config, then replaced the 8gb stick with the second 64gb stick.

The system boots fine off the new media but it's still showing 7.2gb total size.
How would i fix this to make the rest of the 64gb available?

Z4WER5e.jpg

IU78nGd.jpg
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
ZFS has a method to expand, but it has to be turned on. It's probably turned off for the boot pool since any additional replacements may be smaller again.
Anyway, please get me the output of the following command in code tags please;
zpool get autoexpand,expandsize freenas-boot
It may be as simple as enabling autoexpand, then detaching the mirrors & re-attaching them, (one at a time obviously). (Or there may be a simpler way, but I don't know it off-hand.)
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
You can expand without offlining the pool by using

zpool online -e

Even though this command is normally used to online disks, it will work to expand the disks if they are already onlined.

https://forums.freebsd.org/threads/28703/
 

mjk79

Explorer
Joined
Nov 4, 2014
Messages
67
Cool thanks guys.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
It's probably turned off for the boot pool since any additional replacements may be smaller again.
I think it was a more esoteric reason, but I can't quite remember the discussion.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Well it's come in handy for me when I've temporarily mirrored to a larger device and then back to a smaller.
 

mjk79

Explorer
Joined
Nov 4, 2014
Messages
67
ZFS has a method to expand, but it has to be turned on. It's probably turned off for the boot pool since any additional replacements may be smaller again.
Anyway, please get me the output of the following command in code tags please;
zpool get autoexpand,expandsize freenas-boot
It may be as simple as enabling autoexpand, then detaching the mirrors & re-attaching them, (one at a time obviously). (Or there may be a simpler way, but I don't know it off-hand.)

Code:
root@freenas:~ # zpool get autoexpand,expandsize freenas-boot
NAME		  PROPERTY	VALUE	 SOURCE
freenas-boot  autoexpand  off	   default
freenas-boot  expandsize  52.5G	 -

root@freenas:~ # zpool get autoexpand
NAME		  PROPERTY	VALUE   SOURCE
Vol1		  autoexpand  on	  local
freenas-boot  autoexpand  off	 default
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338

mjk79

Explorer
Joined
Nov 4, 2014
Messages
67
@cyberjock hypothesized that grub doesn't handle autoexpanded zpools well some time ago.

@mjk79: Does a simple reboot do the trick? The discussion in Bug #7314 suggests that neither zpool online -e nor setting autoexpand temporarily to on is necessary if rebooting can be performed.

No that was one of the first things I tried. One of my new USB's died the other day so im working on replacing it, then i'll try the zpool online -e command.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
No that was one of the first things I tried. One of my new USB's died the other day so im working on replacing it, then i'll try the zpool online -e command.

I've used the online -e thing to expand boot pools before, and I've also been thankful that the boot pool DOESN'T autoexpand, when I've temporarily had to use a larger device as a mirror... and then remove the smaller device. If it had expanded I wouldn't have been able to re-attach a smaller device again.

(I actually checked the property first)

I believe Xi and Josh were wrong in that bug report. The boot pool does NOT auto expand at import. Perhaps if there was a -e option to import it would. But I'm not sure if there is, and I can't be bothered to check.

I have read the relevant oracle documentation on this, and the behaviour as it is, concurs with my understanding.

Also, the iX guys did come round, and then made a decision to keep auto-expand off... Which I believe is the right option.

Perhaps they should add an "expand boot pool" GUI option which would highlight if the pool could be expanded.

Data pools by default have autoexpand=true, at least these days, and perhaps in the past, it was not.

Point is... use online -e on all the member disks, and your pool will expand. Alternatively, set autoexpand=true and reboot... shoudl do it. Then set it back to false.
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I can tell you that 2 years ago I couldn't get it to expand no matter what I did. It has been 2 years though, and grub is much smarter than it used to be. I wouldn't be surprised if the behavior was now more along the lines of what we would commonly expect (boot zpool expands on bootup). I don't have the ability to test this without several hours of setup involved. Personally, I'd never try to do an expand with USB devices. They wear out so fast with the 9.3+ boot devices changes that I can't imagine having one long enough to seriously consider expanding. If you're using internal disks or SSDs, they are probably big enough that you'll never want them to expand anyway. ;)
 
Status
Not open for further replies.
Top