FreeNAS Error Creating Pool

command ‘(‘gpart’, ‘create’, ‘-s’, ‘gpt’, ‘/dev/da8′)’ returned non-zero exit status 1.

If you get this error while trying to create a pool in FreeNAS-11.2-U4.1 or wiping a disk, there seems to be an issue wiping the referenced hard disk (ie. /dev/da8). I don’t have a root cause analysis at this time however sysctl is able to set a flag to ignore the error. I suspect it’s either detecting bad sectors on the physical disk, or a rogue preexisting RAID config, and I have both. Deciding to stripe a couple old WD Raptor 150’s that were used in a previous hardware RAID setup caused this headache for me.

Login to the shell as root on your freenas system and run sysctl kern.geom.debugflags=0x10 and continue performing whatever action caused this error message. Once you are done be sure to set it back to 0 with sysctl kern.geom.debugflags=0. It is not persistent and will be reset once you reboot the system if you forget to revert the change.

If for some reason you are still getting the error you can try zeroing out the beginning and end of the disk with the dd command. Replace the string </dev/da#> and <da#> with your own.

Zero beginning:


dd if=/dev/zero of=</dev/da#> bs=1m count=1

Zero end:


dd if=/dev/zero of=</dev/da#> bs=1m oseek=`diskinfo <da#> | awk '{print int($3 / (1024*1024)) - 4;}'`

Here is the full initial error msg I received:


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 1449, 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 760, in create_volume
vdevs = self.__prepare_zfs_vdev(vgrp['disks'], vdev_swapsize, encrypt, volume)

file "./freenasui/middleware/notifier.py", line 695, in __prepare_zfs_vdev
swapsize=swapsize)

file "./freenasui/middleware/notifier.py", line 341, in __gpt_labeldisk
c.call('disk.wipe', devname, 'quick', job=true)

file "./freenasui/middleware/notifier.py", line 341, in __gpt_labeldisk
c.call('disk.wipe', devname, 'quick', 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/da8')' returned non-zero exit status 1.

Source: https://www.ixsystems.com/community/threads/error-creating-pool-problem-with-gpart.70629/

Share
Disqus Comments Loading...

Recent Posts

Bittorrent IP Blocklists

In addition to using a VPN service, as an extra precaution I've been using the blocklist feature of my bittorrent… Read More

October 26, 2019 3:31 pm

Change Grub Default Boot Entry on Linux Mint

I'm dual booting Windows and Linux Mint on my laptop. The grub default is to boot into Linux Mint, however… Read More

April 23, 2019 7:45 pm

How to Reset Secure Channel On Active Directory Domain Controller

When you're a little too careless about virtualizing your domain controllers, cloning, migrating, backing up and restoring, returning from vacation… Read More

April 21, 2019 8:14 am

Run Systemd Script Before System Shutdown

I tried to retain the NGINX FastCGI cache and have it persist across system reboots instead of being ephemeral by… Read More

April 20, 2019 10:14 am

Learn Systemctl Usage to Manage Systemd Service in Linux

Systemd is new service manager for Linux. It's a replacement for all previous init systems (SysV/SysVinit & Ubuntu's Upstart) and… Read More

April 20, 2019 7:55 am

Force Delete Windows Server DHCP Failover Relationship

If you've found yourself here then chances are you messed up one of your domain controllers or at least one… Read More

April 20, 2019 5:54 am