summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/mapped-devices.scm8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/system/mapped-devices.scm b/gnu/system/mapped-devices.scm
index 2a0706e50b..ce0a78a2ad 100644
--- a/gnu/system/mapped-devices.scm
+++ b/gnu/system/mapped-devices.scm
@@ -135,12 +135,16 @@ TARGET (e.g., \"/dev/md0\"), using 'mdadm'."
       (use-modules (srfi srfi-1) (ice-9 format))
 
       (let ((sources '#$sources))
-        (let loop ()
+        (let loop ((attempts 0))
           (unless (every file-exists? sources)
+            (when (> attempts 20)
+              (error "RAID devices did not show up; bailing out"
+                     sources))
+
             (format #t "waiting for RAID source devices~{ ~a~}...~%"
                     sources)
             (sleep 1)
-            (loop)))
+            (loop (+ 1 attempts))))
 
         (zero? (system* (string-append #$mdadm "/sbin/mdadm")
                         "--assemble" #$target sources)))))