Re: problem with mdadm FAI 6.2

2024-04-26 Diskussionsfäden Thomas Lange
First, check if /dev/md1 is already mounted.
Maybe the FAI boot process (using dracut inside the initrd) detect
this raid and activates it.

You may add a hook which wipes add signature of a soft raid using a
simple script. For e.g. under https://fai-project.org/download/misc/
there are partition.WIPEDISKS and wipe-all

These can also remove the disk partition label.
-- 
regards Thomas


problem with mdadm FAI 6.2

2024-04-26 Diskussionsfäden pa...@kish.by
Hello,

If in a server we have software raid mdadm, and we will try to reinstall this 
server we have error



dmesg.log:[0.240851] acpi PNP0A03:00: fail to add MMCONFIG information, 
can't access extended PCI configuration space under this bridge.
fai.log:/usr/bin/fai-class: WARNING. Following classes are defined multiple 
times:   2 d30180
fai.log:(STDERR)   Can't open /dev/md1 exclusively.  Mounted filesystem?
fai.log:(STDERR)   Can't open /dev/md1 exclusively.  Mounted filesystem?
fai.log:(STDERR)   Error opening device /dev/md1 for reading at 0 length 512.
fai.log:(STDERR)   Can't open /dev/md1 exclusively.  Mounted filesystem?
fai.log:(STDERR)   Error opening device /dev/md1 for reading at 0 length 4096.
fai.log:Error in task partition. Code: 710
fai.log:Traceback: task_error task_partition main
format.log:(STDERR)   Can't open /dev/md1 exclusively.  Mounted filesystem?
format.log:(STDERR)   Can't open /dev/md1 exclusively.  Mounted filesystem?
format.log:(STDERR)   Error opening device /dev/md1 for reading at 0 length 512.
format.log:(STDERR)   Can't open /dev/md1 exclusively.  Mounted filesystem?
format.log:(STDERR)   Error opening device /dev/md1 for reading at 0 length 
4096.
variables.log:task_local_error=0


for example disk-config

disk_config sda disklabel:gpt-bios
primary -   1024-   -
primary swap16384swapsw
primary -   0-  -   -

disk_config sdb disklabel:gpt-bios
primary -   1024-   -
primary swap16384swapsw
primary -   0-  -   -

disk_config raid fstabkey:uuid
raid1   /boot   sda1,sdb1   ext2rw,noatime,nodiratime   
mdcreateopts="--metadata=0.9"
raid1   -   sda3,sdb3   -   -

disk_config lvm fstabkey:uuid
vg store md1
store-root  /   0-  ext4noatime,nodiratime




as i understand setup-storage cannot remove old disk_partition table