2

I have a 3 drive raid 5 array using the following disks:

  • /dev/sda
  • /dev/sdc
  • /dev/sdb

I'm no longer able to mount the drive with the following error:

sudo mount /dev/md0 /mnt/md0/

mount: wrong fs type, bad option, bad superblock on /dev/md0,
   missing codepage or helper program, or other error

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

In dmesg I see it looks like there are invalid checksums

[ 1062.187295] JBD2: Invalid checksum recovering block 6 in log
[ 1062.199499] JBD2: Invalid checksum recovering block 8 in log
[ 1062.231367] JBD2: Invalid checksum recovering block 12 in log
[ 1062.239753] JBD2: Invalid checksum recovering block 13 in log
[ 1062.272628] JBD2: Invalid checksum recovering block 18 in log
[ 1062.279700] JBD2: Invalid checksum recovering block 19 in log
[ 1062.313132] JBD2: Invalid checksum recovering block 24 in log
[ 1062.344345] JBD2: Invalid checksum recovering block 29 in log
[ 1062.606357] JBD2: Invalid checksum recovering block 50 in log
[ 1062.656566] JBD2: Invalid checksum recovering block 55 in log
[ 1062.831316] JBD2: Invalid checksum recovering block 64 in log
[ 1062.882451] JBD2: Invalid checksum recovering block 68 in log
[ 1062.913100] JBD2: Invalid checksum recovering block 70 in log
[ 1066.094511] JBD2: recovery failed
[ 1066.094516] EXT4-fs (md0): error loading journal

I have checked all of the drives with smartctl with no errors and have tried stopping and scanning the array with mdadm --stop /dev/md0 and mdadm --assemble --scan and am still unable to mount the raid.

However, I'm able to mount my raid in readonly mode. Here is my mdadm config:

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays

# This configuration was auto-generated on Wed, 22 Mar 2017 21:34:32 +0000 by mkconf
ARRAY /dev/md0 metadata=1.2 name=media:0 UUID=7787481f:9713f064:1a49afb2:cc380a8d

and fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/media--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb2 during installation
UUID=51b74a1f-ed14-4fe7-b12c-a0efd2f706e4 /boot           ext2    defaults        0       2
# /boot/efi was on /dev/sdb1 during installation
UUID=A3B3-B410  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/media--vg-swap_1 none            swap    sw              0       0
/dev/md0 /mnt/md0 ext4 defaults,nofail,discard 0 0

cat /proc/mdstat

Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] [raid10]
md0 : active raid5 sda[0] sdd[3] sdc[1]
      3906766848 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      bitmap: 0/15 pages [0KB], 65536KB chunk

unused devices: <none>

How to proceed?

  • Have you run e2fsck? – Hauke Laging Aug 15 '17 at 19:03
3

First of all, mount it read-only and make a backup of your data.

Then run e2fsck on /dev/md0, which should be able to fix the filesystem, but the most recent changes to it are probably lost.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.