FreeNAS box died, trying to revive it

Status
Not open for further replies.

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
I had a FreeNAS box, with 2 drives hooked up to it, a WD15EADS (/WD1.5TB) and a WD20EARS (/WD2TB). Both are in ZFS format. Was working great until I woke up this morning and the box had crashed. I tried rebooting, but it went into a panic and froze while booting. I unhooked the 2 drives, and it still wouldn't boot, so I figured that the USB was dead. I got out anotehr USB stick and put FreeNAS onot that, thinking I'll just import the two drives back in.

Tried auto import, didn't work (I'll post the fail message at the end). I then entered the Shell and tried zpool list, and both came out healthy. So I scrubbed them and tried again. Still nothing. I then tried zpool import -f, and it tells me that it can't create a mountpoint. Is there anything else I can do?

Code:
IndexError at /storage/auto-import/

list index out of range

Request Method: 	GET
Request URL: 	http://192.168.1.6/storage/auto-import/
Django Version: 	1.3.1
Exception Type: 	IndexError
Exception Value: 	

list index out of range

Exception Location: 	/usr/local/www/freenasUI/middleware/notifier.py in detect_volumes, line 1608
Python Executable: 	/usr/local/bin/python
Python Version: 	2.7.2
Python Path: 	['/usr/local/www/freenasUI', '/usr/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/python2.7/site-packages/South-0.7.3-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pyasn1-0.0.13b-py2.7.egg', '/usr/local/lib/python2.7/site-packages/pyasn1_modules-0.0.1a-py2.7.egg', '/usr/local/lib/python2.7/site-packages/flup-1.0.2-py2.7.egg', '/usr/local/lib/python2.7/site-packages/python_ldap-2.4.1-py2.7-freebsd-8.2-RELEASE-p5-amd64.egg', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-freebsd8', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/usr/local/www', '/usr/local/www', '/usr/local/www/freenasUI']
Server time: 	Sat, 16 Jun 2012 03:23:54 -0700
Traceback Switch to copy-and-paste view

    /usr/local/lib/python2.7/site-packages/django/core/handlers/base.py in get_response
        resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
        callback, callback_args, callback_kwargs = resolver.resolve(
        request.path_info)
        # Apply view middleware
        for middleware_method in self._view_middleware:
        response = middleware_method(request, callback, callback_args, callback_kwargs) ...
        if response:
        break
        if response is None:
        try:
        response = callback(request, *callback_args, **callback_kwargs)
    ▶ Local vars
    Variable 	Value
    exceptions 	
    u'<module 'django.core.exceptions' from '/usr/local/lib/python2.7/site-packages/django/core/exceptions.pyc'>'
    callback_args 	
    u'()'
    receivers 	
    u'[(<function _rollback_on_exception at 0x80349b488>, None)]'
    middleware_method 	
    u'<bound method RequireLoginMiddleware.process_view of <freenasUI.freeadmin.middleware.RequireLoginMiddleware object at 0x804d34a50>>'
    self 	
    u'<django.core.handlers.wsgi.WSGIHandler object at 0x804d2c850>'
    settings 	
    u'<django.conf.LazySettings object at 0x8021a5410>'
    request 	
    u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': '7c59405bbc50176be86d7facf2deb958',\n 'mytreeSaveStateCookie': 'root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11',\n 'sessionid': '72bbcdb9897177c24f87d809fd10500d'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11; csrftoken=7c59405bbc50176be86d7facf2deb958; sessionid=72bbcdb9897177c24f87d809fd10500d',\n 'HTTP_HOST': '192.168.1.6',\n 'HTTP_REFERER': 'http://192.168.1.6/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0',\n 'HTTP_X_CSRFTOKEN': '7c59405bbc50176be86d7facf2deb958',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/auto-import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/auto-import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/auto-import/',\n 'REMOTE_ADDR': '192.168.1.5',\n 'REMOTE_PORT': '54891',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/auto-import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.6',\n 'SERVER_NAME': '192.168.1.6',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x808a26390>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x806b95b50>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>'
    callback 	
    u'<function volautoimport at 0x8071268c0>'
    resolver 	
    u'<RegexURLResolver freenasUI.urls (None:None) ^/>'
    urlresolvers 	
    u'<module 'django.core.urlresolvers' from '/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.pyc'>'
    callback_kwargs 	
    u'{}'
    response 	
    u'None'
    urlconf 	
    u''freenasUI.urls''
    /usr/local/www/freenasUI/freeadmin/middleware.py in process_view
        backend = get_backends()[0]
        user.backend = "%s.%s" % (backend.__module__, backend.__class__.__name__)
        login(request, user)
        if request.path == settings.LOGIN_URL:
        return None
        if hasattr(view_func, '__is_public'):
        return None
        return login_required(view_func)(request,*view_args,**view_kwargs) ...
        class LocaleMiddleware(object):
        def process_request(self, request):
        if request.method == 'GET' and 'lang' in request.GET:
        language = request.GET['lang']
    ▶ Local vars
    Variable 	Value
    view_kwargs 	
    u'{}'
    view_args 	
    u'()'
    self 	
    u'<freenasUI.freeadmin.middleware.RequireLoginMiddleware object at 0x804d34a50>'
    request 	
    u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': '7c59405bbc50176be86d7facf2deb958',\n 'mytreeSaveStateCookie': 'root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11',\n 'sessionid': '72bbcdb9897177c24f87d809fd10500d'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11; csrftoken=7c59405bbc50176be86d7facf2deb958; sessionid=72bbcdb9897177c24f87d809fd10500d',\n 'HTTP_HOST': '192.168.1.6',\n 'HTTP_REFERER': 'http://192.168.1.6/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0',\n 'HTTP_X_CSRFTOKEN': '7c59405bbc50176be86d7facf2deb958',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/auto-import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/auto-import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/auto-import/',\n 'REMOTE_ADDR': '192.168.1.5',\n 'REMOTE_PORT': '54891',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/auto-import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.6',\n 'SERVER_NAME': '192.168.1.6',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x808a26390>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x806b95b50>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>'
    view_func 	
    u'<function volautoimport at 0x8071268c0>'
    /usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py in _wrapped_view
        that takes the user object and returns True if the user passes.
        """
        def decorator(view_func):
        @wraps(view_func, assigned=available_attrs(view_func))
        def _wrapped_view(request, *args, **kwargs):
        if test_func(request.user):
        return view_func(request, *args, **kwargs) ...
        path = request.build_absolute_uri()
        # If the login url is the same scheme and net location then just
        # use the path as the "next" url.
        login_scheme, login_netloc = urlparse.urlparse(login_url or
        settings.LOGIN_URL)[:2]
        current_scheme, current_netloc = urlparse.urlparse(path)[:2]
    ▶ Local vars
    Variable 	Value
    test_func 	
    u'<function <lambda> at 0x804d4c668>'
    login_url 	
    u'None'
    args 	
    u'()'
    request 	
    u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': '7c59405bbc50176be86d7facf2deb958',\n 'mytreeSaveStateCookie': 'root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11',\n 'sessionid': '72bbcdb9897177c24f87d809fd10500d'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11; csrftoken=7c59405bbc50176be86d7facf2deb958; sessionid=72bbcdb9897177c24f87d809fd10500d',\n 'HTTP_HOST': '192.168.1.6',\n 'HTTP_REFERER': 'http://192.168.1.6/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0',\n 'HTTP_X_CSRFTOKEN': '7c59405bbc50176be86d7facf2deb958',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/auto-import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/auto-import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/auto-import/',\n 'REMOTE_ADDR': '192.168.1.5',\n 'REMOTE_PORT': '54891',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/auto-import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.6',\n 'SERVER_NAME': '192.168.1.6',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x808a26390>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x806b95b50>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>'
    kwargs 	
    u'{}'
    redirect_field_name 	
    u''next''
    view_func 	
    u'<function volautoimport at 0x8071268c0>'
    /usr/local/www/freenasUI/storage/views.py in volautoimport
        else:
        if 'volume_disks' in request.POST:
        disks = request.POST.getlist('volume_disks')
        else:
        disks = None
        else:
        form = forms.VolumeAutoImportForm() ...
        disks = []
        return render(request, 'storage/autoimport.html', {
        'form': form,
        'disks': disks
        })
    ▶ Local vars
    Variable 	Value
    request 	
    u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': '7c59405bbc50176be86d7facf2deb958',\n 'mytreeSaveStateCookie': 'root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11',\n 'sessionid': '72bbcdb9897177c24f87d809fd10500d'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11; csrftoken=7c59405bbc50176be86d7facf2deb958; sessionid=72bbcdb9897177c24f87d809fd10500d',\n 'HTTP_HOST': '192.168.1.6',\n 'HTTP_REFERER': 'http://192.168.1.6/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0',\n 'HTTP_X_CSRFTOKEN': '7c59405bbc50176be86d7facf2deb958',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/auto-import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/auto-import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/auto-import/',\n 'REMOTE_ADDR': '192.168.1.5',\n 'REMOTE_PORT': '54891',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/auto-import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.6',\n 'SERVER_NAME': '192.168.1.6',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x808a26390>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x806b95b50>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>'
    /usr/local/www/freenasUI/storage/forms.py in __init__
        class VolumeAutoImportForm(forms.Form):
        #volume_name = forms.CharField(max_length = 30, label = _('Volume name') )
        volume_disks = forms.ChoiceField(choices=(), widget=forms.Select(attrs=attrs_dict), label = _('Member disk'))
        def __init__(self, *args, **kwargs):
        super(VolumeAutoImportForm, self).__init__(*args, **kwargs)
        self.fields['volume_disks'].choices = self._populate_disk_choices() ...
        def _populate_disk_choices(self):
        diskchoices = dict()
        used_disks = [notifier().identifier_to_device(i[0]) for i in models.Disk.objects.all().values_list('disk_identifier').distinct()]
    ▶ Local vars
    Variable 	Value
    self 	
    u'<freenasUI.storage.forms.VolumeAutoImportForm object at 0x808a32190>'
    args 	
    u'()'
    kwargs 	
    u'{}'
    /usr/local/www/freenasUI/storage/forms.py in _populate_disk_choices
        def _populate_disk_choices(self):
        diskchoices = dict()
        used_disks = [notifier().identifier_to_device(i[0]) for i in models.Disk.objects.all().values_list('disk_identifier').distinct()]
        # Grab partition list
        # NOTE: This approach may fail if device nodes are not accessible.
        vols = notifier().detect_volumes() ...
        for vol in list(vols):
        for vdev in vol['disks']['vdevs']:
        for disk in vdev['disks']:
        if filter(lambda x: x is not None and disk['name'].startswith(x), used_disks):
        vols.remove(vol)
    ▶ Local vars
    Variable 	Value
    used_disks 	
    u'[]'
    self 	
    u'<freenasUI.storage.forms.VolumeAutoImportForm object at 0x808a32190>'
    diskchoices 	
    u'{}'
    /usr/local/www/freenasUI/middleware/notifier.py in detect_volumes
        RE_POOL_NAME = re.compile(r'pool: (?P<name>[a-z][a-z0-9_-]+)', re.I)
        p1 = self.__pipeopen("zpool import")
        res = p1.communicate()[0]
        for pool in RE_POOL_NAME.findall(res):
        # get status part of the pool
        status = res.split('pool: %s\n' % pool)[1].split('pool:')[0] ...
        roots = zfs.parse_status(pool, doc, status)
        if roots[pool].status != 'UNAVAIL':
        volumes.append({
        'label': pool,
        'type': 'zfs',
    ▶ Local vars
    Variable 	Value
    status 	
    u'' id: 6855110416080880868\\n state: ONLINE\\naction: The pool can be imported using its name or numeric identifier.\\nconfig:\\n\\n\\tWD2TB ONLINE\\n\\t ada0p2 ONLINE\\n\\n ''
    search 	
    u'[]'
    p1 	
    u'<subprocess.Popen object at 0x808a1ed50>'
    volumes 	
    u'[{'cache': None,\n 'disks': {'id': '13',\n 'name': 'WD2TB',\n 'numVdevs': 1,\n 'status': 'ONLINE',\n 'vdevs': [{'disks': [{'id': '11',\n 'name': 'ada0p2',\n 'status': 'ONLINE'}],\n 'id': '12',\n 'name': 'stripe',\n 'numDisks': 1,\n 'status': 'ONLINE',\n 'type': 'stripe'}]},\n 'group_type': 'none',\n 'label': 'WD2TB',\n 'log': None,\n 'spare': None,\n 'type': 'zfs'}]'
    extra 	
    u'None'
    res 	
    u'' pool: WD2TB\\n id: 6855110416080880868\\n state: ONLINE\\naction: The pool can be imported using its name or numeric identifier.\\nconfig:\\n\\n\\tWD2TB ONLINE\\n\\t ada0p2 ONLINE\\n\\n pool: WD1.5TB\\n id: 13884691955919240954\\n state: ONLINE\\naction: The pool can be imported using its name or numeric identifier.\\nconfig:\\n\\n\\tWD1.5TB ONLINE\\n\\t ada1p2 ONLINE\\n''
    self 	
    u'<freenasUI.middleware.notifier.notifier instance at 0x807915518>'
    geom 	
    u''raid3''
    roots 	
    u'{'spare': None, 'cache': None, 'data': <middleware.zfs.Root object at 0x808a25210>, 'logs': None}'
    RE_POOL_NAME 	
    u'<_sre.SRE_Pattern object at 0x806c070c0>'
    doc 	
    u'<xmlDoc (None) object at 0x808a29758>'
    pool 	
    u''WD1''

Environment: Request Method: GET Request URL: http://192.168.1.6/storage/auto-import/ Django Version: 1.3.1 Python Version: 2.7.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.staticfiles', 'freeadmin', 'south', 'dojango', 'account', 'system', 'network', 'storage', 'sharing', 'services'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'freenasUI.freeadmin.middleware.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'freenasUI.freeadmin.middleware.RequireLoginMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'dojango.middleware.DojoCollector') Traceback: File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 105. response = middleware_method(request, callback, callback_args, callback_kwargs) File "/usr/local/www/freenasUI/freeadmin/middleware.py" in process_view 58. return login_required(view_func)(request,*view_args,**view_kwargs) File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view 23. return view_func(request, *args, **kwargs) File "/usr/local/www/freenasUI/storage/views.py" in volautoimport 203. form = forms.VolumeAutoImportForm() File "/usr/local/www/freenasUI/storage/forms.py" in __init__ 501. self.fields['volume_disks'].choices = self._populate_disk_choices() File "/usr/local/www/freenasUI/storage/forms.py" in _populate_disk_choices 510. vols = notifier().detect_volumes() File "/usr/local/www/freenasUI/middleware/notifier.py" in detect_volumes 1608. status = res.split('pool: %s\n' % pool)[1].split('pool:')[0] Exception Type: IndexError at /storage/auto-import/ Exception Value: list index out of range

Request information
GET

No GET data
POST

No POST data
FILES

No FILES data
COOKIES
Variable 	Value
csrftoken 	
'7c59405bbc50176be86d7facf2deb958'
sessionid 	
'72bbcdb9897177c24f87d809fd10500d'
mytreeSaveStateCookie 	
'root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11'
META
Variable 	Value
wsgi.multiprocess 	
False
HTTP_REFERER 	
'http://192.168.1.6/'
REDIRECT_STATUS 	
'200'
SERVER_SOFTWARE 	
'lighttpd/1.4.29'
SCRIPT_NAME 	
u''
HTTP_X_CSRFTOKEN 	
'7c59405bbc50176be86d7facf2deb958'
REQUEST_METHOD 	
'GET'
PATH_INFO 	
u'/storage/auto-import/'
SERVER_PROTOCOL 	
'HTTP/1.1'
QUERY_STRING 	
''
HTTP_USER_AGENT 	
'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0'
HTTP_CONNECTION 	
'keep-alive'
HTTP_COOKIE 	
'mytreeSaveStateCookie=root%2C2%2C48%2C55%2C52%2C45%2C57%2C61%2C1%2C11; csrftoken=7c59405bbc50176be86d7facf2deb958; sessionid=72bbcdb9897177c24f87d809fd10500d'
SERVER_NAME 	
'192.168.1.6'
REMOTE_PORT 	
'54891'
wsgi.url_scheme 	
'http'
PATH_TRANSLATED 	
'/usr/local/www/data//storage/auto-import/'
SERVER_PORT 	
'80'
SERVER_ADDR 	
'192.168.1.6'
DOCUMENT_ROOT 	
'/usr/local/www/data/'
HTTP_X_REQUESTED_WITH 	
'XMLHttpRequest'
SCRIPT_FILENAME 	
'/usr/local/www/data/mysite.fcgi'
wsgi.input 	
<flup.server.fcgi_base.InputStream object at 0x806b95b50>
HTTP_HOST 	
'192.168.1.6'
wsgi.multithread 	
True
REQUEST_URI 	
'/storage/auto-import/'
HTTP_ACCEPT 	
'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
wsgi.version 	
(1, 0)
GATEWAY_INTERFACE 	
'CGI/1.1'
wsgi.run_once 	
False
wsgi.errors 	
<flup.server.fcgi_base.TeeOutputStream object at 0x808a26390>
REMOTE_ADDR 	
'192.168.1.5'
HTTP_ACCEPT_LANGUAGE 	
'en-us,en;q=0.5'
REDIRECT_URI 	
'/mysite.fcgi/storage/auto-import/'
CONTENT_TYPE 	
'application/x-www-form-urlencoded'
HTTP_ACCEPT_ENCODING 	
'gzip, deflate'
Settings
Using settings module freenasUI.settings
Setting 	Value
YEAR_MONTH_FORMAT 	
'F Y'
USE_L10N 	
True
USE_THOUSAND_SEPARATOR 	
False
LANGUAGE_CODE 	
'en-us'
ROOT_URLCONF 	
'freenasUI.urls'
MANAGERS 	
(('iXsystems, Inc.', 'freenas@ixsystems.com'),)
DOJANGO_DATAGRID_ACCESS 	
('account', 'system', 'network', 'storage', 'sharing', 'services')
DEFAULT_CHARSET 	
'utf-8'
STATIC_ROOT 	
'/usr/local/www/freenasUI/static'
DOJANGO_DOJO_VERSION 	
'1.6.1'
MESSAGE_STORAGE 	
'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'
DATABASE_HOST 	
''
IGNORABLE_404_STARTS 	
('/cgi-bin/', '/_vti_bin', '/_vti_inf')
SEND_BROKEN_LINK_EMAILS 	
False
URL_VALIDATOR_USER_AGENT 	
'Django/1.3.1 (http://www.djangoproject.com)'
STATICFILES_FINDERS 	
('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder')
SESSION_COOKIE_DOMAIN 	
None
SESSION_COOKIE_NAME 	
'sessionid'
COMMENTS_MODERATORS_GROUP 	
None
TIME_INPUT_FORMATS 	
('%H:%M:%S', '%H:%M', '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S', 'T%H:%M:%S', 'T%H:%M')
DATABASES 	
{'default': {'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': '/data/freenas-v1.db', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': '/usr/local/www/freenasUI/test.db', 'TIME_ZONE': None, 'USER': ''}}
TEST_DATABASE_NAME 	
None
FILE_UPLOAD_PERMISSIONS 	
None
FILE_UPLOAD_HANDLERS 	
('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler')
DEFAULT_CONTENT_TYPE 	
'text/html'
APPEND_SLASH 	
True
FIRST_DAY_OF_WEEK 	
0
DATABASE_ROUTERS 	
[]
DOJANGO_DOJO_PROFILE 	
'local_release'
STATICFILES_STORAGE 	
'django.contrib.staticfiles.storage.StaticFilesStorage'
CACHES 	
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': ''}}
SERVER_EMAIL 	
'root@localhost'
SESSION_COOKIE_PATH 	
'/'
USE_X_FORWARDED_HOST 	
False
IGNORABLE_404_ENDS 	
('mail.pl', 'mailform.pl', 'mail.cgi', 'mailform.cgi', 'favicon.ico', '.php')
MIDDLEWARE_CLASSES 	
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'freenasUI.freeadmin.middleware.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'freenasUI.freeadmin.middleware.RequireLoginMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'dojango.middleware.DojoCollector')
USE_I18N 	
True
THOUSAND_SEPARATOR 	
','
SECRET_KEY 	
'********************'
LANGUAGE_COOKIE_NAME 	
'django_language'
FILE_UPLOAD_TEMP_DIR 	
'/var/tmp/firmware/'
TRANSACTIONS_MANAGED 	
False
LOGGING_CONFIG 	
'django.utils.log.dictConfig'
SESSION_COOKIE_AGE 	
1209600
TEMPLATE_LOADERS 	
('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader')
TEMPLATE_DEBUG 	
False
AUTHENTICATION_BACKENDS 	
('django.contrib.auth.backends.ModelBackend',)
TEST_DATABASE_COLLATION 	
None
FORCE_SCRIPT_NAME 	
''
CACHE_BACKEND 	
'locmem://'
SESSION_COOKIE_SECURE 	
False
CSRF_COOKIE_DOMAIN 	
None
FILE_CHARSET 	
'utf-8'
DEBUG 	
False
SESSION_FILE_PATH 	
None
DEFAULT_FILE_STORAGE 	
'django.core.files.storage.FileSystemStorage'
INSTALLED_APPS 	
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.staticfiles', 'freeadmin', 'south', 'dojango', 'account', 'system', 'network', 'storage', 'sharing', 'services']
LANGUAGES 	
(('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nl', 'Dutch'), ('no', 'Norwegian'), ('nb', 'Norwegian Bokmal'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese'))
DATABASE_ENGINE 	
''
BLACKLIST_NAV 	
('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.staticfiles', 'south', 'dojango', 'freeadmin')
DATABASE_NAME 	
''
COMMENTS_FIRST_FEW 	
0
PREPEND_WWW 	
False
TEST_DATABASE_CHARSET 	
None
SESSION_COOKIE_HTTPONLY 	
False
DATABASE_PORT 	
''
DEBUG_PROPAGATE_EXCEPTIONS 	
False
MONTH_DAY_FORMAT 	
'F j'
LOGIN_URL 	
'/account/login/'
SESSION_EXPIRE_AT_BROWSER_CLOSE 	
False
TIME_FORMAT 	
'P'
DATE_INPUT_FORMATS 	
('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y', '%Y-%m-%dT%H:%M', '%Y-%m-%dT%H:%M:%S')
CSRF_COOKIE_NAME 	
'csrftoken'
EMAIL_HOST_PASSWORD 	
'********************'
PASSWORD_RESET_TIMEOUT_DAYS 	
'********************'
CACHE_MIDDLEWARE_ALIAS 	
'default'
SESSION_SAVE_EVERY_REQUEST 	
False
ADMIN_MEDIA_PREFIX 	
'/static/admin/'
NUMBER_GROUPING 	
0
SESSION_ENGINE 	
'django.contrib.sessions.backends.file'
CSRF_FAILURE_VIEW 	
'django.views.csrf.csrf_failure'
COMMENTS_SKETCHY_USERS_GROUP 	
None
LOGIN_REDIRECT_URL 	
'/'
LOGGING 	
{'disable_existing_loggers': False, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1}
CACHE_MIDDLEWARE_KEY_PREFIX 	
''
LOCALE_PATHS 	
('/usr/local/www/freenasUI/locale',)
HERE 	
'/usr/local/www/freenasUI'
COMMENTS_ALLOW_PROFANITIES 	
False
LOGOUT_URL 	
'/account/logout/'
EMAIL_USE_TLS 	
False
TEMPLATE_DIRS 	
('/usr/local/www/freenasUI/templates',)
FIXTURE_DIRS 	
()
EMAIL_HOST 	
'localhost'
DATE_FORMAT 	
'N j, Y'
MEDIA_ROOT 	
'/usr/local/www/freenasUI/media'
ADMINS 	
(('iXsystems, Inc.', 'freenas@ixsystems.com'),)
FORMAT_MODULE_PATH 	
None
DEFAULT_FROM_EMAIL 	
'webmaster@localhost'
STATICFILES_DIRS 	
('/usr/local/www/freenasUI/media',)
MEDIA_URL 	
'/media/'
DATETIME_FORMAT 	
'N j, Y, P'
EMAIL_SUBJECT_PREFIX 	
'[Django] '
SITE_ID 	
1
DISALLOWED_USER_AGENTS 	
()
ALLOWED_INCLUDE_ROOTS 	
()
DECIMAL_SEPARATOR 	
'.'
SHORT_DATE_FORMAT 	
'm/d/Y'
DATABASE_USER 	
''
TEST_RUNNER 	
'django.test.simple.DjangoTestSuiteRunner'
TIME_ZONE 	
None
FILE_UPLOAD_MAX_MEMORY_SIZE 	
268435456
EMAIL_BACKEND 	
'django.core.mail.backends.smtp.EmailBackend'
DEFAULT_TABLESPACE 	
''
TEMPLATE_CONTEXT_PROCESSORS 	
('django.core.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'dojango.context_processors.config')
DOJANGO_DOJO_DEBUG 	
True
SETTINGS_MODULE 	
'freenasUI.settings'
USE_ETAGS 	
False
LANGUAGES_BIDI 	
('he', 'ar', 'fa')
DEFAULT_INDEX_TABLESPACE 	
''
INTERNAL_IPS 	
()
STATIC_URL 	
'/media/'
EMAIL_PORT 	
25
SHORT_DATETIME_FORMAT 	
'm/d/Y P'
ABSOLUTE_URL_OVERRIDES 	
{}
DATABASE_OPTIONS 	
{}
CACHE_MIDDLEWARE_SECONDS 	
600
BANNED_IPS 	
()
TEMPLATE_STRING_IF_INVALID 	
''
DATETIME_INPUT_FORMATS 	
('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M', '%m/%d/%y')
DATABASE_PASSWORD 	
'********************'
ADMIN_FOR 	
()
PROFANITIES_LIST 	
'********************'
EMAIL_HOST_USER 	
''
COMMENTS_BANNED_USERS_GROUP 	
None

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
What VERSION of FreeNAS are you running?

From an SSH session, as root, what is the output of:
Code:
zpool status -v

camcontrol devlist

gpart show


Do me a favor and throw [code] [/code] tags around the output. It will keep the formatting.
 

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
Thanks for the quick reply.

Whoops, I knew I was missing something. It's currently on FreeNAS-8.0.3-RELEASE-x64. I tried FreeNAS-8.0.4-RELEASE-p3-x64 earlier, but nothing changed between the two. I can't remember what version it was on before it crashed, but I think it was a prerelease version of 8.0.3.

zpool status -v
Code:
 No Pools Available
zpool import -f adds it to this list, but comes up with a failed to mount error.

camcontrol devlist
Code:
<WDC WD2EARX-00ZVDB0 80.00A80> at scbus2 target 0 lun 0 (ada0, pass0)
<WDC WD15EADS-00R8B0 01.00A01> at scbus4 target 0 lun 0 (ada1, pass1)
<LITE-ON DVDRW SOHW-1693S KS02> at scbus5 target 0 lun 0 (cd0 pass2)
<TOSHIBA Transmemory 5.00> at scbus6 target 0 lun 0 (da0 pass3)
<Multi Flash Reader 1.00> at scbus7 target 0 lun 0 (da1, pass4)
Crap at the end is from the days when this was my main computer. Too lazy to remove them.

gpart show (too much to type out)

https://dl.dropbox.com/u/7913409/IMG_20120617_000643.jpg
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
It's currently on FreeNAS-8.0.3-RELEASE-x64. I tried FreeNAS-8.0.4-RELEASE-p3-x64 earlier
Let's work from FreeNAS-8.0.4-RELEASE-p3-x64 from this point.

zpool status -v
Code:
 No Pools Available
Wrong command. It should be:
Code:
zpool import
That's what I get for copy/pasting.

zpool import -f adds it to this list, but comes up with a failed to mount error.
And we will need to see this as well.

gpart show (too much to type out)
Which is why I wanted you run it from an SSH session. It makes things much easier.
 

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
Well...I tried to look up how to get it working. I got the client to connect after enabling the SSH service, but no idea how to give it commands.
I'll try again when I wake up tomorrow, but until then:

zpool import
Code:
pool:WD1.5TB
id:13884691955919240954
state:ONLINE
action:The pool can be imported using its name or numeric identifier.
config:

         WD1.5TB     Online
            ada1p2   Online

pool:WD2TB
id:6855110416080880868
state:ONLINE
action:The pool can be imported using its name or numeric identifier.
config:

         WD2TB       Online
            ada0p2   Online


zpool import -f WD2TB
Code:
cannot mount '/WD2TB': failed to create mountpoint


zpool status
Code:
pool: WD2TB
state: ONLINE
scrub: none requested
config:
          NAME          STATE     READ WRITE CKSUM
          WD2TB        ONLINE      0     0     0
            ada0p      ONLINE      0     0     0

errors: No known data errors


zpool list
Code:
NAME     SIZE   USED   AVAIL   CAP   HEALTH   ALTROOT
WD2TB   1.81T   773G   1.06T   41%   ONLINE    - 


I stopped panicking after using the list command earlier today. I assume it means the data's safe.
 

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
Okay, I've gotten an SSH Session started (Easier than I thought!)

gpart show
Code:
/$ gpart show
=>     63  3914631  da0  MBR  (1.9G)
       63  1930257    1  freebsd  [active]  (943M)
  1930320       63       - free -  (32K)
  1930383  1930257    2  freebsd  (943M)
  3860640     3024    3  freebsd  (1.5M)
  3863664    41328    4  freebsd  (20M)
  3904992     9702       - free -  (4.7M)

=>      0  1930257  da0s1  BSD  (943M)
        0       16         - free -  (8.0K)
       16  1930241      1  !0  (943M)

=>        34  3907029101  ada0  GPT  (1.8T)
          34          94        - free -  (47K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  3902834703     2  freebsd-zfs  (1.8T)

=>        34  2930277101  ada1  GPT  (1.4T)
          34          94        - free -  (47K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  2926082703     2  freebsd-zfs  (1.4T)


Is there any more information needed to work out what the problem is?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
I'm not sure what your problem is, besides running single disk zpools. Once you get them mounted you should copy the data off, destroy the 2 separate pools and mirror those 2 drives together until you can pick up 2 more.

First from an SSH session, as root, export the pools:
Code:
zpool export WD2TB
zpool export WD1.5TB


Next run the following:
Code:
mount -uw /

mkdir /mnt/WD2TB
mkdir /mnt/WD1.5TB

zpool import WD2TB
zpool import WD1.5TB

mount -ro /
I'm not sure if the pools will still be automatically mounted on reboot though.
 

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
Thanks

/mount -ro / gives
Code:
 /mount: Command not found.


Going back to the gui, Auto-Import no longer gives an error, but neither drives are showing up there.

Yeah, mirroring the drives was the original plan, but then the HDD shortage hit. Decided to wait it out.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
/mount -ro /
Well, the command is:
Code:
mount -ro /
No leading /.

Going back to the gui, Auto-Import no longer gives an error, but neither drives are showing up there.
Yes, it wouldn't as you are back on 8.04 track. Did the pools import successfully? Do you see your files/folders:
Code:
ls -al /mnt/WD2TB
ls -al /mnt/WD1.5TB


I would export only pool WD2TB and try to auto-import from the GUI. If it works then repeat with your other pool.
Code:
zpool export WD2TB
 

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
Now this is strange. Just as you said, I managed to get WD2TB working after importing, exporting and then auto-importing from the gui.

So then I tried to do it with WD1.5TB, but I get stuck with the "Sorry, an error occurred" message from before. I tried it once more from the top.

mount -uw /
mkdir /mnt/WD1.5TB
Code:
mkdir: /mnt/WD1.5TB: File exists
Guess that makes sense, since I created it the first time.
zpool import WD1.5TB
mount -ro /

At this point, ls -al /mnt/WD1.5TB gives:
Code:
drwxr-xr-x  2 root wheel  512 Jun 18 02:09.
rwxr-xr-x  5 root wheel  512 Jun 18 02:09..


ls -al /WD1.5TB gives a list of my files.

So next I zpool export WD1.5TB
And then I click auto-import on the gui, but it doesn't work.
 

borkborkbork

Cadet
Joined
Jun 16, 2012
Messages
8
Well, I've just scrubbed, restarted and tried again, but it still won't auto-import.

Should I give the long version of the error statement?
 
Status
Not open for further replies.
Top