Clean, degraded Raid (Mirror)

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • ok, i tried it out:

      Source Code

      1. root@HomeServer:~# mdadm --stop /dev/md127
      2. mdadm: Cannot get exclusive access to /dev/md127:Perhaps a running process, mounted filesystem or active volume group?
      3. root@HomeServer:~# mdadm --assemble --force --verbose /dev/md127 /dev/sd[ab]
      4. mdadm: looking for devices for /dev/md127
      5. mdadm: Cannot assemble mbr metadata on /dev/sda
      6. mdadm: /dev/sda has no superblock - assembly aborted
    • e36Alex wrote:

      ok, i tried it out:
      You need to unmount it again. And if a command fails, don't keep executing the next commands.
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ok, and what is the next now?

      Source Code

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

      e36Alex wrote:

      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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • e36Alex wrote:

      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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • ok - i tried it out - none of the drives are shown:

      Source Code

      1. root@HomeServer:~# mdadm --stop /dev/md127
      2. mdadm: error opening /dev/md127: No such file or directory
      3. root@HomeServer:~# mdadm --zero-superblock /dev/sda
      4. mdadm: Couldn't open /dev/sda for write - not zeroing
      5. root@HomeServer:~# mdadm --assemble /dev/md127 /dev/sd[ab]
      6. mdadm: Cannot assemble mbr metadata on /dev/sda
      7. mdadm: /dev/sda has no superblock - assembly aborted
      8. root@HomeServer:~# cat /proc/mdstat
      9. Personalities : [raid1]
      10. unused devices: <none>
      11. root@HomeServer:~# mdadm --add /dev/md127 /dev/sda
      12. mdadm: error opening /dev/md127: No such file or directory
      13. root@HomeServer:~# cat /proc/mdstat
      14. Personalities : [raid1]
      15. unused devices: <none>
      Display All

      The post was edited 1 time, last by e36Alex ().

    • Source Code

      1. root@HomeServer:~# fdisk -l /dev/sda
      2. Disk /dev/sda: 14,4 GiB, 15502147584 bytes, 30277632 sectors
      3. Units: sectors of 1 * 512 = 512 bytes
      4. Sector size (logical/physical): 512 bytes / 512 bytes
      5. I/O size (minimum/optimal): 512 bytes / 512 bytes
      6. Disklabel type: dos
      7. Disk identifier: 0x29f7a350
      8. Device Boot Start End Sectors Size Id Type
      9. /dev/sda1 * 2048 28944383 28942336 13,8G 83 Linux
      10. /dev/sda2 28946430 30275583 1329154 649M 5 Extended
      11. /dev/sda5 28946432 30275583 1329152 649M 82 Linux swap / Solaris
      Display All
    • Source Code

      1. root@HomeServer:~# fdisk -l
      2. Disk /dev/sda: 14,4 GiB, 15502147584 bytes, 30277632 sectors
      3. Units: sectors of 1 * 512 = 512 bytes
      4. Sector size (logical/physical): 512 bytes / 512 bytes
      5. I/O size (minimum/optimal): 512 bytes / 512 bytes
      6. Disklabel type: dos
      7. Disk identifier: 0x29f7a350
      8. Device Boot Start End Sectors Size Id Type
      9. /dev/sda1 * 2048 28944383 28942336 13,8G 83 Linux
      10. /dev/sda2 28946430 30275583 1329154 649M 5 Extended
      11. /dev/sda5 28946432 30275583 1329152 649M 82 Linux swap / Solaris
      12. Disk /dev/sdb: 2,7 TiB, 3000592982016 bytes, 5860533168 sectors
      13. Units: sectors of 1 * 512 = 512 bytes
      14. Sector size (logical/physical): 512 bytes / 4096 bytes
      15. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      16. Disk /dev/sdc: 2,7 TiB, 3000592982016 bytes, 5860533168 sectors
      17. Units: sectors of 1 * 512 = 512 bytes
      18. Sector size (logical/physical): 512 bytes / 4096 bytes
      19. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      20. Disk /dev/sdd: 465,8 GiB, 500107862016 bytes, 976773168 sectors
      21. Units: sectors of 1 * 512 = 512 bytes
      22. Sector size (logical/physical): 512 bytes / 512 bytes
      23. I/O size (minimum/optimal): 512 bytes / 512 bytes
      24. Disklabel type: gpt
      25. Disk identifier: 299B3748-BD6B-448D-A68E-878B393378A4
      26. Device Start End Sectors Size Type
      27. /dev/sdd1 2048 976773134 976771087 465,8G Linux filesystem
      Display All
      so it is sdd1?

      Source Code

      1. root@HomeServer:~# fdisk -l /dev/sdd1
      2. Disk /dev/sdd1: 465,8 GiB, 500106796544 bytes, 976771087 sectors
      3. Units: sectors of 1 * 512 = 512 bytes
      4. Sector size (logical/physical): 512 bytes / 512 bytes
      5. 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      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:

      Source Code

      1. root@HomeServer:~# mdadm --assemble --force --verbose /dev/md127 /dev/sd[bc]
      2. mdadm: looking for devices for /dev/md127
      3. mdadm: /dev/sdb is identified as a member of /dev/md127, slot 0.
      4. mdadm: /dev/sdc is identified as a member of /dev/md127, slot 1.
      5. mdadm: added /dev/sdc to /dev/md127 as 1 (possibly out of date)
      6. mdadm: added /dev/sdb to /dev/md127 as 0
      7. mdadm: /dev/md127 has been started with 1 drive (out of 2).
      8. root@HomeServer:~# cat /proc/mdstat
      9. Personalities : [raid1]
      10. md127 : active raid1 sdb[2]
      11. 2930135488 blocks super 1.2 [2/1] [U_]
      12. bitmap: 7/22 pages [28KB], 65536KB chunk
      13. unused devices: <none>
      Display All
    • 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 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.1
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • seems like its working.....

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

      Brainfuck Source Code

      1. root@HomeServer:~# cat /proc/mdstat
      2. Personalities : [raid1]
      3. md127 : active raid1 sdc[3] sdb[2]
      4. 2930135488 blocks super 1.2 [2/1] [U_]
      5. [>....................] recovery = 0.6% (19746304/2930135488) finish=300.5min speed=161367K/sec
      6. bitmap: 6/22 pages [24KB], 65536KB chunk
      7. unused devices: <none>