Hi. On Sat, Sep 11, 2021 at 06:55:56PM +0200, Felix Natter wrote: > My question is: How does d-i know how the individual HDDs were combined > into a RAID1?
mdraid stores its metadata on each drive that belongs to the RAID. Whenever it's the beginning of the drive, or the end of it - depends on mdraid metadata version - mdadm(8). At least three things are stored on each drive: - mdraid metadata version - UUID of RAID array itself - hostname that was used to create an array. So, answering your question - d-i does not have to know all this. It's kernel's job to detect your drives, and userspace's (mdadm) one to search for mdraid metadata and assemble an appropriate array from the detected drives. RAID array assembly merely signals the kernel to consider a set of drives an array. tl;dr version. Each time you run "mdadm --detail --scan" all parts of the result are taken from the metadata that's stored on each drive. > The same thing applies when I boot a GNU/Linux rescue system: I think I > can mount the RAID1 if I know the member partitions and type of RAID > using mdadm? The general answer is - you have to assemble (mdadm -A) your array first. Before the assembly you have to know which arrays you have, hence the need of "mdadm --detail --scan", or /etc/mdadm.conf. Any rescue system worthy of its title should perform mdraid assembly for you. Reco