• Currently using VMware at work? We want to hear from you.

    Thinking of making a switch from VMware? We'd love to hear your thoughts and feedback about which hypervisor you have been researching or already using. Click here to vote and share your thoughts! You can vote HERE!

problem on mounting the existing ufs filesystem.

Status
Not open for further replies.

masterpc

Dabbler
Joined
Sep 12, 2011
Messages
17
Hello,
I upgraded freenas to 8.0.2-Release today.

The existing freenas was installed on ada0 which is a small SSD drive.
I put the 8G usb stick and installed the newest freenas on it, /dev/da0. (fresh install)

Once, the boot partition was changed, the backup config file didn't work on the usb stick.
Therefore, I decided to set up the freenas again.

I have one RAIDZ1 partition and one UFS partition.
When I tried to Auto Import, I could see and import ZFS partition successfully.
However, there is not way to import the existing UFS filesystem into freenas.
The existing UFS filesystem is not showing up on Auto Import.
Moreover, if I click on Import Volume, I get the error, "Sorry, an error occurred."

I tried to mount the UFS partition in console, it works fine.
I typed "mount /dev/ada4p2 /mnt/temp", and then the UFS partition was mounted correctly.

How can I import the existing UFS partition on freenas?
I cannot mount the UFS partition every time I boot. :(


Any advice would be appreciated.

Thank you.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
This seems like a bug. I think when you put the USB drive in the devices names shifted around and the database thinks your UFS drive is where your USB drive is. Did you try to import your UFS disk AFTER you restored your settings, or just after you did a clean install without restoring anything?

If you didn't try that, do a clean install and then try the Import Volume your UFS disk first.
 

masterpc

Dabbler
Joined
Sep 12, 2011
Messages
17
I agree that the shift of devices causes the problem.

So, I did a clean install without restoring anything.
Auto Import works great on the ZFS; however, it cannot find the UFS partition.
Also, when I clicked on Import Volume, "Sorry, an error occurred." was popped up.

I would like to know what exact errors were occurred when I clicked Import Volume.
Is there any way to get the detail error message?

I don't know why Import Volume doesn't work on a clean install.


Thank you.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I would like to know what exact errors were occurred when I clicked Import Volume.
Is there any way to get the detail error message?

That is a very good question and I would like to know the answer myself. The same thing happens when trying to Import NTFS & MSDOSFS and there are no details as to what is occurring! I am also able to mount from the command line. I didn't realize this was also a problem for UFS since I have never tried to import a UFS volume.

I'm going to move this thread over to the Bug Reporting area because I think there something going on here.
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,740
I agree that the shift of devices causes the problem.

So, I did a clean install without restoring anything.
Auto Import works great on the ZFS; however, it cannot find the UFS partition.
Also, when I clicked on Import Volume, "Sorry, an error occurred." was popped up.

I would like to know what exact errors were occurred when I clicked Import Volume.
Is there any way to get the detail error message?

I don't know why Import Volume doesn't work on a clean install.


Thank you.

Settings->Advanced -> Show traceback errors
 

masterpc

Dabbler
Joined
Sep 12, 2011
Messages
17
Thank you for replies.

Here are exception details when I click on Import Volume.
Please let me know if there is anything I can try.

--------------------------------------------
ValueError at /storage/import/

invalid literal for float(): 0.1a
Request Method: GET
Request URL: https://192.168.1.1:8181/storage/import/
Django Version: 1.3.1
Exception Type: ValueError
Exception Value:
invalid literal for float(): 0.1a
Exception Location: /usr/local/www/freenasUI/storage/forms.py in <lambda>, line 441
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-STABLE-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: Fri, 14 Oct 2011 13:33:31 -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 0x804d2a510>>'
self
u'<django.core.handlers.wsgi.WSGIHandler object at 0x804d1b310>'
settings
u'<django.conf.LazySettings object at 0x8021a5410>'
request
u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'__utma': '132462155.10415900.1316747961.1316756378.1317931864.3',\n '__utmz': '132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'csrftoken': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'mytreeSaveStateCookie': 'root%2C48%2C12%2C41',\n 'sessionid': '90c3132d8ca7e48b9f180f9fd39299a4'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTPS': 'on',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C48%2C12%2C41; sessionid=90c3132d8ca7e48b9f180f9fd39299a4; csrftoken=ed0412e11db045bbbe9ed797911ff5bf; __utma=132462155.10415900.1316747961.1316756378.1317931864.3; __utmz=132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'HTTP_HOST': '192.168.1.1:8181',\n 'HTTP_REFERER': 'https://192.168.1.1:8181/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22',\n 'HTTP_X_CSRFTOKEN': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/import/',\n 'REMOTE_ADDR': '38.98.0.125',\n 'REMOTE_PORT': '52810',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.150',\n 'SERVER_NAME': '192.168.1.1',\n 'SERVER_PORT': '8181',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x80a2cc450>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x80779d590>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'https',\n 'wsgi.version': (1, 0)}>'
callback
u'<function volimport at 0x8072b3e60>'
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 0x804d2a510>'
request
u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'__utma': '132462155.10415900.1316747961.1316756378.1317931864.3',\n '__utmz': '132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'csrftoken': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'mytreeSaveStateCookie': 'root%2C48%2C12%2C41',\n 'sessionid': '90c3132d8ca7e48b9f180f9fd39299a4'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTPS': 'on',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C48%2C12%2C41; sessionid=90c3132d8ca7e48b9f180f9fd39299a4; csrftoken=ed0412e11db045bbbe9ed797911ff5bf; __utma=132462155.10415900.1316747961.1316756378.1317931864.3; __utmz=132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'HTTP_HOST': '192.168.1.1:8181',\n 'HTTP_REFERER': 'https://192.168.1.1:8181/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22',\n 'HTTP_X_CSRFTOKEN': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/import/',\n 'REMOTE_ADDR': '38.98.0.125',\n 'REMOTE_PORT': '52810',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.150',\n 'SERVER_NAME': '192.168.1.1',\n 'SERVER_PORT': '8181',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x80a2cc450>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x80779d590>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'https',\n 'wsgi.version': (1, 0)}>'
view_func
u'<function volimport at 0x8072b3e60>'
/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 0x80a2db230>'
login_url
u'None'
args
u'()'
request
u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'__utma': '132462155.10415900.1316747961.1316756378.1317931864.3',\n '__utmz': '132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'csrftoken': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'mytreeSaveStateCookie': 'root%2C48%2C12%2C41',\n 'sessionid': '90c3132d8ca7e48b9f180f9fd39299a4'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTPS': 'on',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C48%2C12%2C41; sessionid=90c3132d8ca7e48b9f180f9fd39299a4; csrftoken=ed0412e11db045bbbe9ed797911ff5bf; __utma=132462155.10415900.1316747961.1316756378.1317931864.3; __utmz=132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'HTTP_HOST': '192.168.1.1:8181',\n 'HTTP_REFERER': 'https://192.168.1.1:8181/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22',\n 'HTTP_X_CSRFTOKEN': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/import/',\n 'REMOTE_ADDR': '38.98.0.125',\n 'REMOTE_PORT': '52810',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.150',\n 'SERVER_NAME': '192.168.1.1',\n 'SERVER_PORT': '8181',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x80a2cc450>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x80779d590>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'https',\n 'wsgi.version': (1, 0)}>'
kwargs
u'{}'
redirect_field_name
u''next''
view_func
u'<function volimport at 0x8072b3e60>'
/usr/local/www/freenasUI/storage/views.py in volimport
else:
if 'volume_disks' in request.POST:
disks = request.POST.getlist('volume_disks')
else:
disks = None
else:
form = forms.VolumeImportForm() ...
disks = []
return render(request, 'storage/import.html', {
'form': form,
'disks': disks
})
▶ Local vars
Variable Value
request
u'<WSGIRequest\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'__utma': '132462155.10415900.1316747961.1316756378.1317931864.3',\n '__utmz': '132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'csrftoken': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'mytreeSaveStateCookie': 'root%2C48%2C12%2C41',\n 'sessionid': '90c3132d8ca7e48b9f180f9fd39299a4'},\nMETA:{'CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'DOCUMENT_ROOT': '/usr/local/www/data/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTPS': 'on',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',\n 'HTTP_ACCEPT_LANGUAGE': 'en-us',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'mytreeSaveStateCookie=root%2C48%2C12%2C41; sessionid=90c3132d8ca7e48b9f180f9fd39299a4; csrftoken=ed0412e11db045bbbe9ed797911ff5bf; __utma=132462155.10415900.1316747961.1316756378.1317931864.3; __utmz=132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',\n 'HTTP_HOST': '192.168.1.1:8181',\n 'HTTP_REFERER': 'https://192.168.1.1:8181/',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22',\n 'HTTP_X_CSRFTOKEN': 'ed0412e11db045bbbe9ed797911ff5bf',\n 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',\n 'PATH_INFO': u'/storage/import/',\n 'PATH_TRANSLATED': '/usr/local/www/data//storage/import/',\n 'QUERY_STRING': '',\n 'REDIRECT_STATUS': '200',\n 'REDIRECT_URI': '/mysite.fcgi/storage/import/',\n 'REMOTE_ADDR': '38.98.0.125',\n 'REMOTE_PORT': '52810',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_URI': '/storage/import/',\n 'SCRIPT_FILENAME': '/usr/local/www/data/mysite.fcgi',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.1.150',\n 'SERVER_NAME': '192.168.1.1',\n 'SERVER_PORT': '8181',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'lighttpd/1.4.29',\n 'wsgi.errors': <flup.server.fcgi_base.TeeOutputStream object at 0x80a2cc450>,\n 'wsgi.input': <flup.server.fcgi_base.InputStream object at 0x80779d590>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'https',\n 'wsgi.version': (1, 0)}>'
/usr/local/www/freenasUI/storage/forms.py in __init__
volume_name = forms.CharField(max_length = 30, label = _('Volume name') )
volume_disks = forms.ChoiceField(choices=(), widget=forms.Select(attrs=attrs_dict), label = _('Member disk'))
volume_fstype = forms.ChoiceField(choices = ((x, x) for x in ('UFS', 'NTFS', 'MSDOSFS', 'EXT2FS')), widget=forms.RadioSelect(attrs=attrs_dict), label = 'File System type')
def __init__(self, *args, **kwargs):
super(VolumeImportForm, self).__init__(*args, **kwargs)
self.fields['volume_disks'].choices = self._populate_disk_choices() ...
self.fields['volume_disks'].choices.sort(key = lambda a : float(re.sub(r'^.*?([0-9]+)[^0-9]*', r'\1.',a[0])))
def _populate_disk_choices(self):
diskchoices = dict()
n = notifier()
▶ Local vars
Variable Value
self
u'<freenasUI.storage.forms.VolumeImportForm object at 0x80a2cc290>'
args
u'()'
kwargs
u'{}'
/usr/local/www/freenasUI/storage/forms.py in _populate_disk_choices
rootdev_base = re.search('[a-z/]*[0-9]*', rootdev)
if rootdev_base != None:
for part in diskchoices.keys():
if part.startswith(rootdev_base.group(0)):
del diskchoices[part]
choices = diskchoices.items()
choices.sort(key = lambda a : float(re.sub(r'^.*?([0-9]+)[^0-9]*', r'\1.',a[0]))) ...
return choices
def clean(self):
cleaned_data = self.cleaned_data
volume_name = cleaned_data.get("volume_name")
if models.Volume.objects.filter(vol_name = volume_name).count() > 0:
▶ Local vars
Variable Value
used_disks
u'['ada1', 'ada2', 'ada3']'
capacity
u''21.2 MB''
diskchoices
u'{'ada0s1a': 'ada0s1a (988.3 MB)',\n 'ada0s2': 'ada0s2 (988.3 MB)',\n 'ada0s3': 'ada0s3 (1.5 MB)',\n 'ada0s4': 'ada0s4 (21.2 MB)',\n 'ada4p1': 'ada4p1 (2.1 GB)',\n 'ada4p2': 'ada4p2 (998.1 GB)'}'
i
u''ada3''
self
u'<freenasUI.storage.forms.VolumeImportForm object at 0x80a2cc290>'
devname
u''ada0s4''
parts
u'{'/dev/ada0s1a': {'capacity': '988283392', 'devname': 'ada0s1a'},\n '/dev/ada0s2': {'capacity': '988291584', 'devname': 'ada0s2'},\n '/dev/ada0s3': {'capacity': '1548288', 'devname': 'ada0s3'},\n '/dev/ada0s4': {'capacity': '21159936', 'devname': 'ada0s4'},\n '/dev/ada4p1': {'capacity': '2147483648', 'devname': 'ada4p1'},\n '/dev/ada4p2': {'capacity': '998057319936', 'devname': 'ada4p2'},\n '/dev/da0s1a': {'capacity': '988283392', 'devname': 'da0s1a'},\n '/dev/da0s2': {'capacity': '988291584', 'devname': 'da0s2'},\n '/dev/da0s3': {'capacity': '1548288', 'devname': 'da0s3'},\n '/dev/da0s4': {'capacity': '21159936', 'devname': 'da0s4'}}'
choices
u'[('ada4p2', 'ada4p2 (998.1 GB)'),\n ('ada4p1', 'ada4p1 (2.1 GB)'),\n ('ada0s3', 'ada0s3 (1.5 MB)'),\n ('ada0s2', 'ada0s2 (988.3 MB)'),\n ('ada0s4', 'ada0s4 (21.2 MB)'),\n ('ada0s1a', 'ada0s1a (988.3 MB)')]'
rootdev
u''da0s1a''
part
u''da0s1a''
n
u'<freenasUI.middleware.notifier.notifier instance at 0x80a2d7200>'
rootdev_base
u'<_sre.SRE_Match object at 0x8072282a0>'
/usr/local/www/freenasUI/storage/forms.py in <lambda>
rootdev_base = re.search('[a-z/]*[0-9]*', rootdev)
if rootdev_base != None:
for part in diskchoices.keys():
if part.startswith(rootdev_base.group(0)):
del diskchoices[part]
choices = diskchoices.items()
choices.sort(key = lambda a : float(re.sub(r'^.*?([0-9]+)[^0-9]*', r'\1.',a[0]))) ...
return choices
def clean(self):
cleaned_data = self.cleaned_data
volume_name = cleaned_data.get("volume_name")
if models.Volume.objects.filter(vol_name = volume_name).count() > 0:
▶ Local vars
Variable Value
a
u'('ada0s1a', 'ada0s1a (988.3 MB)')'



