Open s9gf4ult opened 1 year ago
I'm seeing this as well after updating to the 22.11 beta. Your setup appears to be very similar to mine, with the main difference being that I don't use LVM. Did you ever figure out a workaround for this by any chance?
(And if not, would this qualify as a release blocker? I imagine anyone using a combination of LUKS and RAID is going to get bitten by this)
Just discovered I can't boot one of my machines with RAID and LUKS as well after updating to 22.11
.
Setup shown here.
This seems to be the same issue as #199551. As a workaround, you can refer to the device using the /dev/disk/by-id/md-name-…
links.
That workaround works for me @mmarx! Thanks very much for the tip!
@mmarx That works, thanks! I also tested with /dev/disk/by-id/md-uuid-...
and that actually works as well.
Just discovered I can't boot one of my machines with RAID and LUKS as well after updating to 22.11.
The same case for me, after I re-booted my headless NAS upgraded to NixOS 22.11. Which sucks - no display, no keyboard - needed to move the machine to investigate.
This seems to be the same issue as #199551. As a workaround, you can refer to the device using the
/dev/disk/by-id/md-name-…
links.
The workaround - configuration rework - works for me too, but I have a bit more complex disk setup with multiple raids for the NAS.
Luckily, the system successfully booted to previous generation - boot entry. So, I could spin up the system.
Multiple mdadm RAIDs
I could prepare a fix for the configuration. However I didn't want to mess up - mix up IDs of drives. So, I've used following commands:
# figure out UUIDs for md127 and md126 virtual RAID devices
lsblk -f
# figure out mdadm's UUIDs for md127 and md126
ls -lh /dev/disk/by-id/md-*
Then, I validated, that my pairing is correct by checking new .../md-uuid...
locations are mapped to correct .../by-uuid/...
locations by putting them into same ls -lh ...
command:
❯ ls -lh /dev/disk/by-uuid/8ca24d0f-6140-49f0-b8d7-e8810f0b60b6 /dev/disk/by-id/md-uuid-b536ed2e\:1762be89\:58616e54\:d1dac3ba
lrwxrwxrwx 1 root root 11 Jan 14 11:22 /dev/disk/by-id/md-uuid-b536ed2e:1762be89:58616e54:d1dac3ba -> ../../md127
lrwxrwxrwx 1 root root 11 Jan 14 11:22 /dev/disk/by-uuid/8ca24d0f-6140-49f0-b8d7-e8810f0b60b6 -> ../../md127
❯ ls -lh /dev/disk/by-uuid/7d0120f7-6f50-428e-9aa5-71a5fc44ff7c /dev/disk/by-id/md-uuid-1cc099f4\:94a3981d\:b89715c3\:7a17952f
lrwxrwxrwx 1 root root 11 Jan 14 11:22 /dev/disk/by-id/md-uuid-1cc099f4:94a3981d:b89715c3:7a17952f -> ../../md126
lrwxrwxrwx 1 root root 11 Jan 14 11:22 /dev/disk/by-uuid/7d0120f7-6f50-428e-9aa5-71a5fc44ff7c -> ../../md126
Note - hint: after I was done, I figured out, that I could have also used LABEL
column from lsblk -f
for matching IDs.
Config example of using LABEL
for mdadm config:
boot.initrd.services.swraid.enable = true;
boot.initrd.services.swraid.mdadmConf =
"ARRAY /dev/md0 metadata=1.2 name=partitionlabel LABEL=partitionlabel";
boot.initrd.luks.devices."devicename" = {
device = "/dev/disk/by-id/md-name-partitionlabel";
}
Though I will leave this here in case anyone needs more details.
@Gonzih No need to specify swraid.mdadmConf
, at least in my case, as the automatic scan is able to correctly assemble the array. The only issue seems to be the missing /dev/disk/by-uuid, which is fixed by using the workaround suggested by @mmarx.
I also seem to have this problem
Describe the bug
It started when I tried to update the system by updating the
nixpkgs
after which I could not boot the system.My layout is next:
The
encroot
is an encryptedpv
occupying themd127
theraid0
array configured withmdadm
. Thefasta/root
is my root partition withext4
on it.So, to boot the system initrd scripts must first initialize the array
md127
withmdadm
, then decryptencroot
asking me to type the password, then initialize thefasta
vg and mount thefasta/root
as root file system.This had been perfectly working before I updated
nixpkgs
at some point. After update the systemd printed the messageWaiting the device /...
at early stage of boot (no root partition mounted). This device by UUID is definitelymd127
which didn't initialized.I decided to bisect the
nixpkgs
to figure out which commit caused the problem, and here is bisect log:The same system configuration was tested, only the
nixpkgs
commit was changing.Reboot followed each step of bisect, so it took several days to finish :(
Finally, the problem is that systemd doesn't initialize the array with
mdadm
in which the whole system lives.Steps To Reproduce
Steps to reproduce the behavior:
a14d1a2e7e8c19087897bc646a37f50096b736b1
to32096899af23d49010bd8cf6a91695888d9d9e73
of thenixpkgs
Expected behavior
At early stage of boot (initrd loaded, but lot root partibion) systemd scripts initialize the array
md127
withmdadm
, then decryptencroot
asking me to type the password, then initialize thefasta
vg and mount thefasta/root
as root file system.Additional context
This does not happen if checkout some commit before the
a14d1a2e7e8c19087897bc646a37f50096b736b1
ofnixpkgs
, with exactly same system configuration.Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.