1

I've got an mITX nas running Arch with a Raid5 mdadm softraid. Lasttime it booted correctly

Aug 19 11:30:21 nas kernel: md/raid:md127: device sdc1 operational as raid disk 1
Aug 19 11:30:21 nas kernel: md/raid:md127: device sdd1 operational as raid disk 2
Aug 19 11:30:21 nas kernel: md/raid:md127: device sda1 operational as raid disk 0
Aug 19 11:30:21 nas kernel: md/raid:md127: raid level 5 active with 3 out of 4 devices, algorithm 2
Aug 19 11:30:21 nas kernel: md127: detected capacity change from 0 to 5648992960512
Aug 19 11:30:21 nas systemd[1]: Found device /dev/md127.
Aug 19 11:30:21 nas kernel: EXT4-fs (md127): mounted filesystem with ordered data mode. Opts: (null)
Aug 31 04:07:35 nas kernel: md/raid:md127: read error not correctable (sector 3546939392 on sda1).
Aug 31 04:07:35 nas kernel: md/raid:md127: read error not correctable (sector 3546939400 on sda1).

Errors started showing and playback of video had issues. Apparently my power supply had a loose connection, resulting in EXT4-fs (md127): Delayed block allocation failed for inode 159647386 at logical offset 129152 with max blocks 128 with error 117 After I've soldered the connection, the raid5 /dev/md127 couldn't be mounted.

[user@nas mdadmtests]$ sudo mount -av 
/  : ignored
mount: /mnt/raid5: wrong fs type, bad option, bad superblock on /dev/md127, missing codepage or helper program, or other error.
none  : ignored

Some info: Drives are in Spare mode?

[user@nas mdadmtests]$ cat /proc/mdstat 
Personalities : 
md127 : inactive sdd1[3](S) sdc1[1](S) sdf1[4](S) sda1[0](S)
      7355461072 blocks super 1.0

unused devices: <none>

examing each drive, notice low event count on /dev/sdf1

/dev/sda1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x9
     Array UUID : a1498410:d13b2b4a:63379f8d:c821173f
           Name : fileserver:127
  Creation Time : Mon Jan 19 15:35:41 2015
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730536 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : 0e56183d:0c49cf03:e3429b77:e1f718e7

Internal Bitmap : -16 sectors from superblock
    Update Time : Sun Sep  3 02:44:36 2017
  Bad Block Log : 512 entries available at offset -8 sectors - bad blocks present.
       Checksum : 4ea92cdf - correct
         Events : 1931038

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAA. ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x1
     Array UUID : a1498410:d13b2b4a:63379f8d:c821173f
           Name : fileserver:127
  Creation Time : Mon Jan 19 15:35:41 2015
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730536 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : 472f7a29:679e1f18:87ee0d4c:88b2a62b

Internal Bitmap : -16 sectors from superblock
    Update Time : Sun Sep  3 08:57:12 2017
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 685d1908 - correct
         Events : 1931038

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : .AA. ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x1
     Array UUID : a1498410:d13b2b4a:63379f8d:c821173f
           Name : fileserver:127
  Creation Time : Mon Jan 19 15:35:41 2015
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730536 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : 7d61bcf5:ff6f3213:bb4518c6:d067fadd

Internal Bitmap : -16 sectors from superblock
    Update Time : Sun Sep  3 08:57:12 2017
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 5c102956 - correct
         Events : 1931038

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : .AA. ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdf1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x1
     Array UUID : a1498410:d13b2b4a:63379f8d:c821173f
           Name : fileserver:127
  Creation Time : Mon Jan 19 15:35:41 2015
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730536 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : 061c45a0:0017e14f:6d0bb9a9:d8beeb91

Internal Bitmap : -16 sectors from superblock
    Update Time : Fri Apr 29 12:27:54 2016
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : d831f3b0 - correct
         Events : 13259

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing

For easy diff between 4 drives, check this image. https://imgur.com/a/4n3HM

