Comment 21 for bug 1611074

Revision history for this message
Paul Meyer (paul-meyer) wrote :

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'
"cloud-config.service"
"cloud-config.service"
"cloud-config.service"
"cloud-config.service"
"cloud-config.service"

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 ?