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:
- path: /var/mountpoint
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
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.
TARGET SOURCE FSTYPE OPTIONS
│ squashfs ro,relatime,seclabel
├─/var tmpfs[/var] tmpfs rw,relatime,seclabel,mode=700
├─/boot /dev/loop0[/boot] squashfs ro,relatime,seclabel
with_mount_unit? I don’t see that option covered in the FCCT specification documentation https://docs.fedoraproject.org/en-US/fedora-coreos/fcct-config/.
with_mount_unit: true causes the filesystem to mount. Thank you!