我用以下命令创建了一个新的md数组:
mdadm --create /dev/md1 -l 1 -n 2 /dev/sd[ed]1
但是现在/proc/mdstat
将数组显示为“自动只读”,并带有resync = PENDING:
~ # cat /proc/mdstat
Personalities : [raid1]
md1 : active (auto-read-only) raid1 sde1[1] sdd1[0]
976630336 blocks super 1.2 [2/2] [UU]
resync=PENDING
md0 : active raid1 sdb1[0] sdc1[1]
1953511936 blocks [2/2] [UU]
unused devices: <none>
根据此网站,我可以通过以下方法解决此问题:
mdadm --readwrite /dev/md1
那确实可行:
~ # mdadm --readwrite /dev/md1
~ # cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sde1[1] sdd1[0]
976630336 blocks super 1.2 [2/2] [UU]
[>....................] resync = 0.0% (54400/976630336) finish=598.2min speed=27200K/sec
md0 : active raid1 sdb1[0] sdc1[1]
1953511936 blocks [2/2] [UU]
unused devices: <none>
但是我仍然想知道这里发生了什么,而且我找不到关于它的任何真实信息。有谁知道为什么数组默认为该状态?
编辑:添加了dmesg输出:
~ # grep kernel /var/log/syslog.1
Nov 13 10:03:44 iserv kernel: [160446.860113] e1000: eth1 NIC Link is Down
Nov 13 10:04:48 iserv kernel: [160511.017666] e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
Nov 13 20:12:40 iserv kernel: [196982.775186] sda: sda1
Nov 13 20:12:59 iserv kernel: [197001.598187] sdd: sdd1
Nov 13 20:13:13 iserv kernel: [197016.344939] sde: sde1
Nov 13 20:14:05 iserv kernel: [197067.520825] md: bind<sdd1>
Nov 13 20:14:05 iserv kernel: [197067.521263] md: bind<sde1>
Nov 13 20:14:05 iserv kernel: [197067.670215] md/raid1:md1: not clean -- starting background reconstruction
Nov 13 20:14:05 iserv kernel: [197067.670219] md/raid1:md1: active with 2 out of 2 mirrors
Nov 13 20:14:05 iserv kernel: [197067.670246] md1: detected capacity change from 0 to 1000069464064
Nov 13 20:14:05 iserv kernel: [197067.675101] md1: unknown partition table
Nov 13 20:24:10 iserv kernel: [197672.572128] md: md1 switched to read-write mode.
Nov 13 20:24:10 iserv kernel: [197672.572269] md: resync of RAID array md1
Nov 13 20:24:10 iserv kernel: [197672.572273] md: minimum _guaranteed_ speed: 1000 KB/sec/disk.
Nov 13 20:24:10 iserv kernel: [197672.572275] md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for resync.
Nov 13 20:24:10 iserv kernel: [197672.572280] md: using 128k window, over a total of 976630336k.
@frostschutz我已将昨天记录在系统日志中的dmesg行添加到时区UTC + 1(由于已重新启动计算机,因此我不再可以访问原始dmesg)。据我所知,没有任何异常。
—
Martin von Wittich
好奇您拥有哪个内核和mdadm版本...
—
derobert
@derobert Linux主机名3.10-0.bpo.3-686-pae#1 SMP Debian 3.10.11-1〜bpo70 + 1(2013-09-24)i686 GNU / Linux
—
Martin von Wittich
@derobert mdadm-v3.2.5-2012年5月18日,来自Debian
—
Wheezy
dmesg
吗?