Identical device not big enough for mirrored boot?

Status
Not open for further replies.

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Evening,

One of my boot devices failed (it happens every couple of months). For this reason, I've been mirroring the boot environments for years.

On this occasion, when I've tried to replace the failed device, I'm given the following error:

Code:
[EFAULT] The new device (SanDisk Cruzer Fit, 14.91 GB, 31,266,816.0 blocks) does not have enough space to to hold the required new partitions (efi, 532,480 blocks, freebsd-zfs, 31,055,792 blocks, total of 31,588,272 blocks). New mirrored devices might require more space than existing devices due to changes in the booting procedure


Both devices are identical SanDisk Cruzer 16gb USB disks. I get that, as it says, new devices might need more space for change in procedure. But, the boot environments page says I'm only using 3.7gb of the 14.91 available. What's the deal?
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Not all USB devices are built the same, even when they're from the same batch. As long as they are around the advertised size they're shipped.

New device: 31,266,816
Current device: 31,588,272
Difference: 321456

Easy way to fix is to backup your config, reinstall onto both drives and then restore your config.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Easy way to fix is to backup your config, reinstall onto both drives and then restore your config.
Thank you. I've backed up my config, but how do I reinstall it onto both drives? And will the same error occur next time round?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
how do I reinstall it onto both drives?
The same way you installed on both drives of your original mirror. Check the manual if you don't remember.
And will the same error occur next time round?
Yes, if you again try to add a device to a mirror that's smaller than the existing device.
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
The same way you installed on both drives of your original mirror. Check the manual if you don't remember.
Sorry;daft question. I thought you were referring to a another method of install. Happy with a new install and then import config.

