linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Raid 1 usage in a lab
@ 2010-01-28  4:09 Joseph L. Casale
  2010-01-29 10:10 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph L. Casale @ 2010-01-28  4:09 UTC (permalink / raw)
  To: 'linux-raid@vger.kernel.org'

I have a box with a two discs mirrored. Suppose I want to remove the primary
and boot off the secondary alone to test, then roll back to the primary after
the test.

I have been doing this by:

1. Removing sda, booting off the sdb and running:
     # mdadm --grow /dev/md[0|1] --raid-devices=1 --force
     Then test away, shutdown...

2. Remove sdb, install sda only and run:
     # mdadm --grow /dev/md[0|1] --raid-devices=1 --force
     shutdown...

3. Install sdb and reboot, the run:
    # mdadm --manage /dev/md0 --add /dev/sdb1
    # mdadm --grow /dev/md0 --raid-devices=2
 
    # mdadm --manage /dev/md1 --add /dev/sdb2
    # mdadm --grow /dev/md1 --raid-devices=2


Is there a simpler way with less reboots? What criteria does md use to
determine which disc is most recent, even a solo reboot with sda, after
which attaching sdb causes the system to prefer sdb, even though the solo
boot off sda should have made timestamps prove sda most current.

Thanks!
jlc

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

end of thread, other threads:[~2010-01-29 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-28  4:09 Raid 1 usage in a lab Joseph L. Casale
2010-01-29 10:10 ` Neil Brown

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