guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/07: tests: install: "raid-root-os" test uses RAID-1 instead of RAID-0


From: guix-commits
Subject: 02/07: tests: install: "raid-root-os" test uses RAID-1 instead of RAID-0.
Date: Sun, 19 Jan 2020 17:12:11 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 3adf320e44e54017a67f219ce9667a379c393dad
Author: Ludovic Courtès <address@hidden>
AuthorDate: Sun Jan 19 15:18:25 2020 +0100

    tests: install: "raid-root-os" test uses RAID-1 instead of RAID-0.
    
    Fixes <https://bugs.gnu.org/38086>.
    Thanks to Vagrant and Tobias!
    
    * gnu/tests/install.scm (%raid-root-os)[initrd-modules]: Add "raid1"
    instead of "raid0".
    (%raid-root-installation-script): Make the partitions twice as big.
    Invoke 'mdadm' with '--level=mirror' instead of '--level=stripe';
    connect "yes" to its stdin.
    (%test-raid-root-os): Set #:target-size to 2.8 GiB.
---
 gnu/tests/install.scm | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/gnu/tests/install.scm b/gnu/tests/install.scm
index 8842d48..d475bda 100644
--- a/gnu/tests/install.scm
+++ b/gnu/tests/install.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <address@hidden>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -546,8 +546,8 @@ where /gnu lives on a separate partition.")
                  (target "/dev/vdb")))
     (kernel-arguments '("console=ttyS0"))
 
-    ;; Add a kernel module for RAID-0 (aka. "stripe").
-    (initrd-modules (cons "raid0" %base-initrd-modules))
+    ;; Add a kernel module for RAID-1 (aka. "mirror").
+    (initrd-modules (cons "raid1" %base-initrd-modules))
 
     (mapped-devices (list (mapped-device
                            (source (list "/dev/vda2" "/dev/vda3"))
@@ -578,11 +578,11 @@ guix --version
 export GUIX_BUILD_OPTIONS=--no-grafts
 parted --script /dev/vdb mklabel gpt \\
   mkpart primary ext2 1M 3M \\
-  mkpart primary ext2 3M 600M \\
-  mkpart primary ext2 600M 1200M \\
+  mkpart primary ext2 3M 1.4G \\
+  mkpart primary ext2 1.4G 2.8G \\
   set 1 boot on \\
   set 1 bios_grub on
-mdadm --create /dev/md0 --verbose --level=stripe --raid-devices=2 \\
+yes | mdadm --create /dev/md0 --verbose --level=mirror --raid-devices=2 \\
   /dev/vdb2 /dev/vdb3
 mkfs.ext4 -L root-fs /dev/md0
 mount /dev/md0 /mnt
@@ -605,7 +605,7 @@ by 'mdadm'.")
                                                %raid-root-os-source
                                                #:script
                                                %raid-root-installation-script
-                                               #:target-size (* 1300 MiB)))
+                                               #:target-size (* 2800 MiB)))
                          (command (qemu-command/writable-image image)))
       (run-basic-test %raid-root-os
                       `(,@command) "raid-root-os")))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]