Merge pull request #8 from asymmetric/mdadm-hostname

hosters/hetzner-dedicated: mdadm: ignore homehost
This commit is contained in:
Raphael Megzari 2021-04-27 09:54:17 +09:00 committed by GitHub
commit cb09b52de8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,13 +229,11 @@ cat > /mnt/etc/nixos/configuration.nix <<EOF
# This is mdadm's protection against accidentally putting a RAID disk
# into the wrong machine and corrupting data by accidental sync, see
# https://bugzilla.redhat.com/show_bug.cgi?id=606481#c14 and onward.
# We set the HOMEHOST manually go get the short '/dev/md' names,
# and so that things look and are configured the same on all such
# machines irrespective of host names.
# We do not worry about plugging disks into the wrong machine because
# we will never exchange disks between machines.
# we will never exchange disks between machines, so we tell mdadm to
# ignore the homehost entirely.
environment.etc."mdadm.conf".text = ''
HOMEHOST hetzner
HOMEHOST <ignore>
'';
# The RAIDs are assembled in stage1, so we need to make the config
# available there.