View previous topic :: View next topic |
Author |
Message |
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Fri Jun 21, 2019 9:03 pm Post subject: Enable ZFS encrytption on existing dataset [solved - RTFM] |
|
|
Hi all -
I just read about ZFS Encryption and decided to enable it in my current pool. Obviously, that just allows me to create new data sets with encryption. So far just trying to do zfs set encryption=-on <dataset> tells me encryption is read only. Is there a way to enable it on an existing dataset? Or do I need to create a new encrypted dataset and migrate it? Everything I have read would indicate that is the case, but before I go and try to figure that out, I wanted to verify that was indeed what needs to be done.
Thanks!
Last edited by tenspd1370 on Mon Jun 24, 2019 3:03 pm; edited 1 time in total |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3494
|
Posted: Fri Jun 21, 2019 10:36 pm Post subject: |
|
|
Encryption can only be applied when writing data, so it makes a lot of sense to only allow when you're creating a new data set (which is guaranteed to be empty at this point - e.g. no plain data has been written).
Now, it it was possible to enable encryption on an existing dataset and "convert" it in the background, how would you track encryption progress and how would you ensure the plain data is removed from your disks?
I'd say you should actually start with a new hard drive, shred it properly, and then create a whole new zpool there. And after you copy your data over to an encrypted set, shred the disks you're using right now. |
|
Back to top |
|
|
mrbassie l33t
Joined: 31 May 2013 Posts: 833 Location: Go past the sign for cope, right at the sign for seethe. If you see the target you've missed it.
|
Posted: Mon Jun 24, 2019 10:21 am Post subject: Re: Enable ZFS encrytption on existing dataset |
|
|
tenspd1370 wrote: | Or do I need to create a new encrypted dataset and migrate it?
Thanks! |
From the manpage:
Code: | encryption=off|on|aes-128-ccm|aes-192-ccm|aes-256-ccm|aes-128-gcm|aes-192-gcm|aes-256-gcm
Controls the encryption cipher suite (block cipher, key length, and mode) used for this dataset. Requires the encryption feature to be enabled
on the pool. Requires a keyformat to be set at dataset creation time. |
|
|
Back to top |
|
|
tenspd1370 Tux's lil' helper
Joined: 14 Dec 2017 Posts: 124
|
Posted: Mon Jun 24, 2019 3:03 pm Post subject: |
|
|
Thanks all. I missed this part:
Code: |
...
Requires a keyformat to be set at dataset creation time.
|
|
|
Back to top |
|
|
|