On Tue, 11 Jul 2017 12:00:39 +0200, Istvan Gabor wrote:
Hello:
This is in openSUSE Leap 42.2. I have several RAID1 (mirror arrays).
Using mdadm --examine --scan command output I made an /etc/mdadm.conf file which looks like this (some lines removed):
ARRAY /dev/md/3 metadata=1.0 UUID=aaaa name=lnx:3 ARRAY /dev/md/6 metadata=1.0 UUID=bbbb name=lnx:6 ARRAY /dev/md/11 metadata=1.0 UUID=cccc name=lnx:11
Interestingly /proc/mdstat shows my arrays as:
md0 : active raid1 sdc11[1] sdb11[0] 62918464 blocks super 1.0 [2/2] [UU] bitmap: 0/1 pages [0KB], 65536KB chunk
md3 : active raid1 sdb3[0] sdc3[1] 21221792 blocks super 1.0 [2/2] [UU] bitmap: 0/1 pages [0KB], 65536KB chunk
md6 : active raid1 sdb6[0] sdc6[1] 20972752 blocks super 1.0 [2/2] [UU] bitmap: 0/1 pages [0KB], 65536KB chunk
According to uuids md3 and md6 correspond to ARRAY /dev/md/3 and ARRAY /dev/md/6, and md0 corresponds to ARRAY /dev/md/11.
Why the md0 array is not named according to mdadm.conf to md11? All other arrays are named according to mdadm.conf. Where do the arrays get their names from?
mdadm -D /dev/md0 output:
/dev/md0: Version : 1.0 Creation Time : Wed Dec 31 15:03:43 2014 Raid Level : raid1 Array Size : 62918464 (60.00 GiB 64.43 GB) Used Dev Size : 62918464 (60.00 GiB 64.43 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Mon Jun 12 11:11:15 2017 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0
Name : any:0 UUID : cccc (the same as ARRAY /dev/md/11 uuid above) Events : 190
Number Major Minor RaidDevice State 0 8 27 0 active sync /dev/sdb11 1 8 43 1 active sync /dev/sdc11
I found what the problem was. I thought that array names are given at array assembly according to mdadm.conf but I was wrong. Array names are stored in the array superblock. In my case the array name was any:0 while in mdadm.conf it was specified as lnx:11, therefore mdadm.conf line did not match the array. The array was assembled independently from mdadm.conf. To fix this I did: mdadm -S /dev/md0 mdadm -A /dev/md11 --name=lnx:11 --update=name /dev/sdb11 /dev/sdc11 This updated the arrays name to lnx:11 that matches the line in mdadm.conf. Istvan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org