Hi everyone,
I'm new to FreeBSD and currently practicing GELI encryption with simple ZFS Pool creation and rebuild processes. I’m seeking advice for a pool I will create later.
I’ve come across different setup variants during my research. I understand there's no one "correct" method as each approach serves its own purpose, but I’d like to understand the reasons behind these methods to decide what’s best for my situation.
From forum posts, it seems common to: Initialize the disk with a GPT table -> Create a ZFS partition -> Encrypt the partition.
For ZFS Partition Creation, I’ve seen various alignment options:
I understand that 4K alignment helps with disk read/write performance, but I'm unsure about the importance of the boundary settings.
For GELI Encryption, I've come across different arguments such as sector size, key files, data key length, boot process passphrase prompts, and checksums:
I’d like to understand why the decrypted sector size is set to 4096 bytes when the disk is 512e (emulates 8 logical sectors). The key file can be used for automated processes, but some think it is unnecessary. I also found passphrase file arguments in the man page, but I don't know their purpose.
Besides, the FreeBSD handbook introduce the full disk encryption, which means the partition table is also encrypted:
It's curious that only a few posts mention full disk encryption. Is there a risk that the disk could be seen as RAW, and a partition table might be written on top, potentially ruining all data?
Any insights, advice, or experiences you can share would be greatly appreciated. Thank you in advance for your help!
I'm new to FreeBSD and currently practicing GELI encryption with simple ZFS Pool creation and rebuild processes. I’m seeking advice for a pool I will create later.
I’ve come across different setup variants during my research. I understand there's no one "correct" method as each approach serves its own purpose, but I’d like to understand the reasons behind these methods to decide what’s best for my situation.
From forum posts, it seems common to: Initialize the disk with a GPT table -> Create a ZFS partition -> Encrypt the partition.
For ZFS Partition Creation, I’ve seen various alignment options:
Code:
gpart create -s gpt da2
gpart add -t freebsd-zfs da2
gpart add -t freebsd-zfs -a 4k -b 1M da2
gpart add -t freebsd-zfs -a 4k da2
gpart add -t freebsd-zfs -a 1m da2
I understand that 4K alignment helps with disk read/write performance, but I'm unsure about the importance of the boundary settings.
For GELI Encryption, I've come across different arguments such as sector size, key files, data key length, boot process passphrase prompts, and checksums:
Code:
geli init -l 256 -s 4096 da2p1
geli init -l 256 -s 4096 -e aes -a hmac/sha256
dd if=/dev/random of=/root/da2.key bs=64 count=1
geli init -l 256 -b -K /root/da2.key da2p1
I’d like to understand why the decrypted sector size is set to 4096 bytes when the disk is 512e (emulates 8 logical sectors). The key file can be used for automated processes, but some think it is unnecessary. I also found passphrase file arguments in the man page, but I don't know their purpose.
Besides, the FreeBSD handbook introduce the full disk encryption, which means the partition table is also encrypted:
Code:
geli init -l 256 -s 4096 -b da2
geli attach da2
gpart create -s gpt da2.eli
gpart add -t freebsd-zfs -a 4K -b 1M da2.eli
zpool create zpool2 /dev/da2.elip1
It's curious that only a few posts mention full disk encryption. Is there a risk that the disk could be seen as RAW, and a partition table might be written on top, potentially ruining all data?
Any insights, advice, or experiences you can share would be greatly appreciated. Thank you in advance for your help!