linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with disk replacement
@ 2013-07-18 16:57 Qin Dehua
  0 siblings, 0 replies; 9+ messages in thread
From: Qin Dehua @ 2013-07-18 16:57 UTC (permalink / raw)
  To: linux-raid

Hi Neil,
I use kernel 3.9.6 and found data may lost while replacing a RAID disk
using --replace.

Here is the steps of the test case:
1. Create 3-drives RAID5 and wait for resync done (I use 1GB disks in
VirtualBox machine)
2. Calculate the md5sum on the whole raid: dd if=/dev/md1 bs=1M
iflag=direct | md5sum
3. add two spare disks to the raid: mdadm /dev/md1 -a /dev/sdi -a /dev/sdj
4. mdadm --replace a disk then --fail another disk:
   mdadm /dev/md1 --replace /dev/sdb; sleep 3; mdadm /dev/md1 -f /dev/sdc
5. wait for recovery done
6. recalculate the md5sum on the whole raid: dd if=/dev/md1 bs=1M
iflag=direct | md5sum

The md5sum of step 6 is NOT identical with that of step 2, this means
data is corrupted.
I found in step 4, when another disk was made failed, the replacing
process was stopped,
and started recovering of the failed disk, and afterwards the
replacing not continue.

Regards,
Qin Dehua

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-16 10:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <45ae92bb.4ffb.13ff2092e1d.Coremail.13691222965@163.com>
2013-07-18 16:46 ` Problem with disk replacement qindehua
2013-07-22  3:04   ` NeilBrown
2013-07-22 10:23     ` qindehua
2013-07-23  3:21       ` NeilBrown
2013-07-24 12:48         ` qindehua
2013-07-25  6:45           ` NeilBrown
2013-07-25  7:32             ` NeilBrown
2013-08-16 10:26               ` qindehua
2013-07-18 16:57 Qin Dehua

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).