Clean, degraded Raid (Mirror)

  • ok, i tried it out:

    Code
    root@HomeServer:~# mdadm --stop /dev/md127
    mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
    root@HomeServer:~# mdadm --assemble --force --verbose /dev/md127 /dev/sd[ab]
    mdadm: looking for devices for /dev/md127
    mdadm: Cannot assemble mbr metadata on /dev/sda
    mdadm: /dev/sda has no superblock - assembly aborted
  • ok, i tried it out:

    You need to unmount it again. And if a command fails, don't keep executing the next commands.

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • ok, and what is the next now?


    Code
    root@HomeServer:~# umount /dev/md127
    root@HomeServer:~# mdadm --stop /dev/md127
    mdadm: stopped /dev/md127
    root@HomeServer:~# mdadm --assemble --force --verbose /dev/md127 /dev/sd[ab]
    mdadm: looking for devices for /dev/md127
    mdadm: Cannot assemble mbr metadata on /dev/sda
    mdadm: /dev/sda has no superblock - assembly aborted
  • And this situation is why I hate posting on raid threads...


    now my raid isnt shown ........

    That is because it isn't assembled which means it can't be mounted. And you really don't want it mounted until it is fixed.


    The following may not work - hope you have a backup:


    # stop command will probably fail since it isn't assembled but doesn't hurt
    mdadm --stop /dev/md127


    # very destructive but the mirror image should still be on /dev/sdb
    mdadm --zero-superblock /dev/sda


    # should assemble degraded but may bring sda in - hard to say
    mdadm --assemble /dev/md127 /dev/sd[ab]


    # if both drives are in cat /proc/mdstat, the next command won't be necessary
    mdadm --add /dev/md127 /dev/sda


    # if that works, keep checking cat /proc/mdstat until it is finished. Then you can mount the array
    mount -a

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • oh... ok............


    after the first command i get this - should i wait until it is assembled or should i go on with the next command?


    Code
    root@HomeServer:~# mdadm --stop /dev/md127
    mdadm: error opening /dev/md127: No such file or directory
  • after the first command i get this - should i wait until it is assembled or should i go on with the next command?

    Move on to the next command. That is why I mentioned it would probably fail which is fine.

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • ok - i tried it out - none of the drives are shown:


  • Looks like /dev/sda isn't happy. What is the output of: fdisk -l /dev/sda

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Your drive letters must have changed. sda is your OS drive. What is the output of: fdisk -l

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • so it is sdd1?


    Code
    root@HomeServer:~# fdisk -l /dev/sdd1
    Disk /dev/sdd1: 465,8 GiB, 500106796544 bytes, 976771087 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
  • sdb and sdc are the same size. So, I assume those are two drives that were mirrored. What is the current output of: cat /proc/mdstat

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • mdadm --assemble --force --verbose /dev/md127 /dev/sd[bc]
    cat /proc/mdstat

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • great! the raid is back again..... until a few seconds ago, i was a kind of nervous... thank you!


    but it is still degraded:


  • You could try zeroing the superblock on sdc and then add it to the array.


    mdadm --zero-superblock /dev/sdc
    mdadm --add /dev/md127 /dev/sdc
    cat /proc/mdstat

    omv 5.6.18 usul | 64 bit | 5.11 proxmox kernel | omvextrasorg 5.6.3 | kvm plugin 5.1.7
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • seems like its working.....


    great! thank you very, very much! especially for beeing so patient...!


    Code
    root@HomeServer:~# cat /proc/mdstat
    Personalities : [raid1]
    md127 : active raid1 sdc[3] sdb[2]
    2930135488 blocks super 1.2 [2/1] [U_]
    [>....................] recovery = 0.6% (19746304/2930135488) finish=300.5min speed=161367K/sec
    bitmap: 6/22 pages [24KB], 65536KB chunk
    unused devices: <none>
  • Hi all,
    I have a similar problem - my RAID1 is suddenly not showing up, so here is what I did:

    Code
    root@nas:~# mdadm --assemble /dev/md127 /dev/sd[ab]1
    mdadm: ignoring /dev/sdb1 as it reports /dev/sda1 as failed
    mdadm: /dev/md127 has been started with 1 drive (out of 2).


    sdb1 is definitely not failed (i.e. sdb2 is working fine as standalone partition) ... what can I do to add sdb1 again without having to rebuid the whole thing which takes forever?

  • Hello all,
    I'm having the same problem. I figured out that the reason I could'n unmount md127 was DLNA service, so I stopped it and I could unmount the disk.


    I hope it helps someone...


    On the other hand, @ryecoaaron suggested:


    Quote

    # very destructive but the mirror image should still be on /dev/sdb


    mdadm --zero-superblock /dev/sda

    so, as far as I know, that command delete all sda data. And data will be recover from the other disk (mirror).


    In my case I have to delete sdc because mdadm says it is "posibly out of date". Am I right?


    Code
    #mdadm --assemble --verbose /dev/md127 /dev/sd[bc]
    mdadm: looking for devices for /dev/md127
    mdadm: /dev/sdb is identified as a member of /dev/md127, slot 0.
    mdadm: /dev/sdc is identified as a member of /dev/md127, slot 1.
    mdadm: added /dev/sdc to /dev/md127 as 1 (possibly out of date)
    mdadm: added /dev/sdb to /dev/md127 as 0
    mdadm: /dev/md127 has been started with 1 drive (out of 2).

    Thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!