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/", line 219, in wrapper
response = callback(request, *args, **kwargs)

file "./freenasui/api/", line 1449, in dispatch_list
request, **kwargs

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

file "./freenasui/api/", line 251, in dispatch
request_type, request, *args, **kwargs

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

file "/usr/local/lib/python3.6/site-packages/tastypie/", 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/", line 2175, in obj_create

file "./freenasui/api/", line 445, in save

file "./freenasui/storage/", line 316, in save
raise e

file "./freenasui/storage/", line 310, in save"alert.unblock_source", lock)

file "./freenasui/storage/", line 303, in save
notifier().create_volume(volume, groups=grouped, init_rand=init_rand)

file "./freenasui/middleware/", line 760, in create_volume
vdevs = self.__prepare_zfs_vdev(vgrp['disks'], vdev_swapsize, encrypt, volume)

file "./freenasui/middleware/", line 695, in __prepare_zfs_vdev

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

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

file "/usr/local/lib/python3.6/site-packages/middlewared/client/", 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.


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