This will want to run fsck on the device, and then mount it, and all *before* local-fs.target
cloud-init cannot run until *after* local-fs.target is reached. Asking fsck service to run later is always going to be in-conflict with fsck+mount from the generator.
I'm not sure we can reliably interrupt these services; the .mount unit is going to require a fsck; if we stop the fsck, then the mount won't happen.
This is going to require some more thought and discussion.
As far as I can tell, I don't think we can "delay" the fsck service due to how the systemd- fstab-generator works on /etc/fstab entries
For entries with a no-zero value for fsck (6th column), then the generator will write out a .mount file that looks like this:
ubuntu@ ubuntu: /run/systemd/ generator$ cat btrfs.mount fstab-generator
# Automatically generated by systemd-
[Unit] /etc/fstab man:fstab( 5) man:systemd- fstab-generator (8) local-fs. target systemd- fsck@dev- disk-by\ x2duuid- d8e33db0\ x2d9a54\ x2d11e7\ x2dbd8f\ x2d525400123456 .service fsck@dev- disk-by\ x2duuid- d8e33db0\ x2d9a54\ x2d11e7\ x2dbd8f\ x2d525400123456 .service
SourcePath=
Documentation=
Before=
Requires=
After=systemd-
[Mount] disk/by- uuid/d8e33db0- 9a54-11e7- bd8f-5254001234 56
What=/dev/
Where=/btrfs
Type=btrfs
This will want to run fsck on the device, and then mount it, and all *before* local-fs.target
cloud-init cannot run until *after* local-fs.target is reached. Asking fsck service to run later is always going to be in-conflict with fsck+mount from the generator.
I'm not sure we can reliably interrupt these services; the .mount unit is going to require a fsck; if we stop the fsck, then the mount won't happen.
This is going to require some more thought and discussion.