Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

SOLVED Cannot create volume - gpart: Invalid argument

Status
Not open for further replies.

meltman

Neophyte
Joined
Sep 6, 2016
Messages
5
I'm really struggling here. I have some SAS drives that came from a netapp box. I'm unable to get them to create a volume due to "invalid argument" error.

Any ideas? I've hit them with dd to zero them out but am really struggling.

Code:
Environment:

Software Version: FreeNAS-11.1-U4 (89e3d93bc)
Request Method: POST
Request URL: http://172.25.1.25/storage/volumemanager-zfs/


Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  42.			 response = get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
  249.			 response = self._get_response(request)
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  178.			 response = middleware_method(request, callback, callback_args, callback_kwargs)
File "./freenasUI/freeadmin/middleware.py" in process_view
  162.		 return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python3.6/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
  23.				 return view_func(request, *args, **kwargs)
File "./freenasUI/storage/views.py" in volumemanager_zfs
  268.			 form.done(request, events)
File "./freenasUI/storage/forms.py" in done
  724.				 notifier().create_volume(volume, groups=grouped, init_rand=init_rand)
File "./freenasUI/middleware/notifier.py" in create_volume
  752.			 vdevs = self.__prepare_zfs_vdev(vgrp['disks'], vdev_swapsize, encrypt, volume)
File "./freenasUI/middleware/notifier.py" in __prepare_zfs_vdev
  687.								  swapsize=swapsize)
File "./freenasUI/middleware/notifier.py" in __gpt_labeldisk
  359.				 raise MiddlewareError(f'Unable to GPT format the disk "{devname}": {error}')

Exception Type: MiddlewareError at /storage/volumemanager-zfs/
Exception Value: [MiddlewareError: Unable to GPT format the disk "da11": gpart: Invalid argument
]
 

Stux

Wizened Sage
Joined
Jun 2, 2016
Messages
4,222
I’ve seen around the net that NetApp disks use unusual sector sizes. Iirc 520 byte sectors instead of 512 byte sectors.

I suggest searching the servethehome forums to find info on resetting (if possible) the sector sizes to the standard 512 and see if that helps.
 

meltman

Neophyte
Joined
Sep 6, 2016
Messages
5
I figured it out.
Each drive had "Formatted with type 2 protection." listed in smartctl.

Fixed by sg_format --format --size=512 --fmtpinfo=0 /dev/da17

Thanks for the idea Stux - you were bang on.
 
Status
Not open for further replies.
Top