Project

General

Profile

Bug #23584

gpart: Starting block not found

Added by Warren Block about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Important
Assignee:
Alexander Motin
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

VM with a fresh install (not upgrade, formatted boot device) of FreeNAS-11-MASTER-201704260409 (5943e74).

The storage disk ada1 had an existing pool on it, but the volume creation wizard was used to overwrite it, giving it a name of tank and using the CD-ROM-like slider to use just one disk, all other options at default. The exception is shown below.

This appears to be a race condition, and does not do this every time. If it successfully creates a volume, detach it without erasing data and recreate the volume until it errors out.

The few times I tried it after wiping the disk, it did not seem to have the problem. But that could be due to the race also.

Request Method:     POST
Request URL:     http://10.0.0.118/storage/volumemanager/
Software Version:     FreeNAS-11-MASTER-201704260409 (5943e74)
Exception Type:     MiddlewareError
Exception Value:     

[MiddlewareError: b'Unable to GPT format the disk "ada1": gpart: Starting block not found for geom ada1\n']

Exception Location:     ./freenasUI/middleware/notifier.py in __gpt_labeldisk, line 411
Server time:     Wed, 26 Apr 2017 07:18:39 -0700
Traceback

Environment:

Software Version: FreeNAS-11-MASTER-201704260409 (5943e74)
Request Method: POST
Request URL: http://10.0.0.118/storage/volumemanager/

Traceback:
File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  39.             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
  157.         if form.is_valid() and form.save():
File "./freenasUI/storage/forms.py" in save
  290.                     init_rand=init_rand,
File "./freenasUI/middleware/notifier.py" in init
  238.             f(objectid, *args, **kwargs)
File "./freenasUI/middleware/notifier.py" in _init_volume
  1059.         self.__create_zfs_volume(volume, swapsize, kwargs.pop('groups', False), kwargs.pop('path', None), init_rand=kwargs.pop('init_rand', False))
File "./freenasUI/middleware/notifier.py" in __create_zfs_volume
  804.             vdevs = self.__prepare_zfs_vdev(vgrp['disks'], vdev_swapsize, encrypt, volume)
File "./freenasUI/middleware/notifier.py" in __prepare_zfs_vdev
  740.                                  swapsize=swapsize)
File "./freenasUI/middleware/notifier.py" in __gpt_labeldisk
  411.                 raise MiddlewareError(f'Unable to GPT format the disk "{devname}": {error}')

Exception Type: MiddlewareError at /storage/volumemanager/
Exception Value: [MiddlewareError: b'Unable to GPT format the disk "ada1": gpart: Starting block not found for geom ada1\n']

Associated revisions

Revision b809cddf (diff)
Added by Alexander Motin about 4 years ago

Fix withered handling of r280687, broken by r286719. MFC after: 1 week. (cherry picked from commit 50740d3da3640702a8b00ee5febd3916096ae694) Ticket: #23584

Revision b809cddf (diff)
Added by Alexander Motin about 4 years ago

Fix withered handling of r280687, broken by r286719. MFC after: 1 week. (cherry picked from commit 50740d3da3640702a8b00ee5febd3916096ae694) Ticket: #23584

History

#1 Updated by Alexander Motin about 4 years ago

  • Status changed from Unscreened to Fix In Progress
  • Target version set to 11.0

It seems to be a problem of GEOM/gpart which I already fixed once, but that resurrected because of later change. GEOM allows withered GEOM exist same time as alive one, and `gpart add` was trying to get parameters from the dead one.

#2 Updated by Alexander Motin about 4 years ago

  • Status changed from Fix In Progress to 19

#3 Updated by Alexander Motin about 4 years ago

  • Status changed from 19 to Ready For Release

I count this as fixed, since I was unable to reproduce it even before, and the fix seems not breaking anything. Warren, please test it in your environment, if you can.

#4 Updated by Alexander Motin about 4 years ago

  • Target version changed from 11.0 to 11.0-RC2

#5 Updated by Alexander Motin about 4 years ago

  • Status changed from Ready For Release to Resolved
  • Target version changed from 11.0-RC2 to 11.0-RC

Also available in: Atom PDF