linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Hill <robin@robinhill.me.uk>
To: Roberto Nunnari <roberto.nunnari@supsi.ch>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: replacing drives
Date: Thu, 2 May 2013 15:54:11 +0100	[thread overview]
Message-ID: <20130502145411.GA18405@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <518270A6.4090706@supsi.ch>

[-- Attachment #1: Type: text/plain, Size: 1904 bytes --]

On Thu May 02, 2013 at 03:56:54PM +0200, Roberto Nunnari wrote:

> Robin Hill wrote:
> > The safest option would be:
> >  - add in the new disks
> >  - partition to at least the same size as your existing partitions (they
> >    can be larger)
> >  - add the new partitions into the arrays (they'll go in as spares)
> >  - grow the arrays to 4 members (this avoids any loss of redundancy)
> >  - wait for the resync to complete
> >  - install grub/lilo/syslinux to the new disks
> 
> Ok.. got here.
> 
> 
> >  - fail and remove the old disk partitions from the arrays
> 
> Now.. I may need some guidance for the next steps.. please correct me if 
> I'm wrong..
> 
> to fail the old disk partition from the arrays I should:
> mdadm -f /dev/md0 /dev/sda1
> mdadm -f /dev/md1 /dev/sda2
> mdadm -f /dev/md2 /dev/sda3
> mdadm -f /dev/md0 /dev/sdc1
> mdadm -f /dev/md1 /dev/sdc2
> mdadm -f /dev/md2 /dev/sdc3
> 
> and to remove the old disk partition from the arrays I should:
> mdadm -r /dev/md0 /dev/sda1
> mdadm -r /dev/md1 /dev/sda2
> mdadm -r /dev/md2 /dev/sda3
> mdadm -r /dev/md0 /dev/sdc1
> mdadm -r /dev/md1 /dev/sdc2
> mdadm -r /dev/md2 /dev/sdc3
> 
> correct?
> 
Assuming sda & sdc are your old drives, yes (they were sda & sdb in your
original mail, but possibly they've been reordered if you've rebooted
with the new drives in).

> 
> >  - shrink the arrays back down to 2 members
> 
> to shrink the arrays back down to two members:
> mdadm --grow --raid-devices=2 /dev/md0
> mdadm --grow --raid-devices=2 /dev/md1
> mdadm --grow --raid-devices=2 /dev/md2
> 
> correct?
> 
Yes, that's all correct.

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-05-02 14:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26 14:27 replacing drives Roberto Nunnari
2013-04-26 15:36 ` Tregaron Bayly
2013-04-26 15:42 ` Keith Keller
2013-04-26 15:53 ` Robin Hill
2013-04-30 13:17   ` Roberto Nunnari
2013-04-30 13:20     ` Mikael Abrahamsson
2013-04-30 14:11       ` Roberto Nunnari
2013-04-30 14:22         ` Robin Hill
2013-04-30 14:40         ` Mikael Abrahamsson
2013-04-30 14:27       ` Roberto Nunnari
2013-04-30 14:39       ` Roberto Nunnari
2013-04-30 14:42         ` Mikael Abrahamsson
2013-04-30 15:10           ` Roberto Nunnari
2013-04-30 15:11         ` Phil Turmel
2013-04-30 15:39           ` Roberto Spadim
2013-05-01  1:55             ` Brad Campbell
2013-05-01 15:06               ` Roberto Nunnari
2013-05-01 18:14               ` Roberto Spadim
2013-05-02 17:49                 ` Roy Sigurd Karlsbakk
2013-05-02 17:43       ` Roy Sigurd Karlsbakk
2013-04-30 13:45     ` Robin Hill
2013-04-30 14:05       ` Roberto Nunnari
2013-04-30 14:28         ` Roberto Nunnari
2013-04-30 15:19   ` Roberto Nunnari
2013-05-02 13:56   ` Roberto Nunnari
2013-05-02 14:54     ` Robin Hill [this message]
2013-05-02 15:00       ` Roberto Nunnari
2013-05-03 16:28   ` Roberto Nunnari
2013-05-06 11:30     ` Roberto Nunnari
2013-05-07  7:53     ` Robin Hill
2013-05-07 10:22       ` Roberto Nunnari
2013-05-08 14:19       ` Roberto Nunnari
2013-05-08 15:10         ` Robin Hill
2013-05-08 16:05           ` Roberto Nunnari
2013-05-08 17:01             ` Robin Hill
2013-05-08 17:20               ` Roberto Nunnari
2013-05-10 21:35   ` Roberto Nunnari
2013-04-26 22:20 ` Roberto Nunnari

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=20130502145411.GA18405@cthulhu.home.robinhill.me.uk \
    --to=robin@robinhill.me.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=roberto.nunnari@supsi.ch \
    /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).