RAID1 Creating Failed Try to Recover My data

    • OMV 2.x
    • RAID1 Creating Failed Try to Recover My data

      Hi,

      I tried to creat a RAID1 with 2x3TB TOSHIBA Disks following the thread:Create RAID 1 with existing Data Disk. But i did it very wrong and result the RAID not usable.
      Before begining there was nearly 3TB data in /dev/sdc1. Disk /dev/sdb is clean and empty.
      [*]I put the following code in my terminal

      Source Code

      1. 1.mdadm --create /dev/md0 -l 1 -n 2 /dev/sdc1 missing
      [*]Then I went to the webUI and did the RAID recovery in RAID Management page and added my /dev/sdb to the RAID.
      [*]The RAID Management page is like this:
      [/list] [IMG:http://www.z4a.net/images/2016/07/22/1.png]File Systems page is like this:
      [IMG:http://www.z4a.net/images/2016/07/22/2.png]
      Here is the content of "fdisk -l" command:

      Source Code

      1. WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn 't support GPT. Use GNU Parted.
      2. Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes
      3. 256 heads, 63 sectors/track, 363376 cylinders, total 5860533168 sectors
      4. Units = sectors of 1 * 512 = 512 bytes
      5. Sector size (logical/physical): 512 bytes / 4096 bytes
      6. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      7. Disk identifier: 0x00000000
      8. Device Boot Start End Blocks Id System
      9. /dev/sdc1 1 4294967295 2147483647+ ee GPT
      10. Partition 1 does not start on physical sector boundary.
      11. Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes
      12. 255 heads, 63 sectors/track, 364801 cylinders, total 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 identifier: 0x00000000
      17. Disk /dev/sdb doesn't contain a valid partition table
      18. WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn 't support GPT. Use GNU Parted.
      19. Disk /dev/sda: 750.2 GB, 750156374016 bytes
      20. 256 heads, 63 sectors/track, 90845 cylinders, total 1465149168 sectors
      21. Units = sectors of 1 * 512 = 512 bytes
      22. Sector size (logical/physical): 512 bytes / 4096 bytes
      23. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      24. Disk identifier: 0x00000000
      25. Device Boot Start End Blocks Id System
      26. /dev/sda1 1 1465149167 732574583+ ee GPT
      27. Partition 1 does not start on physical sector boundary.
      28. Disk /dev/sdd: 8004 MB, 8004304896 bytes
      29. 255 heads, 63 sectors/track, 973 cylinders, total 15633408 sectors
      30. Units = sectors of 1 * 512 = 512 bytes
      31. Sector size (logical/physical): 512 bytes / 512 bytes
      32. I/O size (minimum/optimal): 512 bytes / 512 bytes
      33. Disk identifier: 0x000206c3
      34. Device Boot Start End Blocks Id System
      35. /dev/sdd1 * 63 14892254 7446096 83 Linux
      36. /dev/sdd2 14892255 15631244 369495 5 Extended
      37. /dev/sdd5 14892318 15631244 369463+ 82 Linux swap / Solaris
      38. Disk /dev/md0: 3000.5 GB, 3000457494528 bytes
      39. 2 heads, 4 sectors/track, 732533568 cylinders, total 5860268544 sectors
      40. Units = sectors of 1 * 512 = 512 bytes
      41. Sector size (logical/physical): 512 bytes / 4096 bytes
      42. I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      43. Disk identifier: 0x00000000
      44. Disk /dev/md0 doesn't contain a valid partition table
      Display All

      - cat /proc/mdstat

      Source Code

      1. Personalities : [raid1]
      2. md0 : active (auto-read-only) raid1 sdc1[0] sdb[2]
      3. 2930134272 blocks super 1.2 [2/2] [UU]
      4. unused devices: <none>

      - blkid

      Source Code

      1. /dev/sdc1: UUID="8175c72b-7da2-4ccf-9b95-8a3f26bb52a2" TYPE="ext4"
      2. /dev/sdb: UUID="b915cc8f-93d6-ff9f-21cb-f7495761916b" UUID_SUB="73d7f293-592d-5db4-9464-8ebbf50b327a" LABEL="IMBANAS:0" TYPE="linux_raid_member"
      3. /dev/sda1: LABEL="750G" UUID="3f9526f3-a330-4fb8-91cb-615337abec99" TYPE="ext4"
      4. /dev/sdd1: UUID="aa958ab5-8d06-4e76-9e91-1f3c78184df5" TYPE="ext4"
      5. /dev/sdd5: UUID="21e823be-b409-4030-b7e9-2383e6e1fe6d" TYPE="swap"

      Now the RAID cannot be used and I can't get access to my data. I need to recover the data can anybody help me.

      Thanks!
      [list]


      [/list]
    • Try (as root):
      mdadm --readwrite /dev/md0
      mount -a

      You really should have a backup since raid is not a backup...
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • You didn't have that in your post. So, I thought it was worth a shot. I will mention using the create flag like you did is very dangerous. I would boot the system with systemrescuecd because it has newer raid utility versions.
      omv 4.1.13 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:

      You didn't have that in your post. So, I thought it was worth a shot. I will mention using the create flag like you did is very dangerous. I would boot the system with systemrescuecd because it has newer raid utility versions.

      Finally, I get my data back. I tried all kind of ways to recover my data but none of them worked. The Testdisk software failed to recover my data and end up showing me some meaningless numbers. At last, I solved my idiot problem with a idiot way. Surprisingly, it worked
      .
      First I did this:

      Source Code

      1. mdadm -S /dev/md0


      then i tried to mount /dev/sdc1 but failed which is already known before.
      and i made a really stuip move using fsck and it worked like magic then i just mounted /dev/sdc1 and now i am copying all the data out from my disk.

      Source Code

      1. fsck.ext4 /dev/sdc1

      Thank you very much for helping me with my problem. Your help really encouraged me.