Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 49

Thread: Raid array does not auto start/auto mount

  1. #31
    Join Date
    Jun 2008
    Beans
    30

    Re: Raid array does not auto start/auto mount

    I have to concur with what ttguy did in post 19. My array absolutely would not start (I tried some of the other suggestions here) until I changed the ARRAY callout in mdadm.conf to
    Code:
    ARRAY /dev/md0 level=raid1 metadata=00.90 num-devices=2 devices=/dev/sdb1,/dev/sdc1
    I did not have to change the DEVICE callout as was suggested in another post.
    In fstab I changed the mount to what sudo blkid gave me for a UUID (not what mdadm gave me in the ARRAY callout after the reconfigure). It turns out that this UUID is the same UUID as the first device in my RAID 1 set.
    Code:
    # /Ghost is a raid 1 of sdb1 and sdc1 /dev/md0 UUID=d72b0282:40a01e83:9abbf870:ef93538a
    UUID=9479f06e-2ad8-47ae-b1c1-d224050f25f5 /Ghost ext4 defaults 0 2
    It also turns out that all the dmesg stuff I was looking at was a red herrirng. Until I could get the array started, dmesg gave me nothing.

    *EDIT* This ultimately didn't work. See below
    Last edited by klyndt; December 27th, 2010 at 09:40 PM. Reason: New information

  2. #32
    Join Date
    Dec 2010
    Beans
    1

    Re: Raid array does not auto start/auto mount

    I had the same problem that is being discussed here a few weeks ago on a new machine I built. I ended up solving it by installing ubuntu with the "alternate" installation iso. The alternate install disc has everything set up natively to allow you to create a new raid array before the OS gets installed. You can then format your array and mount it as "/", then install directly onto said array.

    I didn't have to mess with trying to figure out what to put in mdadm.conf or fstab at all.


    In the hopes of helping anybody reading this in the future, here are my final working mdadm.conf and fstab files:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    proc /proc proc nodev,noexec,nosuid 0 0
    # / was on /dev/md1 during installation
    UUID=1e220b20-5751-4252-9212-ef1eafee491c / ext4 errors=remount-ro 0 1
    # /boot was on /dev/sda3 during installation
    UUID=27ff341e-35ba-4a53-a8a5-cd9b0cef41e3 /boot ext4 defaults 0 2
    # /home was on /dev/md0 during installation
    UUID=609da14f-69d0-4889-bfe9-124024896ca8 /home ext4 defaults 0 2

    # mdadm.conf
    #
    # Please refer to mdadm.conf(5) for information about this file.
    #

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

    # auto-create devices with Debian standard permissions
    CREATE owner=root group=disk mode=0660 auto=yes

    # automatically tag new arrays as belonging to the local system
    HOMEHOST <system>

    # instruct the monitoring daemon where to send mail alerts
    MAILADDR root

    # definitions of existing MD arrays
    ARRAY /dev/md0 level=raid0 num-devices=4 UUID=700e5b4f:85079565:eb201670:8b85c392
    ARRAY /dev/md1 level=raid10 num-devices=3 UUID=a7b267aa:eff86c94:0acba3ba:31e95ab5

    # This file was auto-generated on Mon, 13 Dec 2010 16:39:35 -0500
    # by mkconf $Id$

  3. #33
    Join Date
    Dec 2010
    Beans
    1

    Re: Raid array does not auto start/auto mount

    I also ran into this problem using Ubuntu 10.10 Server Edition. One of the hard drives in a raid 10 array failed and I replaced it. I eventually got the array rebuilt, but it would fail on reboot saying the disk is not yet ready or not present. I tried rebuilding the partitions on the new drive, zeroing the superblock, setting metadata=0.90 in mdadm.conf, all to no avail.

    It turns out that when I first rebuilt the array I did it with the drive device (/dev/sdf) instead of the partition (/dev/sdf1). I later corrected this, but it left a superblock on the drive which does not get zeroed when you do mdadm --zero-superblock /dev/sdf1. In the end, zeroing the superblock for the drive AND the partition did the trick. The array now builds fine on reboot. Might want to keep this in mind of the above solutions do not work.

  4. #34
    Join Date
    Jun 2008
    Beans
    30

    Re: Raid array does not auto start/auto mount

    After a few boots I found that my raid array was having serious problems and I would end up having to reboot or just skip the array mounting. I decided to try again. This is what I did (and seems to work through a couple reboots).
    1. installed Gparted
    2. in a terminal: sudo palimpsest
    to open Disk Utility and stop the array that was in there
    3. closed that and in a terminal: sudo gparted
    4. deleted out the partitions that were on sdb and sdc (my raid 1 drives)
    5. Closed gparted
    6. sudo palimpsest again. Partitioned and formated the Raid array for ext4
    7. Closed palimpsest and typed: sudo rm /etc/mdadm/mdadm.conf
    8. typed: sudo dpkg-reonfigure mdadm
    9. opened the new mdadm.conf file (sudo gedit /etc/mdadm/mdadm.conf) and copied the UUID. While in gedit, I opened /etc/fstab and pasted the UUID so I could mount the raid drive at boot (UUID=d72b0282:40a01e83:9abbf870:ef93538a /Ghost ext4 defaults 0 2)
    10. Saved fstab and rebooted
    11. Skipped mounting the raid drive because this didn't work! Damn!
    12. Opened Disk Utility again and manually started the array.
    13. In a terminal: sudo blkid
    14. Noticed that the UUID for sdb, sdc, and the raid array have the same UUID and.... it is different from the UUID in mdadm.conf and consequently fstab.
    15. sudo gedit /etc/mdadm/mdadm.conf and pasted the UUID from the blkid command into the ARRAY line (ARRAY /dev/md0 level=raid1 num-devices=2 UUID=a901b9d9-92cb-49ec-aedb-8b0654b08edb). Opened fstab while in gedit and corrected the UUID in there too (UUID=a901b9d9-92cb-49ec-aedb-8b0654b08edb /Ghost ext4 defaults 0 2)
    16. Saved, closed gedit, and rebooted.
    17. It works! Rebooted again. It still works!

    To skip the failing steps I think I would do step 8 and then skip to step 13. Hopefully this works this time.

    Klyndt

  5. #35
    Join Date
    Mar 2005
    Beans
    7

    Re: Raid array does not auto start/auto mount

    Here is how I fixed the problem of the raid devices not starting at boot time.
    I have my root partition on a non-raid device, /home is raid1. Symptoms were that a
    normal boot into multi-user mode would fail frequently; rebooting immediately or dropping into
    single user mode to start the raid device was required.

    To fix, I modified /etc/init/mountall.conf at line 38
    to run mdadm to ensure the raid devices are started
    before the mountall command. Here is my /etc/init/mountall.conf

    Code:
    # mountall - Mount filesystems on boot
    #
    # This helper mounts filesystems in the correct order as the devices
    # and mountpoints become available.
    
    description	"Mount filesystems on boot"
    
    start on startup
    stop on starting rcS
    
    expect daemon
    task
    
    emits virtual-filesystems
    emits local-filesystems
    emits remote-filesystems
    emits all-swaps
    emits filesystem
    emits mounting
    emits mounted
    
    # temporary, until we have progress indication
    # and output capture (next week :p)
    console output
    
    script
        . /etc/default/rcS
        [ -f /forcefsck ] && force_fsck="--force-fsck"
        [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"
    
        # set $LANG so that messages appearing in plymouth are translated
        if [ -r /etc/default/locale ]; then
            . /etc/default/locale
            export LANG LANGUAGE LC_MESSAGES LC_ALL
        fi
    
        # - make sure md devices are up
        mdadm --assemble --scan
        exec mountall --daemon $force_fsck $fsck_fix
    end script
    
    post-stop script
        rm -f /forcefsck 2>dev/null || true
    end script

  6. #36
    Join Date
    Feb 2011
    Beans
    2
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Raid array does not auto start/auto mount

    Hi everyone,

    Brilliant thread going here! Unfortunately it hasn't helped me (if it had I wouldn't be posting!)

    I have just installed 10.10, with 1x 320gb drive (Ubuntu installed here), 4x 2tb drives (three with RAID5, one as a backup until I'm happy). I created the raid array with Disk Utility through the gui. I'm not 100% sure my problems match what others are experiencing.

    When I start Disk Utility, the array is not running and it is partially assembled and capacity is reported as 0k. I have to select Stop RAID Array and then Start RAID Array to get the array to start. I then have to mount the partition by clicking mount partition.

    I want to autostart and automount the array on boot, but to begin with I'd just be happy with autostarting the array. I've followed the instructions here with no luck. Can someone please tell me what's going wrong and the commands to fix it?

    My array uses /dev/sda1, /dev/sdb1, and /dev/sdc1, and as of right now reckons it's degraded, but all disks report as being healthy(?!?!)

    Any help will be greatly appreciated! Perhaps I'm just being stupid?

    Info as follows is from the array mounted, array degraded

    Code:
    root@HTPC:/home/media/Desktop# sudo mdadm -D -s
    ARRAY /dev/md0 level=raid5 num-devices=3 metadata=01.02 name=:Array UUID=559b0f9b:13306bf7:c45d6113:750b927c
    Code:
    # mdadm.conf
    #
    # Please refer to mdadm.conf(5) for information about this file.
    #
    
    # by default, scan all partitions (/proc/partitions) for MD superblocks.
    # alternatively, specify devices to scan, using wildcards if desired.
    DEVICE partitions
    
    # auto-create devices with Debian standard permissions
    CREATE owner=root group=disk mode=0660 auto=yes
    
    # automatically tag new arrays as belonging to the local system
    HOMEHOST <system>
    
    # instruct the monitoring daemon where to send mail alerts
    MAILADDR root
    
    # definitions of existing MD arrays
    ARRAY /dev/md/Array level=raid5 metadata=1.2 num-devices=3 UUID=559b0f9b:13306bf7:c45d6113:750b927c name=:Array
    
    # This file was auto-generated on Tue, 15 Feb 2011 20:05:46 +1300
    # by mkconf $Id$
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # swap was on /dev/sda5 during installation
    UUID=a46edf1b-1bdd-4cf3-8ce5-98ca344a8eee none            swap    sw              0       0
    Code:
    root@HTPC:/home/media# sudo blkid
    /dev/sda1: UUID="559b0f9b-1330-6bf7-c45d-6113750b927c" LABEL=":Array" TYPE="linux_raid_member" 
    /dev/sdb1: UUID="559b0f9b-1330-6bf7-c45d-6113750b927c" LABEL=":Array" TYPE="linux_raid_member" 
    /dev/sdc1: UUID="559b0f9b-1330-6bf7-c45d-6113750b927c" LABEL=":Array" TYPE="linux_raid_member" 
    /dev/sdd1: LABEL="Backup" UUID="39bb2373-96d6-4e89-a0dd-01eef0976a4c" TYPE="ext4" 
    /dev/sde1: UUID="1c3513eb-6ae0-4b1f-a817-054f57bf7f4a" TYPE="ext4" 
    /dev/sde5: UUID="a46edf1b-1bdd-4cf3-8ce5-98ca344a8eee" TYPE="swap" 
    /dev/md0p1: LABEL="Data" UUID="fb3523d0-72e7-4f5e-b8e0-fd448d5c875f" TYPE="ext4"
    Code:
    root@HTPC:/home/media# cat   /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
    md0 : active raid5 sdb1[1] sda1[3]
          3907028824 blocks super 1.2 level 5, 4k chunk, algorithm 2 [3/2] [_UU]
          bitmap: 5/466 pages [20KB], 2048KB chunk
    
    unused devices: <none>

  7. #37
    Join Date
    Feb 2011
    Beans
    1

    Re: Raid array does not auto start/auto mount

    I followed tpoindex (thank you!) suggestion and modified:

    /etc/init/mountall.conf

    to include:

    mdadm --assemble –scan

    ahead of this line:

    exec mountall --daemon $force_fsck $fsck_fix

    and it WORKED!!

    Try it.

  8. #38
    Join Date
    Feb 2011
    Beans
    2
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Raid array does not auto start/auto mount

    Quote Originally Posted by pitstop2001 View Post
    I followed tpoindex (thank you!) suggestion and modified:

    /etc/init/mountall.conf

    to include:

    mdadm --assemble –scan

    ahead of this line:

    exec mountall --daemon $force_fsck $fsck_fix

    and it WORKED!!

    Try it.
    Yeah that killed my machine. On boot I'd get a blinking cursor. Just having to figure out editing that file to remove the code while booting from disc.
    Seriously thinking of changing OS. I know everyone reading this forum has thought this - how can it be so hard for Ubuntu when it's so easy on Windows.

  9. #39
    Join Date
    Feb 2011
    Beans
    1

    Re: Raid array does not auto start/auto mount

    This worked for me:

    DEVICE /dev/sdb /dev/sdc
    ARRAY /dev/md0 level=raid1 devices=/dev/sdb1,/dev/sdc1

    Note that in the DEVICE line, is sdb and sdc, while in the ARRAY line we have sdb1, sdb2 (ie the physical partition name)

  10. #40
    Join Date
    Nov 2010
    Beans
    103

    Re: Raid array does not auto start/auto mount

    "that was easy"

    so i followed outbreak suggestions to use:

    sudo rm /etc/mdadm/mdadm.conf

    sudo dpkg-reconfigure mdadm

    and it did re-create /etc/mdadm/mdadm.conf

    with this extra parameters that were not in there previously

    ARRAY /dev/md0 level=raid5 num-devices=4 UUID=1cd3c907:5ebd7927:310b5b34:c3d51354


    now after a reboot, the server automatically starts the RAID and mounts it too

Page 4 of 5 FirstFirst ... 2345 LastLast

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
  •