Create new pool ends with error: Command '('gpart', 'create', '-s', 'gpt', '/dev/ada0')' returned non-zero exit status 1.

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
I have fresh installation of FreeNAS-11.2-U5

Trying to create new pool:
5 disks, raid-z (this whole nas is backup co z1 is enough for me)
encrypted

after confirming that all disks will be erased, the procecure ends with following error:

Code:
File "/usr/local/lib/python3.6/site-packages/tastypie/resources.py", line 219, in wrapper
    response = callback(request, *args, **kwargs)

  File "./freenasUI/api/resources.py", line 1448, in dispatch_list
    request, **kwargs

  File "/usr/local/lib/python3.6/site-packages/tastypie/resources.py", line 450, in dispatch_list
    return self.dispatch('list', request, **kwargs)

  File "./freenasUI/api/utils.py", line 251, in dispatch
    request_type, request, *args, **kwargs

  File "/usr/local/lib/python3.6/site-packages/tastypie/resources.py", line 482, in dispatch
    response = method(request, **kwargs)

  File "/usr/local/lib/python3.6/site-packages/tastypie/resources.py", line 1384, in post_list
    updated_bundle = self.obj_create(bundle, **self.remove_api_resource_names(kwargs))

  File "/usr/local/lib/python3.6/site-packages/tastypie/resources.py", line 2175, in obj_create
    return self.save(bundle)

  File "./freenasUI/api/utils.py", line 445, in save
    form.save()

  File "./freenasUI/storage/forms.py", line 316, in save
    raise e

  File "./freenasUI/storage/forms.py", line 310, in save
    c.call("alert.unblock_source", lock)

  File "./freenasUI/storage/forms.py", line 303, in save
    notifier().create_volume(volume, groups=grouped, init_rand=init_rand)

  File "./freenasUI/middleware/notifier.py", line 763, in create_volume
    vdevs = self.__prepare_zfs_vdev(vgrp['disks'], vdev_swapsize, encrypt, volume)

  File "./freenasUI/middleware/notifier.py", line 698, in __prepare_zfs_vdev
    sync=False)

  File "./freenasUI/middleware/notifier.py", line 341, in __gpt_labeldisk
    c.call('disk.wipe', devname, 'QUICK', False, job=True)

  File "./freenasUI/middleware/notifier.py", line 341, in __gpt_labeldisk
    c.call('disk.wipe', devname, 'QUICK', False, job=True)

  File "/usr/local/lib/python3.6/site-packages/middlewared/client/client.py", line 477, in call
    raise ClientException(job['error'], trace=job['exception'])

middlewared.client.client.ClientException: Command '('gpart', 'create', '-s', 'gpt', '/dev/ada0')' returned non-zero exit status 1.


Some of those disks are recycled form old freebsd system (nas4free) with geli encryption, I dont know if it may play some role...

Please help.
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
I am trying to "format" the disks.

The command: gpart destroy -F ada0
returns error: "gpart: arg0 'ada0': Invalid argument

command geom disk list shows the devices correctly.. ada0 to ada4 with correct size, serial numbers etc.

So how can I format these drives in FreeBSD? I expected this to be easy.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Any reason why you don't do it from the GUI ???

And as for me, RaidZ1 and pool encryption are 2 big No-No...
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
I did it from the GUI, that is where I got the initial error message.

Z1 is explained in my first post.
 

urza

Dabbler
Joined
Mar 17, 2019
Messages
38
If anyone has the same problem, I solved it with this command:

sysctl kern.geom.debugflags=16

after which I was able to format the drives with

gpart create -s gpt /dev/ada0 etc for other disks..

I dont know what the line of code does, neither does the person who posted it on stackexchange: https://unix.stackexchange.com/a/152551/363357

I must say, FreeNAS is a bit disappointing. I installed it just recently after years of using NAS4FREE without any single issue and this is like 3rd major pain/issue/bug/ that I encountered with FreeNAS..
 
Top