On 01/02/2017 00:15, george from the tribe wrote:
On 01/31/2017 06:45 PM, Wols Lists wrote:
On 31/01/17 03:33, george from the tribe wrote:
How do I completely get rid of my system seeing the raid in this partition and reactivating itself? I removed all the information from the /etc/mdadm.conf file for that drive, so it is not getting information from there.
As you've found, mdadm.conf is optional. mdadm by default scans the drives looking for superblocks. My system doesn't even have an mdadm.conf.
Cheers, Wol
Yes, good to know now. I had always just assumed that the system scanned for superblocks and looked to mdadm.conf to correlate. I am wondering, though, does it get the drive numbers from mdadm.conf? When I boot into another linux based system, like gparted or the rescue system, it gives me funny mdadm numbers, like md126 and md127. My mdadm.conf looks like this in Leap:
# cat /etc/mdadm.conf ARRAY /dev/md/facofficeeng02:1 UUID=a8872a97:eecd6828:f759773c:cb18678e
# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sda7[2] sdb7[0] 736050176 blocks super 1.2 [2/2] [UU] bitmap: 2/6 pages [8KB], 65536KB chunk
unused devices: <none>
So it makes the drive md1. I supposed I might test it at some point and see if changing :1 to :2 in mdadm.conf would change the drive number from md1 to md2.
You're supposed to create named arrays so they are unique - a bit like drives get UUIDs. The reason is simple ... as the system boots, it detects the hard drives, and allocates sda, sdb, et al in the order the system finds them. THIS IS EXPLICITLY NOT GUARANTEED TO BE REPRODUCIBLE. Then udev comes along and detects the array components, passing them to mdadm. THIS ORDER IS EXPLICITLY NOT GUARANTEED TO BE REPRODUCIBLE. And mdadm allocates numbers - from 127 downwards - to the arrays in the order it gets passed them. It just so happens - on x86 - that most systems just happen to have all these detects happening in a reproducible order, which fools us into thinking that everything should be the same every boot. But even on x86, as soon as you add hot-plug or whatever, this breaks down. Looking at your mdadm.conf, I'm guessing that the computer *the array was created on* was called facofficeeng02? And this was the first (only) array on that machine? I suspect you can use that name safely, you can certainly use the UUID safely, and you're best using your own names. The computer will use - *random* - sda, sdb, md127, md127, but it will always provide symlinks using the UUID or the name you provide, and it will keep these symlinks correct for you. You might find your md1 and md2 are reproducible, but as I don't have an mdadm.conf, mine count down from 127. And I'm a bit surprised you have md1 and md2 etc. Cheers, Wol -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org