Author Topic: md RAID 1 not being auto mounted  (Read 7590 times)

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
md RAID 1 not being auto mounted
« on: March 17, 2012, 12:54:25 am »
I had created a RAID 1 md device via LinuxMCE's admin interface, but it never behaved correctly when the core was rebooted.  Since I had already put data on it, I decided to stop the device, and then removed it from the interface.

I manually assembled the md device from the two 1 TB drives and put the config in /etc/mdadm/mdadm.conf:

Code: [Select]
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a8280191:5f65eba2:bd9f1658:0a1d2015

I rebooted the core.  This time the raid device came up correctly.  LinuxMCE detected the raid and added it to the RAID list in the web interface with the status set to OK.

The problem is LinuxMCE has marked the two drives as REMOVED - wtf?!  I think this is the reason why the raid device isn't being auto mounted and why I'm not seeing the "new storage added" on my MD's onscreen orbiter.

The kernel says the device and the raid members are ok:

Code: [Select]
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb[0] sdc[1]
      976761472 blocks [2/2] [UU]
     
unused devices: <none>

Code: [Select]
/dev/md0:
        Version : 00.90
  Creation Time : Wed Feb  8 14:06:21 2012
     Raid Level : raid1
     Array Size : 976761472 (931.51 GiB 1000.20 GB)
  Used Dev Size : 976761472 (931.51 GiB 1000.20 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Fri Mar 16 19:49:29 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : a8280191:5f65eba2:bd9f1658:0a1d2015 (local to host dcerouter)
         Events : 0.30190

    Number   Major   Minor   RaidDevice State
       0       8       16        0      active sync   /dev/sdb
       1       8       32        1      active sync   /dev/sdc

How can I fix this?  Should I do some meddling in the DB?

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #1 on: March 17, 2012, 09:11:27 pm »
Does no one know how I can fix this?  I've tried researching the issue myself: I've come up empty handed.

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #2 on: March 19, 2012, 01:45:50 am »
Struggling user could really use some help here...

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #3 on: March 19, 2012, 04:51:40 am »
Well... you are going to want to create it in web admin like you did to begin with, and then fix the problem there.

Take a look at http://svn.linuxmce.org/trac.cgi/ticket/1418

Working on a real fix. Until then try that.
I never quit... I just ping out.

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #4 on: March 19, 2012, 04:09:08 pm »
Well... you are going to want to create it in web admin like you did to begin with, and then fix the problem there.

Take a look at http://svn.linuxmce.org/trac.cgi/ticket/1418

Working on a real fix. Until then try that.

I've done the mdadm.conf part - that's why it's surviving reboots.

If I create it in the web admin, won't my data get wiped?  I don't want to do that.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #5 on: March 19, 2012, 04:22:35 pm »
You have sort of painted yourself into a corner here. It is hard to get system support for something the system is designed to handle that you have done outside of it. You already implemented a solution that isn't working, and now your data is stuck on it. My recommendation is to copy your data off onto something else temporarily, reconfigure through the system, and then migrate it back once your original issue is fixed.

In the future, when you encounter something not working,
1. See if a ticket exists in http://svn.linuxmce.org which matches your problem, if not, create one. Be as specific as you can describing the environment and circumstances.
2. See if you can get help either on the forum or in IRC. This way we can get a better idea of what a solution might be to close your ticket and fix it for everyone. Most of us do not deal with RAID on our production or development systems, we just use NAS bricks... so we cannot reproduce errors you are encountering.

If you go hammering away at it on your own, we don't know something is wrong... and then you end up here... on your own :(.
I never quit... I just ping out.

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #6 on: March 19, 2012, 05:03:37 pm »
I didn't want to create a ticket until I was sure I had encountered a bug.

The first time around I DID use LinuxMCE to create the RAID array - it just didn't behave correctly. I did have another thread about that problem and asked repeatedly for help, but no one replied.  When that happened, I started to do my own thing.

I'm not used to using a Linux distro that does this much hand holding.  I have to get used to just giving control over to the OS (but only for LinuxMCE!).

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #7 on: March 19, 2012, 05:14:40 pm »
I didn't want to create a ticket until I was sure I had encountered a bug.

The first time around I DID use LinuxMCE to create the RAID array - it just didn't behave correctly. I did have another thread about that problem and asked repeatedly for help, but no one replied.  When that happened, I started to do my own thing.

I'm not used to using a Linux distro that does this much hand holding.  I have to get used to just giving control over to the OS (but only for LinuxMCE!).

I didn't mean to come off like "you screwed everything up".

It should "just work". Something has changed as it used to. I think people might be reluctant to jump into raid problem threads because, like I said, none of us use them... so it isn't an area anyone feels particularly strong in. We all have our strengths and weaknesses. RAID verges on things I understand about the system, but not something I feel "strong" in. It is one of those odd areas where you are more likely to get someone motivated bugging us in IRC. When there ARE tickets (like the one I provided) you can see who it is assigned to, and specifically bug them (you're welcome Merk) as it is going to be assigned to the person strongest on it.

Keep in mind, we are all volunteer... and all have lives outside of this free project, so sometimes needs cannot be met the minute they arise.
I never quit... I just ping out.

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #8 on: March 19, 2012, 09:32:44 pm »
Keep in mind, we are all volunteer... and all have lives outside of this free project, so sometimes needs cannot be met the minute they arise.

Oh, I completely understand that.  I let the thread hang around for a long time before I caved and just did the RAID setup by hand.

In any case, I'm now moving the data off the md RAID array onto another disk in preparation for the RAID redo.  I'll post here if things start working correctly afterwards.

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #9 on: March 19, 2012, 10:31:21 pm »
Honestly the only reason that I poked my head in, was because it was the second RAID issue I had seen, which often indicates a looming problem... and... the only thing I can think of that has changed recently that deals with RAID is the StorageDevices_Radar.sh, which I rewrote... however that has nothing to do with creation, but how the system discovers them. So if it was my rewrite that broke it, I will do whatever is necessary to fix it. If I didn't break it, I will still loan you the extent of my knowledge on the subject.
I never quit... I just ping out.

m3freak

  • Veteran
  • ***
  • Posts: 125
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #10 on: March 20, 2012, 05:25:01 pm »
Honestly the only reason that I poked my head in, was because it was the second RAID issue I had seen, which often indicates a looming problem... and... the only thing I can think of that has changed recently that deals with RAID is the StorageDevices_Radar.sh, which I rewrote... however that has nothing to do with creation, but how the system discovers them. So if it was my rewrite that broke it, I will do whatever is necessary to fix it. If I didn't break it, I will still loan you the extent of my knowledge on the subject.

You might be interested in my comment to the ticket: http://svn.linuxmce.org/trac.cgi/ticket/1418 .

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: md RAID 1 not being auto mounted
« Reply #11 on: March 20, 2012, 10:21:51 pm »
A fix has been committed in the above ticket. note that you will still need to run the command "sudo mdadm --detail --scan >> /etc/mdadm/mdadm.conf" and reboot once even when the update goes live (and as a workaround until it goes live), but after that this step will be performed any time the RAID configuration is modified.