LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-11-2012, 11:31 PM   #1
James259
LQ Newbie
 
Registered: Sep 2010
Posts: 18

Rep: Reputation: 0
Disable MD RAID auto-detect on boot


Hi Folks,

This is driving me crazy.

I have a server with a series of RAID arrays.
Each array is made up of a local partition and a remote one. (similar to iSCSI)

The remote block device is mounted when required and the script that does that also assembles the RAID with an mdadm command. This could be days, weeks, or even months after the system boots.

What is happening is the system is seeing the local component (Its actually an LVM volume for each array) and attempting to mount the array on boot. It complains the array is degraded and drops to an initramfs prompt.

What I really need to do is prevent any arrays being assembled at boot time.

I know that I can set a flag for booting degraded but I need the arrays to not get created at all.

I have found two options so far that both sound like they should do exactly what I want, but neither of them seem to have any effect at all.

The first one was to put the following line in /etc/mdadm/mdadm.conf
DEVICE /dev/null

I have also tried DEVICE /dev/sda1 (which is not raid related)
I also noted some posters referred to the config file location being /etc/mdadm.conf so I have tried copying the config file there too.
No joy.

The second option I found was to add raid=noautodetect to the kernel options.
I did this in /etc/default/grub by adding to the GRUB_CMDLINE_LINUX_DEFAULT and then running update-grub, and rebooting. At the grub boot menu I verified the option was present by pressing e and checking the option was present.

Neither of these appear to make any difference whatsoever.

If anyone can offer any suggestions, it would be very much appreciated.


Ubuntu 12.04 x64
Installed with F4 -> Minimal VPS option.
Currently running inside virtual box. (just for testing)
apt-get update; apt-get upgrade; apt-get dist-upgrade << done today

Arrays were created using mdadm.
They are all RAID1
Version 1.2
Feature Map 0x0 (??)

The arrays say they are flagged local to this host. I assume that's normal.

Not sure what other details might be useful.
Please ask if I have missed anything.


Regards,

James
 
Old 10-12-2012, 01:47 PM   #2
markie83
LQ Newbie
 
Registered: Dec 2009
Posts: 27

Rep: Reputation: 0
what I had to do when using the newer mdadm that tries to autodetect everything for you (real PITA) was to mount the arrays in /etc/fstab but use the UUID of the array instead of /dev/md*

that seemed to really make things alot more predictable.

.....good luck,
mark
 
Old 10-13-2012, 07:55 PM   #3
James259
LQ Newbie
 
Registered: Sep 2010
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for your reply Mark.

I do not want to mount the arrays at all though. (Not until they are required - which is long after boot time)
The key thing here is not the mounting of the filesystems as such - I specifically do not want the arrays to assemble (or attempt to) while the system is booting.
I want to only assemble manually. (The filesystems are never actually mounted because I only want direct access to the block device)

Any other suggestions anyone? I am still stuck with this.

Cheers,

James
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to auto detect a new disk on boot? wdli Red Hat 1 03-22-2012 08:36 PM
Auto-detect USB speakers on boot TuxArch Linux - Hardware 6 02-26-2011 06:26 AM
Disable auto mounting USB on boot qui.bow Linux - Hardware 5 06-08-2009 01:14 PM
auto detect USB device at boot knobby67 Linux - Hardware 2 06-13-2008 03:47 AM
Disable Xorg Monitor Auto Detect! wh33t Linux - Software 1 06-02-2005 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration