Hello,
Finally, after 10,000 years, I’m getting ready to actually try experimenting with zVols and iSCSI shares.
I’m a bit confused about how the zVol Block Size and iSCSI Extent Block Size, and how they fit together.
I’m using TrueNAS for this. The defaults I’m talking about are the TrueNAS defaults. I don’t know if bare bones ZFS on Linux would have different defaults.
Here’s what I think is true:
- zVol Block Size in the TrueNAS zVol Creation Widget: This is
volblocksize
in ZFS. - Extent Block Size in the iSCSI Share Wizard: This is the LBA size/logical sector size that the iSCSI block device will present itself as when an initiator connects to it.
Is that correct?
If so, I don’t quite understand when/why I’d want the zVol and the extent to have different block sizes. Isn’t ZFS at its best when I/O fits the volblocksize
(or, I suppose, recordsize
when working with datasets) to minimize write amplification?
I feel pretty confident with 1-3 in the example below, but things start going fuzzy around 4.
Example: An iSCSI block device configured for use as a storage disk in Windows 11.
- Windows 11 uses NTFS.
- NTFS has a default sector size/LBA of 4K.
- So, the
extent block size
should be 4K to match NTFS’s expectations. In the TrueNAS iSCSI Block Device share wizard, this is the “modern OS” preset’sextent block size
. - On a system using mirrors,
volblocksize
/“Block Size” in the TrueNAS zVol creation window defaults to16k
. I think this is just the default ZFS volblocksize for mirrors, and isn’t anything special TrueNAS is doing? - So … how do I reconcile those?
5.1. Is there some reason a zVol intended to be storage for an iSCSI extent with block size 4k shouldn’t also have a 4kvolblocksize
?
5.2. If there is, there is a hole in my understanding. What am I missing?
Thanks!