Project

General

Profile

Bug #808

cannot import zpool

Added by rolnas - almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Important
Assignee:
William Grzybowski
Category:
GUI (new)
Target version:
-
Seen in:
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

I have zpool created on Solaris 10. I can import it from CLI, but not from GUI.

  1. zpool import
    pool: bigpool
    id: 10737902602686969331
    state: ONLINE
    action: The pool can be imported using its name or numeric identifier.
    config:

    bigpool ONLINE
    raidz1 ONLINE
    gptid/499946c6-3652-1269-9d04-fe26be6ee9 ONLINE
    gptid/c363d696-6bd0-4648-ac6d-ed523259f9 ONLINE
    gptid/6c275e84-62f1-736a-bf34-decfdef6aa ONLINE
    gptid/af835f0a-0cfa-f749-c992-b6957b4a4e ONLINE
    gptid/dc59133c-6845-7a6d-de0b-89f5207f31 ONLINE
    gptid/91ca0aef-eb39-5bef-90f9-e254b31072 ONLINE
    gptid/0e806be6-e389-7f69-efc3-9108a1b811 ONLINE

Traceback from GUI (partial):
...

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
202. form = forms.VolumeAutoImportForm()
File "/usr/local/www/freenasUI/storage/forms.py" in init
484. self.fields['volume_disks'].choices = self._populate_disk_choices()
File "/usr/local/www/freenasUI/storage/forms.py" in _populate_disk_choices
493. vols = notifier().detect_volumes()
File "/usr/local/www/freenasUI/middleware/notifier.py" in detect_volumes
1406. roots = zfs.parse_status(pool, doc, status)
File "/usr/local/www/freenasUI/middleware/zfs.py" in parse_status
259. pool.validate()
File "/usr/local/www/freenasUI/middleware/zfs.py" in validate
54. getattr(self, key).validate()
File "/usr/local/www/freenasUI/middleware/zfs.py" in validate
148. c.validate()
File "/usr/local/www/freenasUI/middleware/zfs.py" in validate
169. c.validate()
File "/usr/local/www/freenasUI/middleware/zfs.py" in validate
208. raise Exception("It should be a valid device: %s" % self.name)

Exception Type: Exception at /storage/auto-import/
Exception Value: It should be a valid device: gptid/499946c6-3652-1269-9d04-fe26be6ee9
...

History

#1 Updated by William Grzybowski almost 8 years ago

That is a pretty weird error...

Could you please paste the output of "glabel status", did you try importing it again after a reboot?

#2 Updated by rolnas - almost 8 years ago

No difference after reboot.

  1. glabel status
    Name Status Components
    ufs/FreeNASs3 N/A da0s3
    ufs/FreeNASs4 N/A da0s4
    gptid/499946c6-3652-1269-9d04-fe26be6ee92a N/A ada1p1
    gptid/69ec7cb5-1519-a54e-b22a-d6561cd91a1e N/A ada1p9
    gptid/c363d696-6bd0-4648-ac6d-ed523259f924 N/A ada2p1
    gptid/de162b05-74c7-d8eb-b6a9-85d8e70646f5 N/A ada2p9
    gptid/6c275e84-62f1-736a-bf34-decfdef6aa2f N/A ada3p1
    gptid/a1914590-572c-fb44-fd17-dd2d707f61e5 N/A ada3p9
    gptid/af835f0a-0cfa-f749-c992-b6957b4a4e36 N/A ada4p1
    gptid/b25ddb8a-5ca1-6049-c595-b68af356cbc6 N/A ada4p9
    gptid/dc59133c-6845-7a6d-de0b-89f5207f3124 N/A ada5p1
    gptid/16061707-2f4e-fccf-dc7b-94e791fc4cbd N/A ada5p9
    gptid/91ca0aef-eb39-5bef-90f9-e254b31072d4 N/A ada6p1
    gptid/eeb772c7-bd8c-004b-df6f-a79d418a1e3e N/A ada6p9
    gptid/0e806be6-e389-7f69-efc3-9108a1b8119d N/A ada7p1
    gptid/782e5b74-26c5-7a64-abe9-fa3ad24e45d4 N/A ada7p9
    ufs/FreeNASs1a N/A da0s1a

#3 Updated by William Grzybowski almost 8 years ago

I'm not exactly sure why you zpool import output is stripping the last 2 digits from the labels... perhaps it is because the pool was created on solaris, I cannot reproduce this issue...

#4 Updated by rolnas - almost 8 years ago

I did testing on RC2 with the same results.

Probably the problem is in "zpool import" command output.
It cuts characters after some length (probably it is zfs tools on freebsd bug).
That would mean, we cannot trust directly the output of "zpool import" to determinate devices in zpool.
I'll try to hack "zpool import" show correctly all characters in device names :-)

#5 Updated by rolnas - almost 8 years ago

I think I found a bug in freebsd code of zfs.
In zpool_vdev_name there is line
tmp[strlen(path) - 2] = '\0';
in case ZPOOL_CONFIG_WHOLE_DISK.
It looks in my case it cuts the last two characters from device name gptid/XXX.

#6 Updated by William Grzybowski almost 8 years ago

Hello,

Yes, you're right. delphij looked at this and confirmed this is a bug that has already been fixed in freebsd zfs v28. A patch has been applied (r7970) to fix this issue and should be available in the next release (8.0.1).

Thanks.

Also available in: Atom PDF