NAS520: Restore access to lost volume/disk 1 [SOLVED]

2»

Comments

  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    OK, the raid header of the data partition is where I expected it, and it healthy. That is good news. The raid header of the firmware partition is corrupted. maybe because it has contained an extended partition table, maybe because of the root cause of your problem (Whatever happened before you lost your data array?)

    I prepared a partition table which should fit your disk, which I attached. Unzip it, and put it on your NAS. When you are using Windows, you can use WinSCP for that, and put it in the /tmp/ directory.
    Then execute
    <div>dd if=/tmp/gpt of=/dev/sda</div><div><br></div><div>reboot</div>
    It is possible that after the reboot everything will work, it's also possible that we will have to create new raid arrays for firmware, and maybe also for swap. When
    cat /proc/mdstat
    doesn't show 3 arrays, some extra actions are needed.
  • ariek
    ariek Posts: 30  Freshman Member
    First Comment Fourth Anniversary
    edited November 2019
    /tmp # dd if=/tmp/gpt of=/dev/sda<br>128+0 records in<br>128+0 records out<br>65536 bytes (64.0KB) copied, 4.177463 seconds, 15.3KB/s
    </code><pre class="CodeBlock"><code>&nbsp;cat /proc/mdstat<br>Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]<br>md2 : active raid1 sda3[0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1949383488 blocks super 1.2 [1/1] [U]<br><br>md1 : active raid1 sda2[0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1998784 blocks super 1.2 [2/1] [U_]<br><br>md0 : active raid1 sda1[0]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1997760 blocks super 1.2 [2/1] [U_]<br><br><div>unused devices: <none></div>
    It worked! The NAS finds the internal HDD again. Everything seems normal.
    Thanks a lot! And seriously, where and how can I donate for all the work you have done for me and many others on this and the old forum?

    What did a do? I fixed a 2 USB flash drives, which were totally corrupted. Windows wouldn't recognize the USB Flash drive, or it took over 20+ minutes to recognize it and then immediately (r)ejected them making them totally unusable.
    I was able to rescue the flash drives under Linux on the NAS.
    After a reboot [previous reboots went all fine] of the NAS the internal HDD was no longer recognized. Probably a typo with potentially huge consequences.
  • Mijzelf
    Mijzelf Posts: 2,764  Guru Member
    250 Answers 2500 Comments Friend Collector Seventh Anniversary
    I was able to rescue the flash drives under Linux on the NAS.

    The rescue involved overwriting the partition table and filesystem headers on the flash drives, I presume?

    I wonder if some extra safety could be reached by changing the rights of /dev/sdb (or whatever device node the USB disk has), and do the action as admin.

    where and how can I donate for all the work you have done
    Well, you can't donate to me. But, last weekend I upgraded my router to the latest release(candidate) of OpenWRT, and it worked flawlessly, like always. I though I should give them a donation to keep the servers up. But if you want, you can give them a donation on my behalf.
  • PawelS
    PawelS Posts: 8  Freshman Member
    Hi,
    I have similiar problem, my nas is NAS326, but I suppose it doesn't matter.

    my data:
    ~ # cat /proc/partitions
    major minor  #blocks  name

       7        0     146432 loop0
      31        0       2048 mtdblock0
      31        1       2048 mtdblock1
      31        2      10240 mtdblock2
      31        3      15360 mtdblock3
      31        4     108544 mtdblock4
      31        5      15360 mtdblock5
      31        6     108544 mtdblock6
       8        0  976762584 sda
       8        1    1998848 sda1
       8        2    1999872 sda2
       8        3  972762112 sda3
       8       16  976762584 sdb
       8       17    1998848 sdb1
       8       18    1999872 sdb2
       8       19  972762112 sdb3
       9        0    1997760 md0
       9        1    1998784 md1
       9        2  972630848 md2
       9        3  972630848 md3
     253        0     102400 dm-0
     253        1  972525568 dm-1
     253        2     102400 dm-2
     253        3  972525568 dm-3
    ~ # cat /proc/mdstat
    Personalities : [linear] [raid0] [raid1] [raid6] [raid5] [raid4]
    md3 : active raid1 sda3[0]
          972630848 blocks super 1.2 [1/1] [U]

    md2 : active raid1 sdb3[0]
          972630848 blocks super 1.2 [1/1] [U]

    md1 : active raid1 sda2[0] sdb2[2]
          1998784 blocks super 1.2 [2/2] [UU]

    md0 : active raid1 sda1[0] sdb1[2]
          1997760 blocks super 1.2 [2/2] [UU]

    unused devices: <none>
    ~ # cat /proc/mounts
    rootfs / rootfs rw 0 0
    /proc /proc proc rw,relatime 0 0
    /sys /sys sysfs rw,relatime 0 0
    devpts /dev/pts devpts rw,relatime,mode=600 0 0
    ubi4:ubi_rootfs1 /firmware/mnt/nand ubifs ro,relatime 0 0
    /dev/md0 /firmware/mnt/sysdisk ext4 ro,relatime,data=ordered 0 0
    /dev/loop0 /ram_bin ext2 ro,relatime 0 0
    /dev/loop0 /usr ext2 ro,relatime 0 0
    /dev/loop0 /lib/security ext2 ro,relatime 0 0
    /dev/loop0 /lib/modules ext2 ro,relatime 0 0
    /dev/loop0 /lib/locale ext2 ro,relatime 0 0
    /dev/ram0 /tmp/tmpfs tmpfs rw,relatime,size=5120k 0 0
    /dev/ram0 /usr/local/etc tmpfs rw,relatime,size=5120k 0 0
    ubi2:ubi_config /etc/zyxel ubifs rw,relatime 0 0
    configfs /sys/kernel/config configfs rw,relatime 0 0
    ~ # mdadm --examine /dev/sd[abcd]3
    /dev/sda3:
              Magic : a92b4efc
            Version : 1.2
        Feature Map : 0x0
         Array UUID : 3fa2ac41:656e56d2:686f9f1f:1b51f286
               Name : NAS326:2  (local to host NAS326)
      Creation Time : Mon May 25 03:57:52 2015
         Raid Level : raid1
       Raid Devices : 1

     Avail Dev Size : 1945262080 (927.57 GiB 995.97 GB)
         Array Size : 972630848 (927.57 GiB 995.97 GB)
      Used Dev Size : 1945261696 (927.57 GiB 995.97 GB)
        Data Offset : 262144 sectors
       Super Offset : 8 sectors
              State : clean
        Device UUID : c93ceca9:5ab09837:787ce117:f2a96ff9

        Update Time : Tue Jun 30 17:43:12 2020
           Checksum : 58295563 - correct
             Events : 16


       Device Role : Active device 0
       Array State : A ('A' == active, '.' == missing)
    /dev/sdb3:
              Magic : a92b4efc
            Version : 1.2
        Feature Map : 0x0
         Array UUID : e497df71:99394e60:2cff4d77:9efb710f
               Name : NAS326:3  (local to host NAS326)
      Creation Time : Sun Oct 29 11:58:05 2017
         Raid Level : raid1
       Raid Devices : 1

     Avail Dev Size : 1945262080 (927.57 GiB 995.97 GB)
         Array Size : 972630848 (927.57 GiB 995.97 GB)
      Used Dev Size : 1945261696 (927.57 GiB 995.97 GB)
        Data Offset : 262144 sectors
       Super Offset : 8 sectors
              State : clean
        Device UUID : 67b61188:5f31e662:1f99eab7:9b372964

        Update Time : Tue Jun 30 16:15:22 2020
           Checksum : 104b055f - correct
             Events : 2


       Device Role : Active device 0
       Array State : A ('A' == active, '.' == missing)
    mdadm: cannot open /dev/sdc3: No such device or address
    mdadm: cannot open /dev/sdd3: No such device or address

    What can I do not to lose all data I have on my 2 disks?
    Please help.
    TIA

Consumer Product Help Center