From: spam@streefland.xs4all.nl (Dick Streefland)
To: linux-raid@vger.kernel.org
Subject: RAID1 recovery fails with 2.6 kernel
Date: Sun, 19 Oct 2003 14:27:58 -0000 [thread overview]
Message-ID: <7da.3f929f6e.d36f3@altium.nl> (raw)
When I mark one of the devices in a RAID1 array faulty, remove it, and
re-add it, recovery starts, but stops too early, leaving the array in
degraded mode. I'me seeing this in the latest 2.6.0 kernels, including
2.6.0-test8. The 2.4.22 kernel works OK, although the array is marked
"dirty" (?). Below is a script to reproduce the problem, followed by
the output of the script. I'm using mdadm-1.3.0.
# cat raid-recovery
#!/bin/sh
dd bs=1024k count=20 if=/dev/zero of=/tmp/img1 2> /dev/null
dd bs=1024k count=20 if=/dev/zero of=/tmp/img2 2> /dev/null
sync
losetup /dev/loop1 /tmp/img1
losetup /dev/loop2 /tmp/img2
sync
mdadm -C -n 2 -l 1 /dev/md0 /dev/loop1 /dev/loop2
sleep 1
while grep resync /proc/mdstat; do sleep 1; done
sleep 1
cat /proc/mdstat
mdadm -QD /dev/md0
mdadm /dev/md0 -f /dev/loop2
mdadm /dev/md0 -r /dev/loop2
mdadm -QD /dev/md0
mdadm /dev/md0 -a /dev/loop2
while grep recovery /proc/mdstat; do sleep 1; done
sleep 1
cat /proc/mdstat
mdadm -QD /dev/md0
mdadm -S /dev/md0
losetup -d /dev/loop1
losetup -d /dev/loop2
rm /tmp/img1
rm /tmp/img2
# ./raid-recovery
mdadm: array /dev/md0 started.
[=>...................] resync = 5.0% (1280/20416) finish=0.2min speed=1280K/sec
[==>..................] resync = 10.0% (2176/20416) finish=0.2min speed=1088K/sec
[===>.................] resync = 15.0% (3200/20416) finish=0.2min speed=1066K/sec
[====>................] resync = 20.0% (4224/20416) finish=0.2min speed=1056K/sec
[=====>...............] resync = 25.0% (5248/20416) finish=0.2min speed=1049K/sec
[======>..............] resync = 30.0% (6144/20416) finish=0.2min speed=1024K/sec
[=======>.............] resync = 35.0% (8064/20416) finish=0.1min speed=1152K/sec
[========>............] resync = 40.0% (9088/20416) finish=0.1min speed=1136K/sec
[=========>...........] resync = 45.0% (10112/20416) finish=0.1min speed=1123K/sec
[==========>..........] resync = 50.0% (11008/20416) finish=0.1min speed=1100K/sec
[===========>.........] resync = 55.0% (12032/20416) finish=0.1min speed=1093K/sec
[============>........] resync = 60.0% (13056/20416) finish=0.1min speed=1088K/sec
[=============>.......] resync = 65.0% (14080/20416) finish=0.0min speed=1083K/sec
[==============>......] resync = 70.0% (15104/20416) finish=0.0min speed=1078K/sec
[===============>.....] resync = 75.0% (16000/20416) finish=0.0min speed=1066K/sec
[================>....] resync = 80.0% (17024/20416) finish=0.0min speed=1064K/sec
[=================>...] resync = 85.0% (18048/20416) finish=0.0min speed=1061K/sec
[==================>..] resync = 90.0% (19072/20416) finish=0.0min speed=1059K/sec
[===================>.] resync = 95.0% (20096/20416) finish=0.0min speed=1057K/sec
Personalities : [raid1]
md0 : active raid1 loop2[1] loop1[0]
20416 blocks [2/2] [UU]
unused devices: <none>
/dev/md0:
Version : 00.90.01
Creation Time : Sun Oct 19 15:53:13 2003
Raid Level : raid1
Array Size : 20416 (19.94 MiB 20.91 MB)
Device Size : 20416 (19.94 MiB 20.91 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Oct 19 15:53:34 2003
State : clean, no-errors
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Number Major Minor RaidDevice State
0 7 1 0 active sync /dev/loop1
1 7 2 1 active sync /dev/loop2
UUID : 102b76c8:1af754b8:5c8d47a0:fe849836
Events : 0.1
mdadm: set device faulty failed for /dev/loop2: Success
mdadm: hot removed /dev/loop2
/dev/md0:
Version : 00.90.01
Creation Time : Sun Oct 19 15:53:13 2003
Raid Level : raid1
Array Size : 20416 (19.94 MiB 20.91 MB)
Device Size : 20416 (19.94 MiB 20.91 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Oct 19 15:53:35 2003
State : clean, no-errors
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Number Major Minor RaidDevice State
0 7 1 0 active sync /dev/loop1
1 0 0 -1 removed
UUID : 102b76c8:1af754b8:5c8d47a0:fe849836
Events : 0.3
mdadm: hot added /dev/loop2
[=>...................] recovery = 5.0% (1024/20416) finish=0.2min speed=1024K/sec
[==>..................] recovery = 10.0% (2048/20416) finish=0.1min speed=2048K/sec
Personalities : [raid1]
md0 : active raid1 loop2[2] loop1[0]
20416 blocks [2/1] [U_]
unused devices: <none>
/dev/md0:
Version : 00.90.01
Creation Time : Sun Oct 19 15:53:13 2003
Raid Level : raid1
Array Size : 20416 (19.94 MiB 20.91 MB)
Device Size : 20416 (19.94 MiB 20.91 MB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Sun Oct 19 15:53:37 2003
State : clean, no-errors
Active Devices : 1
Working Devices : 2
Failed Devices : 0
Spare Devices : 1
Number Major Minor RaidDevice State
0 7 1 0 active sync /dev/loop1
1 0 0 -1 removed
2 7 2 1 spare /dev/loop2
UUID : 102b76c8:1af754b8:5c8d47a0:fe849836
Events : 0.5
--
Dick Streefland //// De Bilt
dick.streefland@xs4all.nl (@ @) The Netherlands
------------------------------oOO--(_)--OOo------------------
next reply other threads:[~2003-10-19 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-19 14:27 Dick Streefland [this message]
2003-10-20 6:15 ` RAID1 recovery fails with 2.6 kernel Neil Brown
2003-10-20 8:43 ` Dick Streefland
2003-10-22 17:43 ` Mike Tran
2003-10-22 18:59 ` Dick Streefland
2003-10-26 20:36 ` Dick Streefland
2003-10-22 22:54 ` Kernel OOps: bad magic 0 while RAID5 resync operation Bo Moon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7da.3f929f6e.d36f3@altium.nl \
--to=spam@streefland.xs4all.nl \
--cc=dick.streefland@xs4all.nl \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).