Patchwork Add mdadm to the installation image.

login
register
mail settings
Submitter Andreas Enge
Date July 14, 2016, 1:13 p.m.
Message ID <20160714131306.GA11566@solar>
Download mbox | patch
Permalink /patch/13796/
State New
Headers show

Comments

Andreas Enge - July 14, 2016, 1:13 p.m.
Hello,

the hydra replacement comes with two hard disks, which we would like to set
up as a raid10. For this, one needs mdadm. While it can be pulled in during
installation via "guix package -I mdadm", I think it is preferable that it
already be around, the same as cryptsetup, for instance. The attached patch
does this.

What do you think?

Andreas
From eda9d6e5814c0e53f481599d0efd09d5237444d6 Mon Sep 17 00:00:00 2001
From: Andreas Enge <andreas@enge.fr>
Date: Thu, 14 Jul 2016 15:07:49 +0200
Subject: [PATCH] install: Add mdadm to the image.

* gnu/system/install.scm (installation-os)[packages]: Add mdadm.
---
 gnu/system/install.scm | 2 ++
 1 file changed, 2 insertions(+)
Mathieu Lirzin - July 14, 2016, 2:53 p.m.
Hello,

Andreas Enge <andreas@enge.fr> writes:

> the hydra replacement comes with two hard disks, which we would like to set
> up as a raid10. For this, one needs mdadm. While it can be pulled in during
> installation via "guix package -I mdadm", I think it is preferable that it
> already be around, the same as cryptsetup, for instance. The attached patch
> does this.
>
> What do you think?

I fully agree that mdadm should be directly available.

> From eda9d6e5814c0e53f481599d0efd09d5237444d6 Mon Sep 17 00:00:00 2001
> From: Andreas Enge <andreas@enge.fr>
> Date: Thu, 14 Jul 2016 15:07:49 +0200
> Subject: [PATCH] install: Add mdadm to the image.
>
> * gnu/system/install.scm (installation-os)[packages]: Add mdadm.
> ---
>  gnu/system/install.scm | 2 ++
>  1 file changed, 2 insertions(+)
>
Efraim Flashner - July 14, 2016, 7:21 p.m.
On Thu, Jul 14, 2016 at 04:53:06PM +0200, Mathieu Lirzin wrote:
> Hello,
> 
> Andreas Enge <andreas@enge.fr> writes:
> 
> > the hydra replacement comes with two hard disks, which we would like to set
> > up as a raid10. For this, one needs mdadm. While it can be pulled in during
> > installation via "guix package -I mdadm", I think it is preferable that it
> > already be around, the same as cryptsetup, for instance. The attached patch
> > does this.
> >
> > What do you think?
> 
> I fully agree that mdadm should be directly available.
> 
> -- 
> Mathieu Lirzin
> 

How much does it add to the size?

also, raid10 with 2 disks?
Andreas Enge - July 14, 2016, 9:42 p.m.
On Thu, Jul 14, 2016 at 10:21:25PM +0300, Efraim Flashner wrote:
> How much does it add to the size?

$ guix size mdadm
store item                                                       total    self
/gnu/store/k2hlwyzfs1v5xj1v6475n52jljd9q89x-mdadm-3.4               79.7     1.1   1.4%
/gnu/store/lpvkjic9dhj55plc29jhq8l39irvqm4f-coreutils-8.25          78.6    14.3  17.9%
/gnu/store/g6704rf6gk8w1czvj24d5sbh9zvhf50i-gmp-6.1.0               63.5     2.6   3.2%
/gnu/store/cny25x3kx0z7c93dsnd9vsxasjgln76d-acl-2.2.52              61.6     0.4   0.5%
/gnu/store/m92xmqp7skc233s867bg3gab860sikwl-libcap-2.24             61.3     0.1   0.2%
/gnu/store/zv5x1g1p4kail830r9aw6n49kw0gk92f-attr-2.4.47             61.2     0.2   0.3%
/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib           60.9    22.9  28.7%
/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23              38.1    36.7  46.1%
/gnu/store/0010wvgs40kdq8chzsh403qm7la9jxq7-bash-static-4.3.42       1.4     1.4   1.7%
total: 79.7 MiB

