Custom mkfs options for block_device formatting

How do you create a filesystem in MAAS with custom mkfs options? We have needs that require specific filesystem configurations to get around other limitations within MAAS where you cannot specify an EXACT KERNEL VERSION to boot in the new machine, only the general terms of “generic” and “hwe-”. Our environment and SOC2 policies dictate strictness and I need to put in piles of workarounds to get around these limitations of maas, which causes things like an unmountable XFS filesystem, because the ephemeral image uses options default to its much newer version of mkfs.xfs (5.3.x) that the final bootup kernel (4.4.x) cannot handle resulting in a broken machine.

curtin docs show it’s possible, but I am not finding a way to do it in the MAAS API, and digging through the python-libmaas code SEEMS like the format function can handle additional arguments but they are dropped.

async def format(self, fstype, *, uuid=None):
    """Format this block device."""
        await self._handler.format(
            system_id=self.node.system_id,, fstype=fstype, uuid=uuid


The extra_options key is a list of strings that is appended to the mkfs command used to create the filesystem. Use of this setting is dangerous. Some flags may cause an error during creation of a filesystem.

I am interested in this option, as it is currently not possible to deploy CentOS 7 using XFS due to this problem.