I have 2 mdadm arrays.
Long time ago, when there was only one raid, i wrote mdadm.conf and it looked like this:
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md/pv00 level=raid1 num-devices=2 UUID=55dc183e:d7199ced:929f5f4a:123c24a3
Since there was no 2nd raid, i thought adding it to it would be a good idea. so I ran command mdadm --detail --scan >> /etc/mdadm.conf
But now, there are 2 entries for first raid
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md/pv00 level=raid1 num-devices=2 UUID=55dc183e:d7199ced:929f5f4a:123c24a3
ARRAY /dev/md/pv00 metadata=1.2 name=server.local:pv00 UUID=55dc183e:d7199ced:929f5f4a:123c24a3
ARRAY /dev/md/25 metadata=1.2 spares=2 name=server.local:25 UUID=a883dfb5:1a8f32ce:fd20e5d8:156a01ff
- 1st: Should I remove old entry and leave only new one? Which one is better?
- 2nd: Why is there a difference between old and new entry? Old one has
level=raid1 num-devices=2but new one has onlymetadata=1.2instead.
Edit: Parially found answer - 3rd: Found information, that raid will not start without it. However, entry in fstab mounting this array seems to automatically start it. So it's needed or not?
Also found some people writing to upate mdadm.conf with mdadm --verbose --detail --scan > /etc/mdadm.conf source. Is it proper? It also outputs drive locations like:
ARRAY /dev/md/pv00 level=raid1 num-devices=2 metadata=1.2 name=server.local:pv00 UUID=55dc183e:d7199ced:929f5f4a:123c24a3
devices=/dev/sdi2,/dev/sdj1
ARRAY /dev/md/25 level=raid6 num-devices=6 metadata=1.2 spares=2 name=server.local:25 UUID=a883dfb5:1a8f32ce:fd20e5d8:156a01ff
devices=/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1,/dev/sdf1,/dev/sdg1
Is it proper syntax? As far, as I know. Drive /dev/sd* may change. So is it safe to add devices to it? I recently had to replace SATA cables on system, and letters changed, as I did not put attention to connect them to same port.