Results 1 to 9 of 9

Thread: I can not autostart and automount software RAID

  1. #1
    Join Date
    Oct 2008
    Beans
    7

    Question I can not autostart and automount software RAID

    On Karmic Koala (0910) 64bit.

    I have put together a media server for my home and have made a 4 disk raid 5 with mdadm (Disk utility).

    I have gotten samba to start at boot, but...
    How can I get the raid to assemble/start and mount at boot?
    It works fine once I am logged into terminal using:
    sudo mdadm -A /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
    It asks for my password and then starts up fine.
    And I must also mount it manually, and once again it asks for my password.

    It would be great if everything would start at boot without the manual fooling around

    Anyone have any idea?

  2. #2
    Join Date
    Oct 2009
    Beans
    8

    Re: I can not autostart and automount software RAID

    I am also am looking for a similar solution....

  3. #3
    Join Date
    Dec 2009
    Beans
    1

    Re: I can not autostart and automount software RAID

    I had the same problem after updating from 8.1 to 9.04 (and then to 9.1)

    For some (stupid ?) reason Ubuntu Server only starts those arrays automaticly, that are listet in the /etc/mdadm/mdadm.conf

    If your array is already properly configured, the easiest way to get it started automaticly is the following:

    # Let exisiting arrays be detected and started
    sudo mdadm --auto-detect

    # Find out the UUID of the array(s) you want to be started automaticly
    sudo mdadm --detail --scan

    The output will look something like this (depending on your arrays):
    mdadm: md device /dev/md/d0 does not appear to be active.
    ARRAY /dev/md0 level=raid1 num-devices=2 metadata=00.90 UUID=02a3fb05:e090a494:1b1a320b:21b9bdd9

    Now mark and copy (or write down) the "UUID= ..." of the array(s) you want to start

    Edit your /etc/mdadm/mdadm.conf and add the following line(s):

    # definitions of existing MD arrays (put the UUID of YOUR array here...)
    ARRAY /dev/md0 UUID=02a3fb05:e090a494:1b1a320b:21b9bdd9

    Save the file.
    Reboot.
    -> The raid array(s) should be up and running
    -> If it is included in the /etc/fstab it should also be mounted

    Regards,

    Michael

  4. #4
    Join Date
    Oct 2008
    Beans
    7

    Re: I can not autostart and automount software RAID

    Thanks Michael
    That would explain my troubles
    I did put it in the /etc/fstab, but the array did not start, so it didn't mount either

    I have solved it though by reinstalling and configuring the raid during the install, not something you would want for an upgrade though

  5. #5
    Join Date
    Dec 2006
    Beans
    48

    Re: I can not autostart and automount software RAID

    Don't forget to make the /media/data directory also

    sudo mkdir /media/data

    sam

    (that bit me this morning.) This thread got be 'almost' there.

  6. #6
    Join Date
    Dec 2009
    Beans
    1
    Distro
    Ubuntu

    Re: I can not autostart and automount software RAID

    this thread saved me, thank you

    I don't understand why this is not automated especially when you use a gui to create the raid

  7. #7
    Join Date
    Apr 2009
    Beans
    Hidden!

    Re: I can not autostart and automount software RAID

    Quote Originally Posted by Micha0365 View Post
    I had the same problem after updating from 8.1 to 9.04 (and then to 9.1)

    For some (stupid ?) reason Ubuntu Server only starts those arrays automaticly, that are listet in the /etc/mdadm/mdadm.conf

    If your array is already properly configured, the easiest way to get it started automaticly is the following:

    # Let exisiting arrays be detected and started
    sudo mdadm --auto-detect

    # Find out the UUID of the array(s) you want to be started automaticly
    sudo mdadm --detail --scan

    The output will look something like this (depending on your arrays):
    mdadm: md device /dev/md/d0 does not appear to be active.
    ARRAY /dev/md0 level=raid1 num-devices=2 metadata=00.90 UUID=02a3fb05:e090a494:1b1a320b:21b9bdd9

    Now mark and copy (or write down) the "UUID= ..." of the array(s) you want to start

    Edit your /etc/mdadm/mdadm.conf and add the following line(s):

    # definitions of existing MD arrays (put the UUID of YOUR array here...)
    ARRAY /dev/md0 UUID=02a3fb05:e090a494:1b1a320b:21b9bdd9

    Save the file.
    Reboot.
    -> The raid array(s) should be up and running
    -> If it is included in the /etc/fstab it should also be mounted

    Regards,

    Michael


    Would these commands also work in Ubuntu 9.10 Desktop? I just don't want to screw up my system if I can help it.

    Cheers,

    John

  8. #8
    Join Date
    Oct 2008
    Beans
    7

    Re: I can not autostart and automount software RAID

    I was using the desktop "edition" for this, and it worked for me (after all the good tips here).
    I also tried Fedora 12, and it's the exact same problem there, and I guess the same fix.

  9. #9
    Join Date
    Apr 2009
    Beans
    Hidden!

    Re: I can not autostart and automount software RAID

    Quote Originally Posted by Rune Hagen View Post
    I was using the desktop "edition" for this, and it worked for me (after all the good tips here).
    I also tried Fedora 12, and it's the exact same problem there, and I guess the same fix.
    Thank you for the confirmation! My RAIDs now auto start and auto mont.

    Cheers,

    John

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •