# gpart + geli(aesni) + zfs + iscsi + hypervisor



## josiaslg (Jun 10, 2020)

Hi for all.
I'm doing tests where the objective is simple:
ZFS + iSCSI as storage for hypervisor.
Reading the official FreeBSD documentation on ZFS (https://www.freebsd.org/doc/handbook/zfs-advanced.html) is said:
"the smaller 512-byte block size might be preferable. When used with 512-byte disks for databases, or as storage for virtual machines, less data is transferred during small random reads. This can provide better performance, especially when using a smaller ZFS record size "
When I run the command `gpart add -t freebsd-zfs da0`, do these 512 come by default or should they be specified?
About Geli, `geli init -s 512 -K /root/xxx.key /dev/da0p1` is the correct blocksize for the 512 allocated by gpart?
When creating ZFS (zpool create xxxxxx xxxxx xxxxxx) how would recordsize and blocksize look? I read about ashift = 9, but it was unclear for me his relationship to these two items.
On /etc/ctl.conf, I added the parameter blocksize 512. For better performance I need to keep the same size of zfs blocksize / recordsize and iSCSI in line?
ISCSI is aimed at using files in RAW format.
The guest operating system when formatting such "disks", must obey these 512 also in the logical size without 4k alignment for better performance?

HD SSD data I use:
diskinfo
 512 # sectorsize
4096 # stripesize
SAMSUNG P043S7T6 EMC7680

Best Regards.


----------

