Is there a way to configure my ignition file such that CoreOS will mount an existing filesystem on a disk without erasing/recreating it? I currently have this in my ignition:
Note: I am not including a ‘disks’ configuration in my ignition.
But I am seeing the contents of /var/mountpoint reset each time I reboot (I am PXE booting CoreOS, but /dev/sda is a permanent disk attached to the VM).
Hmm, is it possible that the filesystem is just not getting mounted at all in the real root and you’re seeing the freshly created /var contents?
Maybe double-check your mount unit (or if you don’t have one, with_mount_unit: true will add one for you). And sanity-check that in the booted system findmnt shows that the filesystem was mounted.
I think you are right. The filesystem does not appear to be getting mounted. I suppose I should be seeing a /var/mountpoint with /dev/sda2 as the source in the findmnt output, but I don’t.