CrowGargoyle
Posts: 2
Joined: Sun Jul 14, 2019 3:59 pm

Need help recovering data from RAID array.

Sun Jul 14, 2019 4:29 pm

Thank you for taking a moment to read this.

So, Just to see if I could do it and how well it would work, I installed Ubuntu Mate on my Raspberry Pi 3B+ and set it up as a SAMBA server using four 1TB external HDDs via a USB hub. It was actually working quite well, but I ran into a snag.

Suddenly, I was getting partial files. Quite literally showing part of a JPG or TIF file, sometimes being able to display part of an MP4 or MOV file etc. Can anybody point me at a tool that will work to recover the data, either in place or to a separate HDD/array, or otherwise help me figure out what to do here? I'm frankly getting nowhere with it and could really use some help. I'll happily provide whatever logs would help in this.

Thanks for your time.

LTolledo
Posts: 1963
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Need help recovering data from RAID array.

Sun Jul 14, 2019 9:50 pm

is your RAID configuration RAID0 (same as spanned volumes), RAID1 (mirrored volumes), or other RAID configuration?

hope your RAID installation is just a mock up test and your data has backup somewhere else, or you only used the RAID for non-critical data

the same thing happened to me a few years back, when I attempted to do RAID1 on a RPi3B, using 2 x 16GB flash drives plugged directly to the USB port.
was working well, then after a few days ran into a "snag" just like you did. My test data was getting "destroyed".
as the data in the RAID was non-critical (had a copy somewhere else), I "fully destroyed" the RAID1.
and abandoned the idea of doing RAID1 in RPi (or other SBC for that matter)

nowadays am using "timed mirroring" of two drives, using rsync and cron, and having a peace of mind.

going back to data recovery
for RAID0, it may be extremely difficult (if not impossible)
for RAID1, check which drive among the two is still OK, and (the way I did it was) connect it to a winpc, installed a data recovery software (paid license) and do the data recovery on the winPC
took me a whole week to scan and recover 98% of the data from one of the 2TB HDD of my RAID1 NAS which failed a few years back.
for other RAID configurations, not made one (yet), so no info from my part.

the failure of my RAID1 NAS taught me the importance of doing data backups,
nowadays my RAID1 is mirrored to another drive using the "timed mirroring" method.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

CrowGargoyle
Posts: 2
Joined: Sun Jul 14, 2019 3:59 pm

Re: Need help recovering data from RAID array.

Mon Jul 15, 2019 2:49 pm

In my less than infinite wisdom, I decided to go with RAID5. I figured at the time that the parity would save me if I had a drive go bad. To complicate things, I didn't think to format the various drives to all be on the same standard, so I have a mix of things, including FAT32, NTFS, and EXT3.

Well, at this point, I'm pretty sure that I do in fact have a bad drive, or at least an array that's assembled out of order, but I'm not sure how to do anything about it. Especially because mdadm shows all of the drives as clean and visible to one another.

Code: Select all

michael@michael-desktop:~$ sudo mdadm -E /dev/sda1
/dev/sda1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 14a85857:4324e6dd:2ec055f6:a47f12ce
           Name : michael-desktop:0  (local to host michael-desktop)
  Creation Time : Sun Jan 14 14:20:53 2018
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 1953191936 (931.35 GiB 1000.03 GB)
     Array Size : 2929787904 (2794.06 GiB 3000.10 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : clean
    Device UUID : 1d91a2c7:b67908e0:a62f4d69:fc7662dd

Internal Bitmap : 8 sectors from superblock
    Update Time : Sun Jul 14 09:46:48 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 6d0ad730 - correct
         Events : 15818

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
michael@michael-desktop:~$ sudo mdadm -E /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 14a85857:4324e6dd:2ec055f6:a47f12ce
           Name : michael-desktop:0  (local to host michael-desktop)
  Creation Time : Sun Jan 14 14:20:53 2018
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 1953191936 (931.35 GiB 1000.03 GB)
     Array Size : 2929787904 (2794.06 GiB 3000.10 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=0 sectors
          State : clean
    Device UUID : 5a82f3c3:62b99b67:ed46558a:0fce0724

Internal Bitmap : 8 sectors from superblock
    Update Time : Sun Jul 14 09:46:48 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 589c7671 - correct
         Events : 15818

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
michael@michael-desktop:~$ sudo mdadm -E /dev/sdc1
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 14a85857:4324e6dd:2ec055f6:a47f12ce
           Name : michael-desktop:0  (local to host michael-desktop)
  Creation Time : Sun Jan 14 14:20:53 2018
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 1953193951 (931.36 GiB 1000.04 GB)
     Array Size : 2929787904 (2794.06 GiB 3000.10 GB)
  Used Dev Size : 1953191936 (931.35 GiB 1000.03 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=2015 sectors
          State : clean
    Device UUID : 8132931e:93f6ba0b:808f822b:47f26bfb

Internal Bitmap : 8 sectors from superblock
    Update Time : Sun Jul 14 09:46:48 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : cfecd876 - correct
         Events : 15818

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
michael@michael-desktop:~$ sudo mdadm -E /dev/sdd1
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 14a85857:4324e6dd:2ec055f6:a47f12ce
           Name : michael-desktop:0  (local to host michael-desktop)
  Creation Time : Sun Jan 14 14:20:53 2018
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 1953255424 (931.38 GiB 1000.07 GB)
     Array Size : 2929787904 (2794.06 GiB 3000.10 GB)
  Used Dev Size : 1953191936 (931.35 GiB 1000.03 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=63488 sectors
          State : clean
    Device UUID : 0424cb3b:e7470497:79c8191a:35e96208

Internal Bitmap : 8 sectors from superblock
    Update Time : Sun Jul 14 09:46:48 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 73fd3b53 - correct
         Events : 15818

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
michael@michael-desktop:~$ 

Andyroo

Re: Need help recovering data from RAID array.

Mon Jul 15, 2019 5:41 pm

Send it to a pro recovery company - I've seen lots of lost data over the years from folk 'trying' to recover bits :cry:

BespokeTech
Posts: 71
Joined: Thu Apr 04, 2019 8:14 pm

Re: Need help recovering data from RAID array.

Mon Jul 15, 2019 10:30 pm

I recommend that you try R-Studio, it’s commercial software but I think they have a trial available. It specifically supports raid recovery on multiple file system types. The full version is pretty cheap as well.

https://www.r-studio.com/

Return to “Advanced users”