无法安装 raid 5 阵列 (mdadm),没有驱动器错误

无法安装 raid 5 阵列 (mdadm),没有驱动器错误

我有一个使用以下磁盘的 3 驱动器 raid 5 阵列:

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

我无法再安装驱动器并出现以下错误:

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.

在 dmesg 中,我看到似乎有无效的校验和

[ 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

我已经检查了所有驱动器,smartctl没有任何错误,并尝试使用 和 停止和扫描阵列,mdadm --stop /dev/md0mdadm --assemble --scan仍然无法安装 raid。

但是,我可以以只读模式安装我的突袭。这是我的 mdadm 配置:

# 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

和 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>

如何进行?

答案1

首先,将其安装为只读并备份数据。

然后运行e2fsck​​on /dev/md0,这应该能够修复文件系统,但最近的更改可能会丢失。

相关内容