Project

General

Profile

Bug #72761

Fix offline and online operations for encrypted disks

Added by Robert Peters almost 3 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Vladimir Vinogradenko
Category:
Middleware
Target version:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Steps to reproduce using the new web interface:

  1. Setup 4 drives in an encrypted raidz2 storage pool
  2. Storage > Pool > Pool Operations (Gear) > Status > Offline any of the disks
  3. Storage > Pool > Pool Operations (Gear) > Status > Online the offlined disk

Results in:

Error: Traceback (most recent call last):

  File "/usr/local/lib/python3.6/site-packages/tastypie/resources.py", line 219, in wrapper
    response = callback(request, *args, **kwargs)

  File "./freenasUI/api/resources.py", line 886, in online_disk
    notifier().zfs_online_disk(obj, deserialized.get('label'))

  File "./freenasUI/middleware/notifier.py", line 1064, in zfs_online_disk
    assert volume.vol_encrypt == 0

AssertionError

The pool status in the shell looks like:

root@freenas[~]# zpool status storage
  pool: storage
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Online the device using 'zpool online' or replace the device with
        'zpool replace'.
  scan: resilvered 37.8M in 0 days 00:00:39 with 0 errors on Wed Jan 30 00:23:55 2019
config:

        NAME                                                STATE     READ WRITE CKSUM
        storage                                             DEGRADED     0     0     0
          raidz2-0                                          DEGRADED     0     0     0
            gptid/7afeb39f-1e8f-11e9-9423-080027323634.eli  ONLINE       0     0     0
            12034077341320501396                            OFFLINE      0     0     0  was /dev/gptid/d41df718-241c-11e9-8b42-080027323634.eli
            gptid/1351f31c-1fdd-11e9-a5f1-080027323634.eli  ONLINE       0     0     0
            gptid/7ce8fda5-1e8f-11e9-9423-080027323634.eli  ONLINE       0     0     0

errors: No known data errors

When running zpool online storage 12034077341320501396 in the shell, the device is online again.

My original post in forums.freenas.org: https://forums.freenas.org/index.php?threads/offline-online-of-encrypted-disk-does-not-work.73340/#post-508290

History

#1 Updated by Dru Lavigne almost 3 years ago

  • Private changed from No to Yes
  • Reason for Blocked set to Need additional information from Author

Robert: please reproduce then attach a debug (System -> Advanced -> Save debug) to this ticket.

#2 Updated by Robert Peters almost 3 years ago

  • File debug-freenas-20190130183733.tgz added

Reproduced and debug log attatched.

#3 Updated by Dru Lavigne almost 3 years ago

  • Category changed from GUI (new) to Middleware
  • Assignee changed from Release Council to Vladimir Vinogradenko
  • Reason for Blocked deleted (Need additional information from Author)

#4 Updated by Robert Peters almost 3 years ago

Looks like there is one /dev/ added where it already was there.

/var/log/debug.log

Jan 30 18:37:15 freenas uwsgi: [middleware.notifier:178] Popen()ing: /sbin/zpool offline storage /dev/gptid/157b7104-247e-11e9-9f0d-080027323634.eli
Jan 30 18:37:16 freenas uwsgi: [middleware.notifier:131] Executing: /sbin/geli detach /dev//dev/gptid/157b7104-247e-11e9-9f0d-080027323634.eli
Jan 30 18:37:16 freenas uwsgi: [middleware.notifier:152] Executed: /sbin/geli detach /dev//dev/gptid/157b7104-247e-11e9-9f0d-080027323634.eli -> 1

#5 Updated by Bug Clerk almost 3 years ago

  • Status changed from Unscreened to In Progress

#6 Updated by Vladimir Vinogradenko almost 3 years ago

Note to Dru: 11.3 fix not needed, this has been rewritten and is functioning properly

Robert, thank you for your report. Problem will be fixed in 11.2-U3. However, you still won't be able to online disk in encrypted pool, you'll just get more clear error message. This is not supported yet even in 11.3.

Acceptance Criteria

With described pool configuration, offlining one of the disks of encrypted pool using New UI should be done completely: offlined disk should not be visible in geli status

Attempt to bring this disk back online should result in "Disk cannot be set to online in encrypted pool." error message.

#7 Updated by Robert Peters almost 3 years ago

May I add some questions for clearance?

Just so that I understand completely: When using encrypted pools, drives may only be replaced by new ones. It is not possible to offline a drive and put it back in (for whatever reason).
Is that an ZFS issue or related to the FreeNAS interface? If it is UI related, is there some documentation how the command line can be used to recover from such scenarios?

While quickly searching though the documentation, I found no note about being unable to online an offlined drive. I think I was also unable to wipe it which should have enabled me to "replace" it.
Can test it again tuesday and file another ticket if it don't work and you don't mind. That would be the only way to make the drive usable again if I am correct.

#8 Updated by Dru Lavigne almost 3 years ago

  • Target version changed from Backlog to 11.2-U3

#9 Updated by Bug Clerk almost 3 years ago

  • Status changed from In Progress to Ready for Testing

#10 Updated by Dru Lavigne almost 3 years ago

  • File deleted (debug-freenas-20190130183733.tgz)

#11 Updated by Dru Lavigne almost 3 years ago

  • Subject changed from OFFLINE, ONLINE of encrypted disk does not work to Fix offline and online operations for encrypted disks
  • Private changed from Yes to No
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#13 Updated by Bonnie Follweiler over 2 years ago

60294

Test Passed inFreeNAS-11.2-U2-INTERNAL97

#14 Updated by Dru Lavigne over 2 years ago

  • Status changed from Passed Testing to Done
  • Needs QA changed from Yes to No

Also available in: Atom PDF