linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadmin can't re-sync a mirror?!
@ 2003-01-24 20:34 James Ralston
  2003-01-25  0:55 ` Friedrich Lobenstock
  2003-01-25  4:47 ` Neil Brown
  0 siblings, 2 replies; 4+ messages in thread
From: James Ralston @ 2003-01-24 20:34 UTC (permalink / raw)
  To: linux-raid

Either I've grossly understood how Linux RAID and/or the mdadmin
command works, or this is horribly wrong:

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1        33    265041   fd  Linux raid autodetect

   Device Boot    Start       End    Blocks   Id  System
/dev/sdc1             1        33    265041   fd  Linux raid autodetect

$ mdadm --create /dev/md0 --verbose --level=mirror --raid-devices=2 /dev/sdb1 /dev/sdc1

[wait for mirror to sync]

$ cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 sdc1[1] sdb1[0]
      264960 blocks [2/2] [UU]
unused devices: <none>

Okay, now simulate (without physically changing any disks) a failure,
and then a replacement:

$ mdadm /dev/md0 -f /dev/sdc1 -r /dev/sdc1
mdadm: set /dev/sdc1 faulty in /dev/md0
mdadm: hot removed /dev/sdc1

$ mdadm --zero-superblock /dev/sdc1

$ mdadm /dev/md0 -a /dev/sdc1
mdadm: hot added /dev/sdc1

But the mirror doesn't sync (!):

$ cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 sdc1[2] sdb1[0]
      264960 blocks [2/1] [U_]
unused devices: <none>

Have I completely misunderstood how Linux software RAID is supposed to
work?  (I certainly hope so, because otherwise, it can't even perform
the simplest of recovery operations: replacing a failed mirror
component and re-syncing.)

Thanks for any comments...

-- 
James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA


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

end of thread, other threads:[~2003-01-28  7:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-24 20:34 mdadmin can't re-sync a mirror?! James Ralston
2003-01-25  0:55 ` Friedrich Lobenstock
2003-01-25  4:47 ` Neil Brown
2003-01-28  7:24   ` reproducible kernel Oops in mdrecoveryd (triggered by md raid1 re-syncs) James Ralston

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