Is there an existing issue for this?
What are you currently unable to do
When using Incus with a LINSTOR storage backend where LINSTOR itself uses ZFS as the underlying storage pool (e.g., with volblocksize=16K), it is often necessary to tune the filesystem creation parameters to align I/O with the underlying backend's block size.
For example, with a ZFS volblocksize of 16 KiB, one would want to create ext4 filesystems with:
mkfs.ext4 -b 4096 -E stripe-width=4,stride=4 <device>
This ensures that ext4's internal I/O patterns align with the ZFS block boundaries, avoiding read-modify-write amplification and improving performance.
LINSTOR natively supports filesystem configuration via:
linstor resource-group set-property default FileSystem/Type ext4
linstor resource-group set-property default FileSystem/MkfsParams "-b 4096 -E stripe-width=4,stride=4"
However, Incus does not delegate filesystem creation to LINSTOR. Instead, it invokes makeFSType() (utils.go) directly to format the block device after it is allocated. As a result, any FileSystem/MkfsParams configuration set on the LINSTOR resource group is completely ignored by Incus.
The makeFSType function currently only accepts a Label via its mkfsOptions struct and hard-codes ext4 extra options (-E nodiscard,lazy_itable_init=0,lazy_journal_init=0), providing no way to pass additional user-defined parameters.
What do you think would need to be added
Add a new block.mkfs_options configuration key to the LINSTOR driver, mirroring the pattern already used by block.filesystem and block.mount_options.
And I am glad to submit a PR implementing this change if possible.
Is there an existing issue for this?
What are you currently unable to do
When using Incus with a LINSTOR storage backend where LINSTOR itself uses ZFS as the underlying storage pool (e.g., with
volblocksize=16K), it is often necessary to tune the filesystem creation parameters to align I/O with the underlying backend's block size.For example, with a ZFS
volblocksizeof 16 KiB, one would want to create ext4 filesystems with:This ensures that ext4's internal I/O patterns align with the ZFS block boundaries, avoiding read-modify-write amplification and improving performance.
LINSTOR natively supports filesystem configuration via:
However, Incus does not delegate filesystem creation to LINSTOR. Instead, it invokes
makeFSType()(utils.go) directly to format the block device after it is allocated. As a result, anyFileSystem/MkfsParamsconfiguration set on the LINSTOR resource group is completely ignored by Incus.The
makeFSTypefunction currently only accepts aLabelvia itsmkfsOptionsstruct and hard-codes ext4 extra options (-E nodiscard,lazy_itable_init=0,lazy_journal_init=0), providing no way to pass additional user-defined parameters.What do you think would need to be added
Add a new
block.mkfs_optionsconfiguration key to the LINSTOR driver, mirroring the pattern already used byblock.filesystemandblock.mount_options.And I am glad to submit a PR implementing this change if possible.