How to disable mdadm from auto mounting

Red Squirrel

No Lifer
May 24, 2003
70,027
13,493
126
www.anyf.ca
Normally I want it to auto mount, but I rather be in control of it, and call it myself with a script during the startup sequence. I have a server where it starts up automaticly, and occasionally it starts as degraded because I guess the drives did not spin up on time or something.

I want to just have a delay and start it manually.

Everything I found online points to mdadm.conf, but I don't have that file. Where else could be triggering it to start? I did a serarch for mdadm.conf and it's not anywhere else on the system, other than a sample file in /usr.

Where else could I look, is there another config file somewhere that would be auto mounting it? It's not actually mounting the file system, just assembling the raid. I will be mounting the file system manually via my script.
 

joetekubi

Member
Nov 6, 2009
176
0
71
mdadm should not be "interested" in a partition unless it is marked as a raid type.
mdadm and a bunch of other stuff is called early on in the boot sequence as part of the "initrd". I KNOW that mdadm.conf is part of that, so you may need to create that file and tag the partitions so that the raid is not automatically assembled until you want to do it later in the boot. (then run something like mkinitrd)
hope this helps.
 

Red Squirrel

No Lifer
May 24, 2003
70,027
13,493
126
www.anyf.ca
Sorry I was not clear, it's not mounting the file system (I don't have it in fstab at all, I have a script for that) but it's just building the array.

There is no /etc/mdadm.conf file. I'll try to create it and see what happens.