Quantcast
Viewing all articles
Browse latest Browse all 4938

Advanced users • Re: RAID 1 (mirror) with two NVMe

I have not tried it on a Pi, and I do not understand how the two NVMe idea could work (and USB3 would be faster).
It all relies on firmware, bootloader, kernel, initramfs, DTBs. As long as this set (or software stack) finds/enumerates/knows block devices, it is just standard Linux, not Pi specific. 1 SD-card and 1 USB-stick is easiest as P3B+ does recognize those already out of the box in bootROM.
If you make sure the bootFAT files/contents on those devices is the same, you are sure that Linux is loaded from there and can the do almost whatever you want or like. Even do RAID1 on 2 partitions on the same physical device although that is non-sense and I even think mkfs.btrfs refuses it unless you use '--force'. DUP is meant for that.

Making sure bootFAT contents is the same is already something own/DIY, sofar related to U-boot on other SBCs, I did some own scripting in /etc/initramfs/*
I did this also pre- RPIOS-Bookworm to correctly handle kernel updates via apt as it makes the Pi unbootable otherwise. Lost enough time by forgetting, rather decent scripting is needed, otherwise as I indicated earlier, the whole wish/concept to want/have RAID is pretty useless.

Some other thing, pre- PI5 bootloader runs on VC4/VPU, not on ARM. Although U-Boot is for many CPU architectures, it would mean a split and/or dual architecture already just for U-boot (I think). I remember forumuser @cleaver22 I think could get a Pi booted with own/open-source code on VC4/VPU, so maybe if VC4/VPU code in EEPROM can copy a U-boot blob from EEPROM to RAM and kick the ARM it might work booting with U-boot without any removable storage. The u-boot.bin is about 1MB I see (with a lot not needed thinks included).
For the Pi5, I don't know enough about internal structure and that RP1 and so on, but my perception is that it is the same architectural construction, so again not how the rest of the ARM SoCs on the (Android and so on) market boots up.

I took some time to build latest U-boot (2024.10-rc5) for QEMU with BTRFS enabled and I can boot from just 1 BTRFS formatted partition and also from 2 in raid1 profile, also without interaction if one device is removed before a new boot. I had to remove the bootFAT and sort in gdisk so the rootfs partition is number 1, otherwise it did not find boot.scr. And not to forget rootflags=degraded, otherwise you will drop into initramfs prompt at reboot, the old nightmare.

Statistics: Posted by redvli — Thu Sep 26, 2024 8:45 am



Viewing all articles
Browse latest Browse all 4938

Trending Articles