mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
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.
This commit is contained in:
parent
1fa3423236
commit
3adf320e44
1 changed files with 7 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
|
@ -546,8 +546,8 @@ (define-os-with-source (%raid-root-os %raid-root-os-source)
|
||||||
(target "/dev/vdb")))
|
(target "/dev/vdb")))
|
||||||
(kernel-arguments '("console=ttyS0"))
|
(kernel-arguments '("console=ttyS0"))
|
||||||
|
|
||||||
;; Add a kernel module for RAID-0 (aka. "stripe").
|
;; Add a kernel module for RAID-1 (aka. "mirror").
|
||||||
(initrd-modules (cons "raid0" %base-initrd-modules))
|
(initrd-modules (cons "raid1" %base-initrd-modules))
|
||||||
|
|
||||||
(mapped-devices (list (mapped-device
|
(mapped-devices (list (mapped-device
|
||||||
(source (list "/dev/vda2" "/dev/vda3"))
|
(source (list "/dev/vda2" "/dev/vda3"))
|
||||||
|
@ -578,11 +578,11 @@ (define %raid-root-installation-script
|
||||||
export GUIX_BUILD_OPTIONS=--no-grafts
|
export GUIX_BUILD_OPTIONS=--no-grafts
|
||||||
parted --script /dev/vdb mklabel gpt \\
|
parted --script /dev/vdb mklabel gpt \\
|
||||||
mkpart primary ext2 1M 3M \\
|
mkpart primary ext2 1M 3M \\
|
||||||
mkpart primary ext2 3M 600M \\
|
mkpart primary ext2 3M 1.4G \\
|
||||||
mkpart primary ext2 600M 1200M \\
|
mkpart primary ext2 1.4G 2.8G \\
|
||||||
set 1 boot on \\
|
set 1 boot on \\
|
||||||
set 1 bios_grub 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
|
/dev/vdb2 /dev/vdb3
|
||||||
mkfs.ext4 -L root-fs /dev/md0
|
mkfs.ext4 -L root-fs /dev/md0
|
||||||
mount /dev/md0 /mnt
|
mount /dev/md0 /mnt
|
||||||
|
@ -605,7 +605,7 @@ (define %test-raid-root-os
|
||||||
%raid-root-os-source
|
%raid-root-os-source
|
||||||
#:script
|
#:script
|
||||||
%raid-root-installation-script
|
%raid-root-installation-script
|
||||||
#:target-size (* 1300 MiB)))
|
#:target-size (* 2800 MiB)))
|
||||||
(command (qemu-command/writable-image image)))
|
(command (qemu-command/writable-image image)))
|
||||||
(run-basic-test %raid-root-os
|
(run-basic-test %raid-root-os
|
||||||
`(,@command) "raid-root-os")))))
|
`(,@command) "raid-root-os")))))
|
||||||
|
|
Loading…
Reference in a new issue