booting from degraded RAID1?
(I am using Ubuntu 24.04 with kernel 6.8)
I have read that booting from a degraded RAID1 filesystem (eg with one dead disk) is not possible, because systemd waits forever for the second partition.
Is there a HOWTO/best-practise what to do in this event?
I have create my root/boot filesystem this way:
root@mux22:~# mkfs.btrfs -m raid1 -d raid1 /dev/sda4 /dev/sdb4
root@mux22:~# btrfs filesystem show /dev/sda4
Label: 'M22' uuid: 9329698e-bbb0-4047-bcef-863e584f314b
Total devices 2 FS bytes used 144.00KiB
devid 1 size 64.00GiB used 2.01GiB path /dev/sda4
devid 2 size 64.00GiB used 2.01GiB path /dev/sdb4Signature · 6 lines
Ullrich Horlacher Server und Virtualisierung Rechenzentrum TIK Universitaet Stuttgart E-Mail: [email protected] Allmandring 30a Tel: ++49-711-68565868 70569 Stuttgart (Germany) WWW: https://www.tik.uni-stuttgart.de/ REF:<[email protected]>
Quoted 9 lines · Ulli Horlacher
(I am using Ubuntu 24.04 with kernel 6.8)
I have read that booting from a degraded RAID1 filesystem (eg with one dead disk) is not possible, because systemd waits forever for the second partition.
Is there a HOWTO/best-practise what to do in this event?
systemd waits forever for the device with btrfs due to this rule:
bor@ThinkPad-E16-Gen3:~/src/systemd$ cat rules.d/64-btrfs.rules.in # do not edit this file, it will be overwritten on update
SUBSYSTEM!="block", GOTO="btrfs_end"
ACTION=="remove", GOTO="btrfs_end"
ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end"
ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end"
# let the kernel know about this btrfs filesystem, and check if it is complete
IMPORT{builtin}="btrfs ready $devnode"# mark the device as not ready to be used by the system
ENV{ID_BTRFS_READY}=="0", ENV{SYSTEMD_READY}="0"# reconsider pending devices in case when multidevice volume awaits
ENV{ID_BTRFS_READY}=="1", RUN+="{{BINDIR}}/udevadm trigger -s block -p ID_BTRFS_READY=0"LABEL="btrfs_end"
bor@ThinkPad-E16-Gen3:~/src/systemd$
You probably can break into initramfs shell and delete this rule which should allow normal startup sequence to proceed further. It may be possible to manually mount /sysroot (or whatever the location is in Debian/Ubuntu), but I am not sure.
Quoted 11 lines
I have create my root/boot filesystem this way:
root@mux22:~# mkfs.btrfs -m raid1 -d raid1 /dev/sda4 /dev/sdb4root@mux22:~# btrfs filesystem show /dev/sda4 Label: 'M22' uuid: 9329698e-bbb0-4047-bcef-863e584f314b Total devices 2 FS bytes used 144.00KiB devid 1 size 64.00GiB used 2.01GiB path /dev/sda4 devid 2 size 64.00GiB used 2.01GiB path /dev/sdb4