I changed that in /usr/lib/python3/dist-packages/cloudinit/config/cc_mounts.py and rebooted twice, once to write the new fstab, then the second reboot actually reformats:
paulmey@testvm3:~$ mount|grep sdb ; grep mnt /etc/fstab
/dev/sdb1 on /mnt type ext4 (rw,relatime,data=ordered)
/dev/disk/cloud/azure_resource-part1 /mnt auto defaults,nofail,x-systemd.requires=cloud-config.service,comment=cloudconfig 0 2
I think the only thing that needs to change is to require cloud-config.service instead of cloud-init.service ?
Turns out it's cloud-config. service (not cloud-init.service) that does the mkfs:
paulmey@testvm3:~$ journalctl -b -ojson|jq 'select( .MESSAGE| contains( "mkfs") )|._SYSTEMD_ UNIT' config. service" config. service" config. service" config. service" config. service"
"cloud-
"cloud-
"cloud-
"cloud-
"cloud-
I changed that in /usr/lib/ python3/ dist-packages/ cloudinit/ config/ cc_mounts. py and rebooted twice, once to write the new fstab, then the second reboot actually reformats:
paulmey@testvm3:~$ mount|grep sdb ; grep mnt /etc/fstab data=ordered) cloud/azure_ resource- part1 /mnt auto defaults, nofail, x-systemd. requires= cloud-config. service, comment= cloudconfig 0 2
/dev/sdb1 on /mnt type ext4 (rw,relatime,
/dev/disk/
I think the only thing that needs to change is to require cloud-config. service instead of cloud-init.service ?