They warned about encryption bs implementation...

dastisnas

Cadet
Joined
Feb 15, 2020
Messages
9
I was researching options for zfs encryption since I was buying a bunch of used hdd to expand storage and since some going to be DOA I wanted to encrypt data for returns. And then I saw a post somewhere how flawed design decisions for using disk transparent encryption with using zfs on top of it.

Well, I've tested it myself, unfortunately :(
The maintainers went the extra mile to warn about looking passphrase and restore key. And then casually mention about disk specific master keys - don't worry about those because looking that key is equivalent of losing a disk and zfs would tolerate with redundant arrays.

What they didn't mention that the master key is unique for each disk AND it's stored in the last sector of the disk. Now, the original software that handles all this encryption has sane default settings: it _backups up_ the master key when the disk encryption is initialized. Because this key is part of the disk itself and accessible there. So why not store it as duplicated just in case, right?!

And developers of geli software had good reasons to provide master keys backups by default. Why? Because they made their own strange design choices - the key is stored in the last sector of "provider". And that last sector is quite popular among other utilities that like to mess with the disk partition table, raid configs etc. I found somebody complained about gpart on FreeBSD mailing list, that gpart label would overwrite it.

There is also a piece of crap called MegaCli that bit me: its PDMakeJBOD command overwrites the last sector with zeroes.

But what I don't get, why developers disabled backup of keys?! ('-B None' option) https://github.com/freenas/freenas/...wared/plugins/disk_/encryption_freebsd.py#L62
 
Joined
Jan 18, 2017
Messages
525
Wait isn't MegaCli only for MegaRAID cards? I didn't think that functioned on their HBA's.
 
Joined
Jan 18, 2017
Messages
525
I was under the impression the MegaCli tool would produce an error on none MegaRAID cards (I could be mistaken) what controller were you using on your encrypted array? and what version of FreeNAS?
 

dastisnas

Cadet
Joined
Feb 15, 2020
Messages
9
I was under the impression the MegaCli tool would produce an error on none MegaRAID cards (I could be mistaken) what controller were you using on your encrypted array? and what version of FreeNAS?

11.2-U7

I made a mistake of using this piece of megacli crap because I bought megaraid card - they all looked the same to me on ebay (there is no curated list of recommended hardware). Anyways, the card worked just fine - if not this encryption "feature" I decided to use.

The developers of this appliance really made sure encrypted encryption keys have no backup anywhere...
 

Redcoat

MVP
Joined
Feb 18, 2014
Messages
2,925

dastisnas

Cadet
Joined
Feb 15, 2020
Messages
9
See post #27 here: https://www.ixsystems.com/community/threads/freenas-hardware-guide-up-to-date.80891/page-2 for 2 lists of recommended cards that pass as "curated lists" in my book.

“Ideally, the chosen hardware RAID card supports HBA mode, also known as “passthrough” or “JBOD” mode, which will allow it to perform indistinguishably from a standard HBA.” - this is abstracted details that FreeNAS software shouldn’t be concerned about.

The whole issue here is that they disabled default behavior of encryption software to backup master keys.
 
Top