From cf03cc054728260bedf8a78df0cc5531504b50be Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 3 Oct 2022 11:49:27 +0200 Subject: [PATCH] copr-be: scan raid10 if the fs is not found --- roles/copr/backend/tasks/mount_fs.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/copr/backend/tasks/mount_fs.yml b/roles/copr/backend/tasks/mount_fs.yml index bae3d9c9c2..0613194296 100644 --- a/roles/copr/backend/tasks/mount_fs.yml +++ b/roles/copr/backend/tasks/mount_fs.yml @@ -26,6 +26,14 @@ stat: path=/dev/disk/by-label/copr-repo-raid10 register: stat_repo_fs + - name: scan the raid volumes + when: not stat_repo_fs.stat.exists + shell: mdadm --assemble --scan && sleep 5 + + - name: stat the ext4 filesystem + stat: path=/dev/disk/by-label/copr-repo-raid10 + register: stat_repo_fs + - name: fail if ext4 filesystem is not found by devmapper debug: msg=checked failed_when: not stat_repo_fs.stat.exists