防止文件系统进入只读模式

我发现我的服务器的文件系统不断进入只读模式。 raid1数组有一些问题,但我已经从数组中删除了坏的磁盘。 但是,由于我没有机会去数据中心,所以它仍然是物理上插入系统的,我怀疑udev和系统内核仍在拾取坏盘并抛出错误。 在/ var / log / messages中,有这样的错误:

Mar 2 06:53:14 nocloud kernel: ata1: exception Emask 0x10 SAct 0x0 SErr 0x4010000 action 0xe frozen Mar 2 06:53:14 nocloud kernel: ata1: irq_stat 0x00400040, connection status changed Mar 2 06:53:14 nocloud kernel: ata1: SError: { PHYRdyChg DevExch } Mar 2 06:53:14 nocloud kernel: ata1: hard resetting link Mar 2 06:53:20 nocloud kernel: ata1: link is slow to respond, please be patient (ready=0) Mar 2 06:53:21 nocloud kernel: ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) Mar 2 06:53:21 nocloud kernel: ata1.00: configured for UDMA/133 Mar 2 06:53:21 nocloud kernel: ata1: EH complete 

这种情况在一天中相当随机地发生,直到最终文件系统变为只读。 当发生这种情况时,我的系统变得不可操作,这种方式打败了raid1的目的。 请注意,ata1是坏盘(我认为ata1对应于/ dev / sda,因为它们都是第一个在线)。

在mdadm下,/ dev / sda1,2不再被使用,但是当我不再使用它并抛出这些错误时,我无法阻止系统内核继续查询该磁盘。

有没有办法阻止我的文件系统自动进入只读模式? 此外,这样做是否安全?

提前致谢。

编辑:附加信息:输出从猫/ proc / mdstat

 md1 : active raid1 sdb2[1] 976554876 blocks super 1.1 [2/1] [_U] bitmap: 5/8 pages [20KB], 65536KB chunk md0 : active raid1 sdb1[1] 204788 blocks super 1.0 [2/1] [_U] 

来自安装的输出:

 /dev/mapper/VolGroup-LogVol00 on / type ext4 (rw,noatime) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0") /dev/md0 on /boot type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) 

EDIT2:pvdisplay输出:

 --- Physical volume --- PV Name /dev/md1 VG Name VolGroup PV Size 931.32 GiB / not usable 2.87 MiB Allocatable yes (but full) PE Size 16.00 MiB Total PE 59604 Free PE 0 Allocated PE 59604 

ext3 / 4文件系统(不知道关于ext2)可以被configuration为仅当它们检测到某种forms的错误时才翻转读取,但是通常有类似于“EXT4-fs(sdb1)”的消息:重新装入文件系统只读“在你的日志里发生这种情况。

tune2fs显示你什么? 运行tune2fs -l /dev/md1以列出文件系统的当前值。 设置你的要求是“错误行为”。 tune2fs可以用来改变错误行为,但是你真的应该在第二个驱动器出现问题之前更换驱动器。