"geli detach: no such device" while trying to remove geli encryption.

sfree

Cadet
Joined
Oct 29, 2021
Messages
3
Hey there,
I followed this tutorial to remove geli encryption without loosing data:

I offlined the first disk:
Code:
# zpool offline Pool gptid/065b559b-be09-11ea-b38f-18c04d247f65.eli

# zpool status
  pool: Pool
 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: scrub repaired 0B in 01:51:47 with 0 errors on Sun Oct  3 01:51:48 2021
config:

        NAME                                                STATE     READ WRITE CKSUM
        Pool                                                DEGRADED     0     0     0
          raidz1-0                                          DEGRADED     0     0     0
            gptid/065b559b-be09-11ea-b38f-18c04d247f65.eli  OFFLINE      0     0     0
            gptid/066adfad-be09-11ea-b38f-18c04d247f65.eli  ONLINE       0     0     0
            gptid/073591f6-be09-11ea-b38f-18c04d247f65.eli  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 00:00:51 with 0 errors on Mon Oct 25 03:45:51 2021
config:

        NAME          STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          ada3p2      ONLINE       0     0     0

errors: No known data errors

And now when I try to remove the geli encryption:
Code:
# geli detach gptid/065b559b-be09-11ea-b38f-18c04d247f65.eli
geli: No such device: gptid/065b559b-be09-11ea-b38f-18c04d247f65.eli.

I am a little bit lost what to do now because the device is clearly there.
Any help would be appreciated. Thanks in advance!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If it's offline, just wipe that disk then add it back to the pool (replacing itself) and it will be non-encrypted.
 

sfree

Cadet
Joined
Oct 29, 2021
Messages
3
Problem is that I want to try the removal of the encryption without losing data. I am afraid that the others disks will also not decrypted correctly so i will lose all the data. Is there another possibility?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You need to remove the encryption by resilvering the data to each disk one at a time.

You can't just "remove" encryption from a drive without rewriting all the data back to it unencrypted.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
@sretalla, I've run this procedure on my pool, and it does work to remove encryption one drive at a time. @sfree, if the geli detach gave that message, it's likely already detached. What does geli list show?
 

sfree

Cadet
Joined
Oct 29, 2021
Messages
3
@Samuel Tai You are right the drive does not show up in the geli list command. What is the next step now?
Thanks already for your help!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try gpart list to check if the partition with that gptid still exists. It should still be there, but stranger things have happened. If it's still there, then go to the next step in @Patrick M. Hausen's procedure.
 

markgca

Dabbler
Joined
Nov 7, 2019
Messages
46
did you ever get this worked out? i am having the exact problem on 12.0-U8
 
Top