hello Andy, thanks for the detailed answer.
Andy Smith <a...@strugglers.net> writes: > Hello, > > On Fri, Dec 29, 2023 at 06:17:07PM +0100, Felix Natter wrote: >> Andy Smith <a...@strugglers.net> writes: >> > But to be absolutely sure you may wish to totally ignore md0 and >> > its member devices during install as all their data and the >> > metadata on their member devices will still be there after >> > install. You should just be able to see the assembled array in >> > /proc/mdstat, and then mount the filesystem from /etc/fstab. >> > Totally ignoring these devices during install avoids you making >> > a mistake where you alter one of them. -> I was referring to the above paragraph. >> So /dev/md0 will be automatically assembled when I boot the system >> (cat /proc/mdstat), and I can mount it using UUID? > > Yes, if the filesystem on /dev/md0 had a UUID before, it will still > have one when the devices are plugged in to another system (or the > same system after a reinstall). That is very good. >> I couldn't do this on another system, where the software raid(1) is for >> the root filesystem, though. But as I understood you, in the case of the >> root fs, the above mentioned problem does not occur? > > What problem do you refer to? Please see above. > The only thing that does sometimes happen when moving MD arrays > around is that the name of the md device might need to be changed. > > For example, if you have a set of drives that have an md0 on them > and want to move them to a system that already has an md0. The new > system won't assemble that as md0 since it already has an md0 that > has a different UUID. Worse, if you don't do anything and boot such > a system with all the drives installed, it may be arbitrary as to > WHICH ONE gets called md0! It will depend upon which one mdadm > starts assembling first. The other one will be renamed, often to > something weird like md127. > > To solve that problem one would list the pairs of array names and > array UUIDs in /etc/mdadm/mdadm.conf. If the root filesystem is on > an md array then the initramfs also has to be updated, to get a copy > of mdadm.conf into that. > > But that is a bit of an advanced concern that you probably do not > have. Normally /etc/mdadm/mdadm.conf is basically empty. I am using single raid1 setups, so this does not concern me, but many thanks for the heads-up! Thanks and Best Regards, Felix -- Felix Natter