czwartek, 15 grudnia 2022

The old story of /dev/md127

I always used this solution to make sure that /dev/mdN will be /dev/mdN after restart (to prevent name change to /dev/md127 after reboot).
mdadm --examime --scan >/etc/mdadm/mdadm.conf
# edit /etc/mdadm/mdadm.conf
# on debian/ubuntu
update-initramfs -u -k all
Another solution (basicaly RTFM):
mdadm --create /dev/md0 -l 1 -n 2 --metadata=1.2 --homehost=any /dev/sdb /dev/sdc
homehost == any - this is wildcard name of the host (hostname). By default current system hostname is inserted by mdadm.
Starting with kernel 5.19 there is kernel option hostanme= which can be used to setup hostname at boot (before userspace). This can also be used to corellate user/kernel hostanmes.
This is related to metadata format 1.2. With metadata verion 0.90 "Preferred Minor" property is used.

Brak komentarzy: