4

I am creating a RAID 10 array over four iSCSI targets. I want to control everything manually though so I can run it through heartbeat. I've unlinked the open-iscsi and mdadm scripts from /etc/rc#.d/ but the raid array is still recreated on boot up. Once the server boots up I have to do a mdadm --stop /dev/md0 and then /etc/init.d/mdadm stop to make sure it doesn't fire it up again. I commented out my array from /etc/mdadm/mdadm.conf but it just created a new one later. How can I put mdadm into a manual process so it only attempts to start or rebuild the array when I tell it to?

J.R.
  • 61
  • 1
  • 1
  • 3

4 Answers4

2

From a RHEL 6.7 setup adding AUTO -all in /etc/mdadm.conf to disable all auto-assembly, except for ARRAYs/DEVICEs otherwise specified, seems to do the trick.

Jakuje
  • 9,145
  • 2
  • 40
  • 44
djp
  • 21
  • 2
2

The only solution that worked for me was (see man mdadm.conf):

# /etc/mdadm/mdadm.conf
ARRAY <ignore> UUID=xxxxxxxx:xxxxxxxx:xxxxxxxx:xxxxxxxx
Toxiro
  • 123
  • 4
1

/etc/mdadm/mdadm.conf

   # by default, scan all partitions (/proc/partitions) for MD superblocks.
   # alternatively, specify devices to scan, using wildcards if desired.
  DEVICE partitions

what about scan something like /dev/null ? I mean some devices without superblocks. So mdadm cant find arrays.

Korjavin Ivan
  • 2,230
  • 2
  • 25
  • 39
  • DEVICE /dev/null does not work - for anyone who reads this later, don't bother, mdadm will still auto-assemble – Slawomir Mar 03 '19 at 00:41
1

You don't mention what flavour of Linux you are using (I'm assuming Linux?). You can control startup behaviour on debian/ubuntu with

dpkg-reconfigure mdadm
paulos
  • 1,694
  • 9
  • 12
  • Ubuntu 11.04. I tried that and the only startup it asks about is the monitor which I had already turned off. – J.R. Sep 20 '11 at 20:15