HI,
I’m working on a diskless solution, booting and loading ign file via pxe.
I run podman containers at startup and the show is going on !
I store datas in /var mounted on 2 1to hdd with raid1 written in fcc/ign file as :
storage:
raid:
- name: Raid
level: raid1
devices:
- /dev/disk/by-id/ata-WDC_WD10SPZX-80Z10T2_WD-WX41A49H9FT4
- /dev/disk/by-id/ata-WDC_WD10SPZX-80Z10T2_WD-WXL1A49KPYFD
options:
- --config=/etc/mdadm.conf
filesystems:
- path: /var
device: /dev/md/Raid
format: xfs
label: Var
wipe_filesystem: false
with_mount_unit: true
files:
- path: /etc/mdadm.conf
mode: 0644
contents:
inline: |
ARRAY /dev/md/Raid metadata=1.2 name=any:Raid UUID=7ec8d4df:823fae52:c55d5e56:e773b281
Everything works fine except that my raid is rebuilt/resync with a new UUID at every boot even if I give coreos a mdadm.conf file …
How could I prevent raid resync on each boot ?
Perhaps a fcc/ign option like “should_exist” will make boot process looking for existing raid before creating one or will need a mdadm.conf file ?
As a workaround, I’ve added some options : (same uuid as in mdadm.conf)
raid:
- name: Raid
level: raid1
devices:
- /dev/disk/by-id/ata-WDC_WD10SPZX-80Z10T2_WD-WX41A49H9FT4
- /dev/disk/by-id/ata-WDC_WD10SPZX-80Z10T2_WD-WXL1A49KPYFD
options:
- --config=/etc/mdadm.conf
- --assume-clean
- --uuid=7ec8d4df:823fae52:c55d5e56:e773b281
But I’m looking for a better way to do it …