Unable to wipe disk

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
I have a weird problem.
I tried creating new pool with a bunch of new disks (will migrate data from the original pool later), but I keep getting this after clicking create pool:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 367, in run
await self.future
File "/usr/local/lib/python3.9/site-packages/middlewared/job.py", line 403, in __run_body
rv = await self.method(*([self] + 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/pool.py", line 672, in do_create
formatted_disks = await self.middleware.call('pool.format_disks', job, disks)
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/plugins/pool_/format_disks.py", line 56, in format_disks
await asyncio_map(format_disk, disks.items(), limit=16)
File "/usr/local/lib/python3.9/site-packages/middlewared/utils/asyncio_.py", line 16, in asyncio_map
return await asyncio.gather(*futures)
File "/usr/local/lib/python3.9/site-packages/middlewared/utils/asyncio_.py", line 13, in func
return await real_func(arg)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/pool_/format_disks.py", line 29, in format_disk
await self.middleware.call(
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 1224, in _call
return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1128, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/disk_/format.py", line 25, in format
raise CallError(f'Failed to wipe disk {disk}: {job.error}')
middlewared.service_exception.CallError: [EFAULT] Failed to wipe disk da5: [Errno 22] Invalid argument

Any idea what's going on?
I'm on TrueNAS 12.0-U7.

P.S. Manually trying to wipe a disk give me "Error: [Errno 22] Invalid argument".
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
I thought it could be some garbage in the browser cache or something, but nothing. Restarting the server made no difference either.
 

Jessep

Patron
Joined
Aug 19, 2018
Messages
379
Linux live CD or Windows diskpart/clean?

Are you certain they are 512b drives rather than 520, etc?
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Live CD what?
These are SAS disks (4kn) I recently installed in the server and ran badblocks on. I aim to move the pool (not sure how yet) from the current WD Reds to these.
I wanted to create a new pool on them just to test things out, but came to this dead end.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Oh I forgot to mention. TruNAS is running under ESXi.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Can anyone tell me how to wipe/format/anything a disk from the shell? Maybe that would work since the interface code is bugged (that's the only conclusion I can come to when I see references to the source and errors).
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Even more weird - I am no able to wipe disks from the storage part of the GUI... except for one. Well, to be specific, two of the four disks could be quick wiped without problems. The last one is doing a full wipe (according to the slow progress in the task manager) despite selecting quick, and the first one flat out refuses to work with Error: [Errno 1] Operation not permitted: '/dev/da4' error.
What's going on here?!!!!
Are there really no detailed logs anywhere? This tells me absolutely nothing :(

When I try to do gpart destroy -F da4, it returns "device not configured"
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
I formatted the disk from command line using
sudo sg_format --format -v /dev/da4
It went without problems, but trying to wipe it from the GUI gives me the "operation not permitted" error again.

1642607079662.png


No idea how to interpret this and why the other three unused disks aren't shown, and if this is even of any relevance.
Something seems to be selectively preventing me from performing certain actions on the disk. I don't get it.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Hm, I googled up this weird sysctl kern.geom.debugflags=16 command and that unblocked whatever it was and now it finally all works. Rebooted afterwards just in case.
Jesus.
I hate working with stuff I have absolutely zero knowledge about.
 
Last edited:
Top