Error adding Sandisk USB to bootpool

tgn55

Dabbler
Joined
Jan 1, 2019
Messages
23
Hi,
a while back I got some errors reported on my mirrored (16 Gb) USB boot pool drives...

I successfully replaced one USB with a 32 Gb drive I had laying around, but wanted to have two identical 32 Gb drives... I bought a couple Sandisk Ultra Flair USB 3.0 flash drives. That's when the fun began...

On attempting to replace the remainng 16 Gb drive, I got a bunch of Python errors. Strange... I've done this several times before with no issues.
I pulled the Sandisk drive and stuck it in my (old faithful) Windows 7 PC.. Hmm... it did not show up as USB drives normally do (tho' I could "see" the drive under Devices & Printers.... That's odd...

I poked around in Disk Manager (this is all on Windows), and guessed that the drive was partitioned in a way that TrueNAS - and my Win7 PC couldn't grok. OK, nuke it, built a plain old FAT32 partition on it. Fine... my PC can now see the drive. Great! Feels like I'm winning...

Try to add the newly formatted drive to my TrueNAS boot pool .. nope. Same error. Grrr.

Go back to PC, nuke the USB again, but don't partition it, try add to boot pool... nope. Same error.

Go into TrueNAS Storage->Disks... Wipe drive, now try add to boot pool... yep, you guessed right. Same error.

So... here's the error text:

CallError​

[EFAULT] newfs_msdos -F 16 /dev/da1p1 failed: newfs_msdos: /dev/da1p1: Operation not permitted
Error: Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 138, in call_method
result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1213, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/boot.py", line 139, in replace
await self.middleware.call('boot.format', dev, format_opts)
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1256, in call
return await self._call(
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1213, in _call
return await methodobj(*prepared_call.args)
File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/boot_/format.py", line 118, in format
raise CallError(
middlewared.service_exception.CallError: [EFAULT] newfs_msdos -F 16 /dev/da1p1 failed:
newfs_msdos: /dev/da1p1: Operation not permitted

At this point, I seem to have tried just about every combo - and still nothing works on TrueNAS.
I have trawled other posts about USB errors, but found nothing to get past this snafu. Any help appreciated,

PS... suggestions to go to SSD boot are not helpful... I have all 6 SATA ports connected to my disk drives, so booting from USB is probably my only option.

Thanks,
T.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
suggestions to go to SSD boot are not helpful... I have all 6 SATA ports connected to my disk drives, so booting from USB is probably my only option.
SSD to USB adapter has been suggested and used with good success (for the boot pool, not data pools) around here.
 
Last edited:

tgn55

Dabbler
Joined
Jan 1, 2019
Messages
23
Thanks... I'll check that option out - but, I'd still like to know why my USB stick throws this error. Is it a problem with the way it is formatted? Lack of Sandisk driver (seems unlikely for a major brand - but who knows)

I cant decipher anything useful from the trace. Am I correct in thinking that it was all going fine until the last line ie call to newfs_msdos?

Cheers,
T.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I pulled the Sandisk drive and stuck it in my (old faithful) Windows 7 PC.. Hmm... it did not show up as USB drives normally do (tho' I could "see" the drive under Devices & Printers.... That's odd...
No it isn't. Windows can't read the partitions on it.

I poked around in Disk Manager (this is all on Windows), and guessed that the drive was partitioned in a way that TrueNAS - and my Win7 PC couldn't grok
As mentioned above. No useful things can happen with Windows that will impact anything here.

OK, nuke it, built a plain old FAT32 partition on it. Fine... my PC can now see the drive. Great! Feels like I'm winning...

Try to add the newly formatted drive to my TrueNAS boot pool .. nope. Same error. Grrr.

Go back to PC, nuke the USB again, but don't partition it, try add to boot pool... nope. Same error.
As mentioned... Windows can't be of any help here.

I have trawled other posts about USB errors, but found nothing to get past this snafu. Any help appreciated,
As already provided, use an SSD via USB adapter.

I'd still like to know why my USB stick throws this error
OK

Is it a problem with the way it is formatted? Lack of Sandisk driver (seems unlikely for a major brand - but who knows)
No. I have used those in the (distant) past with success.

I cant decipher anything useful from the trace. Am I correct in thinking that it was all going fine until the last line ie call to newfs_msdos?
Probably...

If you really want to invest a bunch of time in figuring out (but not fixing) what's wrong here for the sake of a $10 USB stick, then run badblocks on it. That should identify which blocks are unable to be written and are the root cause.
 

tgn55

Dabbler
Joined
Jan 1, 2019
Messages
23
I have yet to get USB SSDs... but, have now bought a couple new USB2.0 32Gb USB drives, as I was not 100% sure the Sandisk 3.0 devices were not implicated in the failure.

So now I have the following:
da0p1: a 32 Gb USB 2.0 stick
da0p2 a 32 Gb USB 2.0 stick, which I am trying to use to replace a failing device.

I've tried Replace, also tried Detach then Attach... tried a different USB port, Still nothing works.

It's clearly not faulty USB sticks... two brand new sticks, 2 leading brands (Sandisk and Verbatim - both fail). Maybe I am doing something wrong.
Sorry for the dumb questions, but I am sick of banging my head on this wall.

Do the USB drives need to be wiped prior to adding to the pool? Or should they just work out the box?
Why is this so hard? I previously had mirrored 16 Gb USBs working fine, and I also had recently replaced one of them with a larger 32Gb drive... all good. Replacing the remaining 16Gb drive is causing my dilemma, and I'm baffled why new USB sticks continue to fail getting added to the boot pool.

Any/all pointers appreciated.

T.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If you're struggling a lot (and it seems you are), the best way is often to backup your config, do a fresh install to the wanted boot media (mirrored if you want), then restore your config once that's done.

The install process will wipe the drives you select to install to, so that's not an issue.
 

tgn55

Dabbler
Joined
Jan 1, 2019
Messages
23
So, I finally got to do a complete reinstall, and sure enough, the same USB sticks that would throw the error above, got set up as mirrored boot pool just fine.

For good measure, I went out today and bought an SSD. The smallest I can buy is 500Gb !! A bit of overkill for boot. I guess it is still best to mirror them, but these are no longer $10 sticks... so I got one.

Although the point is now moot, it still puzzles me why numerous attempts to replace a 16Gb USB throws the Python error above... that does feel like something's broken somewhere.

Thanks for the help.
 
Top