[Nix-dev] NixOS on a machine with only one user

Ertugrul Söylemez ertesx at gmx.de
Sat Apr 25 16:04:29 CEST 2015


> > Assuming bigger things usually gives you a better or at least more
> > scalable result, and in most cases the additional cost is very close
> > to zero. For example every single-disk system I set up uses a
> > two-disk RAID array with one missing disk from the point of view of
> > mdadm. If it does happen that I actually want to add more disks, it
> > will be a few short online commands to do it instead of a tedious
> > reinstallation of the entire system, and it costs only a few
> > megabytes. The additional disk might as well be an external
> > emergency disk that starts synchronising as soon as I plug it in.
>
> How did you manage to make mdadm do that?

It allows you to create arrays with missing disks, and you can activate
them as long as enough disks are present.  It's like creating an array
with a failed disk right from the beginning:

    mdadm --create /dev/md/blah-system \
        -l 1 -n 2 \
        /dev/sda2 missing

Notice the `missing` argument.  It tells mdadm that the first disk is
`/dev/sda2` and the second disk is currently missing.  When you plug in
a second disk, just add it to the array.  When you plug in a third disk,
convert the array to RAID5 (can be done online in the background, see
`--grow`) and add the third disk.  And so on.


Greets,
Ertugrul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150425/4054ef02/attachment.bin 


More information about the nix-dev mailing list