Request information

GET

No GET data
POST

No POST data
FILES

No FILES data
COOKIES

Variable Value
csrftoken
'ed0412e11db045bbbe9ed797911ff5bf'
__utma
'132462155.10415900.1316747961.1316756378.1317931864.3'
sessionid
'90c3132d8ca7e48b9f180f9fd39299a4'
mytreeSaveStateCookie
'root%2C48%2C12%2C41'
__utmz
'132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)'
META

Variable Value
wsgi.multiprocess
False
HTTP_REFERER
'https://192.168.1.1:8181/'
REDIRECT_STATUS
'200'
SERVER_SOFTWARE
'lighttpd/1.4.29'
SCRIPT_NAME
u''
HTTP_X_CSRFTOKEN
'ed0412e11db045bbbe9ed797911ff5bf'
REQUEST_METHOD
'GET'
PATH_INFO
u'/storage/import/'
SERVER_PROTOCOL
'HTTP/1.1'
QUERY_STRING
''
HTTP_USER_AGENT
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22'
HTTP_CONNECTION
'keep-alive'
HTTP_COOKIE
'mytreeSaveStateCookie=root%2C48%2C12%2C41; sessionid=90c3132d8ca7e48b9f180f9fd39299a4; csrftoken=ed0412e11db045bbbe9ed797911ff5bf; __utma=132462155.10415900.1316747961.1316756378.1317931864.3; __utmz=132462155.1316747961.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)'
SERVER_NAME
'192.168.1.1'
REMOTE_PORT
'52810'
wsgi.url_scheme
'https'
PATH_TRANSLATED
'/usr/local/www/data//storage/import/'
SERVER_PORT
'8181'
SERVER_ADDR
'192.168.1.150'
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 0x80779d590>
HTTP_HOST
'192.168.1.1:8181'
HTTPS
'on'
wsgi.multithread
True
REQUEST_URI
'/storage/import/'
HTTP_ACCEPT
'*/*'
wsgi.version
(1, 0)
GATEWAY_INTERFACE
'CGI/1.1'
wsgi.run_once
False
wsgi.errors
<flup.server.fcgi_base.TeeOutputStream object at 0x80a2cc450>
REMOTE_ADDR
'38.98.0.125'
HTTP_ACCEPT_LANGUAGE
'en-us'
REDIRECT_URI
'/mysite.fcgi/storage/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
 

