Forcing the creation of the lvs is required otherwise we are facing this issue:
[root@eko5 ~]# systemctl status create-lvs-for-lso.service
● create-lvs-for-lso.service - Create LVS partitions for LSO
Loaded: loaded (/etc/systemd/system/create-lvs-for-lso.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-08-25 08:46:24 UTC; 3s ago
Process: 539949 ExecStart=/bin/bash -c /usr/local/bin/create-lvs-for-lso.sh sdb 10 20 (code=exited, status=5)
Main PID: 539949 (code=exited, status=5)
CPU: 636ms
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com bash[539949]: Aborting. Failed to wipe start of new LV.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com bash[539949]: WARNING: xfs signature detected on /dev/autopart/lv_1 at offset 0. Wipe it? [y/n]: [n]
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com bash[539949]: Aborted wiping of xfs.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com bash[539949]: 1 existing signature left on the device.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com bash[539949]: Failed to wipe signatures on logical volume autopart/lv_1.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com bash[539949]: Aborting. Failed to wipe start of new LV.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com systemd[1]: create-lvs-for-lso.service: Main process exited, code=exited, status=5/NOTINSTALLED
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com systemd[1]: create-lvs-for-lso.service: Failed with result 'exit-code'.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com systemd[1]: Failed to start Create LVS partitions for LSO.
Aug 25 08:46:24 eko5.cnf20.cloud.lab.eng.bos.redhat.com systemd[1]: create-lvs-for-lso.service: Consumed 636ms CPU time
Forcing the creation of the lvs is required otherwise we are facing this issue:
This is basically the change (-y):
Signed-off-by: Alberto Losada alosadag@redhat.com