>>>>> On Mon, 1 Jul 2019 14:40:51 +0100, Jerry Steele <[email protected]>
>>>>> said:
> If FAI is run against this machine again after its 1st install, I get the
following error:
> (STDERR) mdadm: Cannot get exclusive access to /dev/md1:Perhaps a running
process, mounted filesystem or active volume group?
> Command had non-zero exit code
> It's enough to do:
> # vgremove -y vg_system
> ...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?
You can write a simple hook, which is then executed before
task_partition. Therefore, create a shell script hooks/partition.DEFAULT
--
regards Thomas