But I think that most of these are already there anyway, and only the "self"
part of 1.1MB actually comes extra.

> also, raid10 with 2 disks?

Yes. With the "far" layout, the second disk is a mirror of the first one,
but with the blocks in a different order. So the second disk creates a
backup, and large sequential reads should become close to twice as fast.

Andreas
Ludovic Courtès - July 15, 2016, 1:27 p.m.
Andreas Enge <andreas@enge.fr> skribis:

> On Thu, Jul 14, 2016 at 10:21:25PM +0300, Efraim Flashner wrote:
>> How much does it add to the size?
>
> $ guix size mdadm

You should check the size of the whole system:

  guix size $(guix system build gnu/system/install.scm)

Ludo’.
myglc2 - July 15, 2016, 2:25 p.m.
Andreas Enge <andreas@enge.fr> writes:

> Hello,
>
> the hydra replacement comes with two hard disks, which we would like to set
> up as a raid10. For this, one needs mdadm. While it can be pulled in during
> installation via "guix package -I mdadm", I think it is preferable that it
> already be around, the same as cryptsetup, for instance. The attached patch
> does this.
>
> What do you think?
>
> Andreas

I want to do this on my own servers, so I am wondering ...

How do you plan to address mdadm and grub config?

Will you be booting from RAID?

TIA - George
Andreas Enge - July 15, 2016, 5:10 p.m.
On Fri, Jul 15, 2016 at 03:27:29PM +0200, Ludovic Courtès wrote:
> You should check the size of the whole system:
>   guix size $(guix system build gnu/system/install.scm)

Good point! Here we are. Before:
/gnu/store/q62mdc418pr2wm9160a7qp3dhc8ii1d8-system                 824.8     0.0   0.0%

After:
/gnu/store/inv57icbw0dp7s4d33r37l1yjdv3sp2n-system                 825.9     0.0   0.0%

:-)


For good measure, here the size after adding also lm-sensors:
/gnu/store/v6nlhanbhcabk2vvqmi4xsgividq1060-system                 904.0     0.0   0.0%

:-|
Not great, but not as bad as I had feared; probably because perl is
unavoidable anyway.

Andreas
Ludovic Courtès - July 16, 2016, 10:50 a.m.
Andreas Enge <andreas@enge.fr> skribis:

> On Fri, Jul 15, 2016 at 03:27:29PM +0200, Ludovic Courtès wrote:
>> You should check the size of the whole system:
>>   guix size $(guix system build gnu/system/install.scm)
>
> Good point! Here we are. Before:
> /gnu/store/q62mdc418pr2wm9160a7qp3dhc8ii1d8-system                 824.8     0.0   0.0%
>
> After:
> /gnu/store/inv57icbw0dp7s4d33r37l1yjdv3sp2n-system                 825.9     0.0   0.0%
>
> :-)

Perfect.  :-)

> For good measure, here the size after adding also lm-sensors:
> /gnu/store/v6nlhanbhcabk2vvqmi4xsgividq1060-system                 904.0     0.0   0.0%

Then we should avoid it IMO.  My understanding is that not having
lm-sensors is at worst annoying, but not critical, right?  WDYT?

Thanks,
Ludo’.
Andreas Enge - July 16, 2016, 12:44 p.m.
On Sat, Jul 16, 2016 at 12:50:41PM +0200, Ludovic Courtès wrote:
> > For good measure, here the size after adding also lm-sensors:
> > /gnu/store/v6nlhanbhcabk2vvqmi4xsgividq1060-system                 904.0     0.0   0.0%
> Then we should avoid it IMO.  My understanding is that not having
> lm-sensors is at worst annoying, but not critical, right?  WDYT?

The comment was just a follow-up to my previous messages about lm-sensors
and my complaint about its size. Indeed I do not mean to imply we should
add it.

Andreas

Patch

diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 329c7ab..734a361 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -1,6 +1,7 @@ 
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -392,6 +393,7 @@  Use Alt-F2 for documentation.
                      parted ddrescue
                      grub                  ;mostly so xrefs to its manual work
                      cryptsetup
+                     mdadm
                      btrfs-progs
                      wireless-tools iw wpa-supplicant-minimal iproute
                      ;; XXX: We used to have GNU fdisk here, but as of version