0

I get a new customer with a failed old server (it does not boot anymore because of a failed CPU).

Unfortunately the customer does not have a backup and I am trying to recover data from the hard drives (the server has 2 x SATA hard drives with 2 x software RAID1 volumes).

I connected the hard drives with an USB adapter and I can see the RAID volumes:

root@sysresccd /root % fdisk -l /dev/sdd
Disk /dev/sdd: 149.1 GiB, 160041009152 bytes, 312580096 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
Disklabel type: dos
Disk identifier: 0x00058ff6

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdd1  *         2048 310484991 310482944 148.1G fd Linux raid autodetect
/dev/sdd2       310487038 312580095   2093058  1022M  5 Extended
/dev/sdd5       310487040 312580095   2093056  1022M fd Linux raid autodetect

The RAID volumes are automatically discovered:

root@sysresccd /root % mdadm -E --scan
ARRAY /dev/md/0  metadata=1.2 UUID=eb090ee2:954e393d:b4575a0a:9b185fd2 name=data:0
ARRAY /dev/md/1  metadata=1.2 UUID=5417558e:46ab5709:79d76af5:567916e7 name=data:1

and they seems to be good:

root@sysresccd /root % mdadm --examine /dev/sdd1
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : eb090ee2:954e393d:b4575a0a:9b185fd2
           Name : Erredieci:0
  Creation Time : Fri Apr 12 11:35:10 2013
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 310220800 (147.92 GiB 158.83 GB)
     Array Size : 155110272 (147.92 GiB 158.83 GB)
  Used Dev Size : 310220544 (147.92 GiB 158.83 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262064 sectors, after=256 sectors
          State : clean
    Device UUID : 82a2f3b0:f94bbb41:c5d52ae6:6b6d27e1

    Update Time : Mon Mar 19 19:41:36 2018
       Checksum : f90e94f7 - correct
         Events : 574


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

root@sysresccd /root % mdadm --examine /dev/sdd5
/dev/sdd5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 5417558e:46ab5709:79d76af5:567916e7
           Name : Erredieci:1
  Creation Time : Fri Apr 12 11:36:28 2013
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 2092032 (1021.50 MiB 1071.12 MB)
     Array Size : 1045952 (1021.44 MiB 1071.05 MB)
  Used Dev Size : 2091904 (1021.44 MiB 1071.05 MB)
    Data Offset : 1024 sectors
   Super Offset : 8 sectors
   Unused Space : before=944 sectors, after=128 sectors
          State : clean
    Device UUID : bd9f0ff3:8d373ef1:95a2bfc0:1e2a7c7d

    Update Time : Mon Mar 19 18:06:16 2018
       Checksum : b505e632 - correct
         Events : 22


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

The RAID volumes are mounted as /dev/md126 and /dev/md127:

root@sysresccd /root % ls -l /dev/md/
total 0
lrwxrwxrwx 1 root root 8 Apr 28 19:46 data:0 -> ../md126
lrwxrwxrwx 1 root root 8 Apr 28 18:35 data:1 -> ../md127

The big problem is that I cannot mount any volume:

root@sysresccd /root % mount /dev/md126 /mnt/usb  
mount: /dev/md126: can't read superblock
root@sysresccd /root % mount /dev/md127 /mnt/usb
mount: /dev/md127: can't read superblock

I know that the file system on the RAID volumes should be ReiserFS, but unfortunately I cannot have the confirmation about this:

root@sysresccd /root % tune2fs -l /dev/md126    
tune2fs 1.43.3 (04-Sep-2016)
tune2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/md126
Couldn't find valid filesystem superblock.
root@sysresccd /root % tune2fs -l /dev/md127
tune2fs 1.43.3 (04-Sep-2016)
tune2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/md127
Couldn't find valid filesystem superblock.

I tried to fix the file system recreating the superblock, with no luck:

root@sysresccd /root % fsck.reiser4 /dev/md126
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/md126 block device.                                                                                  
Will check the consistency of the Reiser4 SuperBlock.                                                                 
Will check the consistency of the Reiser4 FileSystem.                                                                 
Continue?                                                                                                             
(Yes/No): Yes
***** fsck.reiser4 started at Sat Apr 28 20:17:14 2018
Fatal: Can't read master super block.                                                                                 
Fatal: Failed to open the reiser4 backup.                                                                             
Fatal: Cannot open the FileSystem on (/dev/md126).                                                                    

1 fatal corruptions were detected in SuperBlock. Run with --build-sb option to fix them.

root@sysresccd /root % fsck.reiser4 --build-sb /dev/md126
*******************************************************************
This is an EXPERIMENTAL version of fsck.reiser4. Read README first.
*******************************************************************

Fscking the /dev/md126 block device.                                                                                  
Will build the Reiser4 SuperBlock.                                                                                    
Will check the consistency of the Reiser4 FileSystem.                                                                 
Continue?                                                                                                             
(Yes/No): Yes
***** fsck.reiser4 started at Sat Apr 28 20:17:22 2018
Fatal: Can't read master super block.                                                                                 
Master super block cannot be found on (/dev/md126). Do you want to build a new one?                                   
(Yes/No): Yes
Which block size do you use? [4096]: 
Warn : A new master superblock is created on '/dev/md126'.                                                            
Error: Can't read format40 super block. Input/output error.                                                           
Fatal: Can't open disk-format format40.                                                                               
Enter the key plugin name [key_large]: 
Enter the correct block count please [38777568]: 
Warn : The format 'format40' is created on '/dev/md126'.                                                              
Fatal: Can't read status block.                                                                                       
Warn : Creating a new status block.                                                                                   
Error: Can't read bitmap block 18. Input/output error.                                                                
Error: Can't load ondisk bitmap.                                                                                      
Error: Can't initialize block allocator.                                                                              
Fatal: Failed to open the block allocator.                                                                            
Fatal: Cannot synchronize file "/dev/md126"                                                                           

Operational error occurred while fscking.

The strange thing is that I am getting the same results on both hard drives.

So I tried to use ddrescue to dump /dev/md126 to a new partition:

root@sysresccd /root % ddrescue --force /dev/md126 /dev/sde1 ddrescue.log

it finished without any errors, but I cannot mount it:

root@sysresccd /root % mount -t reiserfs /dev/sde1 /mnt/usb
mount: wrong fs type, bad option, bad superblock on /dev/sde1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

and it is not recognised and a good partition:

root@sysresccd /root % file -s /dev/sde1                   
/dev/sde1: data

Could you help me please?

Do you have any idea about how I can recover my customer's data?

Thanks!

Mat
  • 1,873
  • 7
  • 25
  • 41
  • Please run `file -s /dev/md126 /dev/md127` and post the output. Also please post the messages which have certainly appeared in `dmesg` by now. – Michael Hampton Apr 28 '18 at 20:57
  • root@sysresccd /root % file -s /dev/md126 /dev/md127 /dev/md126: ERROR: cannot read `/dev/md126' (Input/output error) /dev/md127: ERROR: cannot read `/dev/md127' (Input/output error) – Mat Apr 28 '18 at 20:59

0 Answers0