Boot stick mirror fails in 11.1-U3

Status
Not open for further replies.

vbonline

Dabbler
Joined
Nov 1, 2012
Messages
10
One of my mirrored boot sticks failed during the upgrade to 11.1-U3, so I tried to replace it with the 11.1-U3 GUI.

The replace failed with:

Code:
uwsgi: [middleware.exceptions:36] [MiddlewareError: [EFAULT] The device called
 SanDisk Ultra Fit (28.64 GB, 60062500 sectors does not have enough space to mirror the old device
 SanDisk Ultra Fit (28.64 GB, 60062500 sectors). Please use a larger device.]


Hmmm… Same size… So to the command line to see whats going on:

Working stick:

Code:
$ gpart show da0
=>	  40  60062424  da0  GPT  (29G)
		40	204800	1  efi  (100M)
	204840  59857616	2  freebsd-zfs  (29G)
  60062456		 8	   - free -  (4.0K)


New stick:

Code:
$ gpart show da1
=>	  40  60062424  da1  GPT  (29G)
		40	532480	1  efi  (260M)
	532520  59529936	2  freebsd-zfs  (28G)
  60062456		 8	   - free -  (4.0K)


The sticks have the same size but the EFI partition is bigger, so the data partition is too small.

Remedy:

- Delete all partitions on the new stick
- create the EFI partition with the proper size: "gpart add -b 40 -s 204800 -t efi da1“
- create the data partition with the right size: "gpart add -b 204840 -s 59857616 -t freebsd-zfs da1“
- transfer boot code: "gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da1“
- attach the (now correctly sized) partition to the boot-pool: "zpool attach freenas-boot da0p2 da1p2“

Wait for resilver and relax :)

I suppose sometime the developers decided 100M was too small for the EFI partition, but this fails in my case.

So check how big the EFI partition on the original device is before partitioning? Is this considered a bug?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Yeah, the partition was increased recently.
 

sahallie

Cadet
Joined
May 29, 2017
Messages
2
Thanks dude! You saved me much grief. Kept getting that dang error. Could not for the life of me figure out how to work around it until i found this post.
 
Status
Not open for further replies.
Top