masterpc

Dabbler
Joined
Sep 12, 2011
Messages
17
Hello,

I'm not familiar with python and django; however, I tried to figure out what's wrong with Import Volume since I'm also a programmer.
I opened the file, /usr/local/www/freenasUI/storage/forms.py, and looked at the line 441.
I found that there is a sorting function that causes this problem.

For some reasons, there is a character that cannot be casting to float.
To me, it's more important to mount the UFS filesystem rather than sorting volumes. :)
So, I put # in front of 441 line, but django seems to be cached or something like that.

Is there any way to refresh django?
I killed the python process and ran it again, but it didn't work.

Thank you.
 

masterpc

Dabbler
Joined
Sep 12, 2011
Messages
17
I commented out two lines in /usr/local/www/freenasUI/storage/forms.py.
Import Volume works fine, and I successfully imported the existing UFS partition. :)

The commented lines are marked as ##.

class VolumeImportForm(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'))
volume_fstype = forms.ChoiceField(choices = ((x, x) for x in ('UFS', 'NTFS', 'MSDOSFS', 'EXT2FS')), widget=forms.RadioSelect(attrs=attrs_dict), label = 'File System type')

def __init__(self, *args, **kwargs):
super(VolumeImportForm, self).__init__(*args, **kwargs)
self.fields['volume_disks'].choices = self._populate_disk_choices()
## self.fields['volume_disks'].choices.sort(key = lambda a : float(re.sub(r'^.*?([0-9]+)[^0-9]*', r'\1.',a[0])))

def _populate_disk_choices(self):

diskchoices = dict()
n = notifier()
used_disks = [n.identifier_to_device(i[0]) for i in models.Disk.objects.all().values_list('disk_identifier').distinct()]
# HACK: identifier_to_device can return None. Let's not blow up below
# when testing the string with startswith.
used_disks = filter(None, used_disks)

# Grab partition list
# NOTE: This approach may fail if device nodes are not accessible.
parts = n.get_partitions()

for part in parts.keys():
if len([i for i in used_disks if parts[part]['devname'].startswith(i)]) > 0:
del parts[part]

for part in parts:
devname, capacity = parts[part]['devname'], parts[part]['capacity']
capacity = humanize_number_si(capacity)
diskchoices[devname] = "%s (%s)" % (devname, capacity)
# Exclude the root device
rootdev = popen("""glabel status | grep `mount | awk '$3 == "/" {print $1}' | sed -e 's/\/dev\///'` | awk '{print $3}'""").read().strip()
rootdev_base = re.search('[a-z/]*[0-9]*', rootdev)
if rootdev_base != None:
for part in diskchoices.keys():
if part.startswith(rootdev_base.group(0)):
del diskchoices[part]

choices = diskchoices.items()
## choices.sort(key = lambda a : float(re.sub(r'^.*?([0-9]+)[^0-9]*', r'\1.',a[0])))
 

reality

Cadet
Joined
Jul 18, 2013
Messages
2
I've got the same problem. I can't edit forms.py is readonly even with w! wq!. How did you kill phyton process?
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
mount -uw / - This will make your USB stick writable.
Edit your file.. save the changes.
mount -ur / - This will make your USB stick read only again.
reboot and your settings are now permanent.
 

reality

Cadet
Joined
Jul 18, 2013
Messages
2
I don't have USB stick I've migrated VM to onother storage one of the vdmk file (vitual disk) was unable to import... (UFS volume) da1.

Once again this is not a memory stick...
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It's best not to be resurrecting a thread that is almost 2 years old. Not to mention their issue doesn't seem to be related to yours at all except that they couldn't find UFS...

Make sure to start your own thread if you need help.

You should read http://forums.freenas.org/threads/p...duction-as-a-virtual-machine.12484/#post58364. You shouldn't expect much support with issues involving recovering data on VMs. The added complexity of running in a VM makes troubleshooting as well as identifying and correcting the issue very difficult. Nevermind the added problems with getting help on a forum. We can't really help with your issue because of the complexity virtualizing brings.

And lastly, please read the forum rules. They provide a list of stuff you should include when asking for help.

Sorry to be the bearer of bad news, but that's the truth.
 
Status
Not open for further replies.
Top