<div dir="ltr">This is my disk_config:<div><br></div><div>disk_config disk1<br>primary - 350 - - <br>primary swap 2G swap sw,pri=1<br>primary - 0- - - <br><br>disk_config disk2 sameas:disk1<br><br>disk_config raid fstabkey:uuid<br>raid1 /boot disk1.1,disk2.1 ext4 rw,noatime,errors=remount-ro<br>raid1 - disk1.3,disk2.3 - - <br><br>disk_config lvm fstabkey:uuid<br>vg vg_system md1 <br>vg_system-root / 8G ext4 rw,noatime<br>vg_system-var /var 8G- ext4 rw,noatime<br></div><div><br></div><div>If FAI is run against this machine again after its 1st install, I get the following error:</div><div><br clear="all"><div>Using config file: /var/lib/fai/config/disk_config/LVMRAID1<br>  WARNING: Failed to connect to lvmetad. Falling back to device scanning.<br>    Creating directory "/run/lock/lvm"<br>    No volume groups found.<br>Executing: mdadm --stop --scan<br>Executing: mdadm --assemble --scan --config=/tmp/fai/mdadm-from-examine.conf<br>Executing: mdadm -W --stop /dev/md0<br>Executing: mdadm -W --stop /dev/md1<br>(STDERR) mdadm: Cannot get exclusive access to /dev/md1:Perhaps a running process, mounted filesystem or active volume group?<br>Command had non-zero exit code<br></div><div><br></div><div>It's enough to do:</div><div><br></div><div># vgremove -y  vg_system</div><div><br></div><div>...which removes the LVM metadata and on the next install, FAI is able to partition the disks as needed. Is there a way to run this command before the disk_config stuff is run? Obviously the custom scripts are run well after this point. Or is there something built into FAI to completely wipe LVM data before attempting to wipe the MD devices?</div><div><br></div><div>Thanks in advance</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">---<br><br>Jerry Steele<br>Telephone: +44 (0)<span>7492 910225</span><br></div><div>GPG: 43A3A8C6</div><div dir="ltr"><br></div></div></div></div></div></div></div></div></div></div></div></div>