"Device is too small" when mirroring boot device (flash)

Status
Not open for further replies.

Eric Batte

Dabbler
Joined
Jan 11, 2015
Messages
27
I'm hoping someone can advise. I purchased two identical 16 GB USB flash drives (same manufacturer, model). After getting Freeness installed and configured using one of them I tried to mirror the boot device to the other flash drive. I get the error "device is too small".

I think I read somewhere that Freebsd (or ZFS or Freenas?) might be very picky about the EXACT number of blocks matching on mirrored drives. If that's the case, could I possible repartition both of the flash drives so they would be the same size in order to force it to work? Other suggestions?


Thanks
 

Eric Batte

Dabbler
Joined
Jan 11, 2015
Messages
27
I'm not so sure that would matter. Apparently the 2 flash drives have different block counts and freenas would still not like that. I'm reinstalling on the "smaller" flash drive now and will try to mirror again. With any luck, the second flash drive will be "larger" and freenas won't complain that it's too small. I'll update soon.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
FreeNAS (ZFS, really) doesn't care if the devices are the same size or not (I'm currently running a 8GB and a 16 GB USB stick mirrored for my boot pool). If you create a fresh mirror with two devices, it will use the space of the smaller device. If you install on one device, and later add a mirror to a larger one, you'll be fine. If you install on the larger device, and try to add a mirror to a smaller one, as you seem to have done, you'll have problems.
 

Eric Batte

Dabbler
Joined
Jan 11, 2015
Messages
27
Understood. However, what I think is unique to my situation is that I've got what I perceive to be identical flash drives - same manufacturer, same size (both 16GB). So "smaller" is being interpreted by FreeNAS even though they are both labeled 16GB. Apparently one has a few less blocks available than the other for whatever reason.

So, I've confirmed that I have a working mirror now. If anyone ever has a similar situation, the resolution is:

1. Save your config (System->General->Save Config)
2. Reinstall FreeNAS to the "smaller" flash drive
3. Upload your config saved in step 1 above (System->General->Upload Config). FreeNAS will reboot twice.
4. Once up and running with a restored config, plug in the "larger" flash drive and attach mirror the boot device (System->General->Boot->Status, select your device, then select the Attach button at the bottom of screen).
 
Last edited by a moderator:

Andrew076

Patron
Joined
Apr 5, 2015
Messages
206
Anyone have a better fix for this? I have Free NAS installed on a 16 GB flash which was mirrored. One of the drives is giving me issues so I bought an other 16 gb flash to create a new mirror, but was told that the drive was too small. I assume I am going to need to buy a 32GB flash drive now to fix it, but I don't want to have to keep buying larger and larger flash drives when a usb fails. Is there anyway to install a 32 gb but tell it to only use 16 or 20 or some other number less than 32 so if and when I need to replace one I can use a 32 and it will be the perfect size?
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
This problem was addressed more than a year ago, in a way that the size of the partition is rounded down a bit after taking the smaller of the two sizes when creating a mirrored pool during install. Unfortunately this doesn't seem to help in all cases and a fix for the general case seems not to be easy to implement.

https://bugs.freenas.org/issues/9365
https://bugs.freenas.org/issues/9425
 

Andrew076

Patron
Joined
Apr 5, 2015
Messages
206
This problem was addressed more than a year ago, in a way that the size of the partition is rounded down a bit after taking the smaller of the two sizes when creating a mirrored pool during install. Unfortunately this doesn't seem to help in all cases and a fix for the general case seems not to be easy to implement.

https://bugs.freenas.org/issues/9365
https://bugs.freenas.org/issues/9425
Thanks, I had (incorrectly it appears) assumed there must be a way to manage this. I guess I will start researching how to copy configuration files over for the next time it happens. Right now I will just by a 32 GB stick as it is only like $9.00 and go from there, maybe I will buy two and install the smaller of the two now... and save the other for the next "crash" or time it needs to be replaced.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Download the config file through the GUI, do a clean install onto both of the sticks you now want to use, upload the saved config file through the GUI. That's all there is to it.
 

Andrew076

Patron
Joined
Apr 5, 2015
Messages
206
Download the config file through the GUI, do a clean install onto both of the sticks you now want to use, upload the saved config file through the GUI. That's all there is to it.
So I did a quick look and I didn't see where that option was in the GUI and a search in the Guide came up with too many responses. If you could let me know I would appreciate it. No rush as I replaced the 16 with a 32 and everything is good... I just believe this is going to be important in the future (and is probably good to have off the server anyway in the event of some multi stick failure).
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Status
Not open for further replies.
Top