Think I'll take the opportunity to swap to an SSD boot device instead.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
This is actually because the EFI system partition size (for new disks) was doubled or something, recently. Since boot devices don't have a swap partition that can be used to handle minor overflow like this, you need to start from scratch or use larger devices.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
This is actually because the EFI system partition size (for new disks) was doubled or something, recently. Since boot devices don't have a swap partition that can be used to handle minor overflow like this, you need to start from scratch or use larger devices.
What does this mean? I'm curious, simply for knowledge.
(I didn't even know the FreeNAS boot USB had multiple partitions)

Have you guys considered using that 'swap' style thing you do for the primary hard drives. Like 100MB or something, or 200MB on USB keys, so a 16GB key from Kingston works with a 16GB key from Sandisk (etc)

I know not all keys contain EXACTLY the same amount of space sadly.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Writing swap to a USB key would kill it in weeks.. bad idea
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Writing swap to a USB key would kill it in weeks.. bad idea

I'm on my 4'th year, I had one USB key, once report a fault and it was actually fine, USB is not a big deal, don't necessarily believe those who claim it isn't as you may have read.

FreeNAS10 had USB key issues, 9 and 11 do not.
 
Last edited:

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
My current build is using dual Sandisk Fit as boot, but I don’t write swap on them.. you mean that this would be okey for commercial grade USB keys?
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
Sorry my reply was harsh, I'll edit it.


You can _TOTALLY_ run FreeNAS from USB without major issue, better to have 2 in a mirror of course.
The KEY thing is to make sure under "System" "System Dataset" is configured to write to your ARRAY / pool NOT THE USB KEY

For some reason, on some installs, it accidentally gets set to the USB key - when that happens, lots of writes = dead keys.
If that doesn't happen, works fine, for years.

Like I said, 4 years for me I'm up to now, GREAT way to free up 1 or 2 SATA ports.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
We are not talking about system dataset, we are talking about swap. Swap would be (at least) equally bad for USB keys.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What does this mean?
Because EFI was designed around similar hardware constraints as legacy BIOS, it was decided that mass storage required for EFI functions such as bootloaders, recovery utilities and drivers would be provided on the user's disk in the form of a separate partition. In typical use, it holds the OS' bootloader, which the firmware looks for in the partition's filesystem (which is FAT32, BTW).

FreeNAS used to create this partition with a size of 100 MB, IIRC, which is a popular size. Apparently, the spec mandates 200 MB, so FreeNAS now does that. Naturally, that's going to rob the ZFS partition of space, meaning that you need a larger device to hold the extra space.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
We are not talking about system dataset, we are talking about swap. Swap would be (at least) equally bad for USB keys.

Sorry guys, some confusion there in my replies, I was specifically addressing this line.
"Think I'll take the opportunity to swap to an SSD boot device instead." Which I believe is un-necessary.


Also when I say swap, I think I'm using the wrong term, on the hard drives for the actual array, there's 2GB of space reserved, to 'cut the disk short' - it allows people to use disks from different manufacturers when you swap out drives, incase there's fluctuations in disk space. (I believe that's what it's for)
That's what I was referring to, I think FreeNAS should have that, for USB keys, so that 16GB or 32GB keys can be replaced when faulty, with any key, without the risk of "this key is actually a tiny tiny bit too small ti mirror"
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I think FreeNAS should reserve an extra 100MB or so free partition at the end of the boot drive too... While we're changing the boot layout. That could then be automatically used to enable slightly smaller boot drives to be used to replace other boot drives.

BUT that horse has probably bolted anyway.
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Sorry guys, some confusion there in my replies, I was specifically addressing this line.
"Think I'll take the opportunity to swap to an SSD boot device instead." Which I believe is un-necessary.


Also when I say swap, I think I'm using the wrong term, on the hard drives for the actual array, there's 2GB of space reserved, to 'cut the disk short' - it allows people to use disks from different manufacturers when you swap out drives, in case there's fluctuations in disk space. (I believe that's what it's for)
That's what I was referring to, I think FreeNAS should have that, for USB keys, so that 16GB or 32GB keys can be replaced when faulty, with any key, without the risk of "this key is actually a tiny tiny bit too small ti mirror"

https://www.freebsd.org/doc/handbook/adding-swap-space.html
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
"Think I'll take the opportunity to swap to an SSD boot device instead." Which I believe is un-necessary.

I've now already swapped to an SSD boot disk. Like I said, one of my mirrored USB keys fails every 8-12 weeks or so (consistently for ~2 years) and It's annoying have to keep swapping them over. Hopefully I won't have the same problem with the SSD.
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
I've now already swapped to an SSD boot disk. Like I said, one of my mirrored USB keys fails every 8-12 weeks or so (consistently for ~2 years) and It's annoying have to keep swapping them over. Hopefully I won't have the same problem with the SSD.

Something is wrong with your USB slots, FreeNAS config or something like that. I am on year 4, many others longer.

Where's your system dataset stored?
 

28061

Contributor
Joined
Oct 13, 2014
Messages
120
Where's your system dataset stored?
On my Pool1 - not on the boot device.
I’ve got about six SanDisk Cruzer Fit’s (16gb), that I’ve swapped around in different USB slots and have followed me through ~ 3 major revisions of FN.

Now I’m thinking about it, I’ve been having to replace them for about three years, on a ?12 week basis. Although I don’t ‘replace’ them with new, just one of the previous used batches!
 

diskdiddler

Wizard
Joined
Jul 9, 2014
Messages
2,377
On my Pool1 - not on the boot device.
I’ve got about six SanDisk Cruzer Fit’s (16gb), that I’ve swapped around in different USB slots and have followed me through ~ 3 major revisions of FN.

Now I’m thinking about it, I’ve been having to replace them for about three years, on a ?12 week basis. Although I don’t ‘replace’ them with new, just one of the previous used batches!

Well, look I'm not going to say I don't believe you, because I do.
Sorry to hear it though. I don't know why that is occurring for you. What board do you have?

I really hope my next system I don't suffer the problem you're having. I mean 4 years for me has been a great run.
 
Status
Not open for further replies.
Top