Should I use mdadm --assemble -force --scan /dev/md127 /dev/sd[acdf]1? Help is much appreciated. Thanks in advance!

Edit

So, still not sure what to do here. Tried to recreate the raid.

[root@nas ~]# mdadm --create /dev/md127 --metadata 1.2 --level=5 --raid-devices=4 --chunk=512 --layout=left-symmetric /dev/sda1 /dev/sdc1 /dev/sdd1 missing                                   
mdadm: /dev/sda1 appears to contain an ext2fs file system                                       
       size=5516594688K  mtime=Sat Sep  2 14:22:17 2017                                         
mdadm: /dev/sda1 appears to be part of a raid array:                                            
       level=raid5 devices=4 ctime=Mon Jan 19 15:35:41 2015                                     
mdadm: /dev/sdc1 appears to be part of a raid array:                                            
       level=raid5 devices=4 ctime=Mon Jan 19 15:35:41 2015                                     
mdadm: /dev/sdd1 appears to be part of a raid array:                                            
       level=raid5 devices=4 ctime=Mon Jan 19 15:35:41 2015                                     
Continue creating array? n                      
mdadm: create aborted.

I'm pretty sure I did create an ext4 filesystem, not ext2.

Edit 20180429

Decided I'd give this another shot. But after such along time some things have changed and I honestly cannot remember what I've done to the raid.
Maybe I just make a new post alltogether. I'll add the current situation first. Here we go.

[user@nas ~]$ cat /proc/mdstat 
Personalities : 
md127 : inactive sdb1[1](S) sda1[0](S)
      3677730784 blocks super 1.0

unused devices: <none>

A new examine of each drive:

/dev/sda1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x1
     Array UUID : 71da073c:d1928293:6947fa19:92d8a7bd
           Name : taknas:127  (local to host taknas)
  Creation Time : Sun Dec 10 23:26:56 2017
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730784 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : ebd3b12c:975c1a0b:4653f1ed:e9788e37

Internal Bitmap : -16 sectors from superblock
    Update Time : Mon Dec 18 11:48:12 2017
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 931a5e9d - correct
         Events : 1

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AA.. ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x1
     Array UUID : 71da073c:d1928293:6947fa19:92d8a7bd
           Name : taknas:127  (local to host taknas)
  Creation Time : Sun Dec 10 23:26:56 2017
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730784 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : e1fdc3d2:b0f117a5:11856184:17db9522

Internal Bitmap : -16 sectors from superblock
    Update Time : Mon Dec 18 11:48:12 2017
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 54a1b1a7 - correct
         Events : 1

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : AA.. ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x1
     Array UUID : a1498410:d13b2b4a:63379f8d:c821173f
           Name : fileserver:127
  Creation Time : Mon Jan 19 15:35:41 2015
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3677730536 (1753.68 GiB 1883.00 GB)
     Array Size : 5516594688 (5261.03 GiB 5648.99 GB)
  Used Dev Size : 3677729792 (1753.68 GiB 1883.00 GB)
   Super Offset : 3677730800 sectors
   Unused Space : before=0 sectors, after=992 sectors
          State : clean
    Device UUID : 472f7a29:679e1f18:87ee0d4c:88b2a62b

Internal Bitmap : -16 sectors from superblock
    Update Time : Sun Dec 10 21:09:34 2017
  Bad Block Log : 512 entries available at offset -8 sectors
       Checksum : 68dd142f - correct
         Events : 1934728

         Layout : left-symmetric
     Chunk Size : 512K

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

Looks like I've created a new raid and sdc1 wasn't included.
Any chance I can repair my previous raid5 and save the data that's stored on it?
Originally it was created with

root# mdadm --create --metadata=1.0 --verbose /dev/md127 --chunk=512 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1
  • 1
    Have you run e2fsck -n /dev/md127? – Hauke Laging Sep 9 '17 at 22:56
  • 1
    @Hauke Not specifically, but like all others, it cannot read superblock(s). – nieweling Sep 10 '17 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.