Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

How to remove encryption from a ZFS volume (while keeping the data)

ovizii

FreeNAS Experienced
Joined
Jun 30, 2014
Messages
428
I'm on 11.1 and need to decrypt an entire pool. Can anyone confirm that this procedure still the most uptodate?
 

sotiris.bos

Newbie
Joined
Jun 12, 2018
Messages
37
I'm on 11.1 and need to decrypt an entire pool. Can anyone confirm that this procedure still the most uptodate?
Did you proceed with removing the encryption on your drives?

I am on 11.2-U6 and want to do the same.
 

Patrick M. Hausen

FreeNAS Guru
Joined
Nov 25, 2013
Messages
526
Looks like the structure in the sqlite database is still the same:
Code:
root@freenas-pmh[~]# /usr/local/bin/sqlite3 /data/freenas-v1.db ".schema storage_encrypteddisk"
CREATE TABLE IF NOT EXISTS "storage_encrypteddisk" ("id" integer PRIMARY KEY, "encrypted_volume_id" integer NOT NULL, "encrypted_disk_id" varchar(100) NULL, "encrypted_provider" varchar(120) NOT NULL UNIQUE);

So yes, it should work.

Proceed with caution ;)
Patrick
 

sotiris.bos

Newbie
Joined
Jun 12, 2018
Messages
37
Looks like the structure in the sqlite database is still the same:
Code:
root@freenas-pmh[~]# /usr/local/bin/sqlite3 /data/freenas-v1.db ".schema storage_encrypteddisk"
CREATE TABLE IF NOT EXISTS "storage_encrypteddisk" ("id" integer PRIMARY KEY, "encrypted_volume_id" integer NOT NULL, "encrypted_disk_id" varchar(100) NULL, "encrypted_provider" varchar(120) NOT NULL UNIQUE);

So yes, it should work.

Proceed with caution ;)
Patrick
Thank you so much for your contribution Patrick!

No I did not. I postponed until Xmas time as I'll have plenty of time to do this properly without any time pressure.
Thank you for your reply! I am in the process of backing up critical datasets on my encrypted pool to a second one and once that is done, I will start the procedure of removing the encryption, probably some time today. I will report back with my results!




Edit: Everything went perfectly! (11.2-U6) The only thing I did differently than the guide was to remove the sqlite database entries at the end, rather than after replacing each disk. It took me 2 days to resilver all four 10TB drives. My setup is a stripe of two mirrors, each mirror consisting of two 10TB drives, at 62% capacity. I started with disk1 on mirror1, after completing I started disk1 on mirror2 and after that completed I did both disk2 mirror1 and disk2 mirror2 almost at the same time to save some time. I could have gotten it done in one day instead (or around 30 hours) but decided to not stress the drives that much.

Again, thank you @ovizii !
 
Last edited:

ovizii

FreeNAS Experienced
Joined
Jun 30, 2014
Messages
428
Just followed the same procedure very successfully on 11.1-U7 if I' not mistaken.
 
Top