linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ross Boylan <ross@biostat.ucsf.edu>
To: linux-raid@vger.kernel.org
Subject: Problems after extending partition
Date: Thu, 30 Aug 2012 17:48:31 -0700	[thread overview]
Message-ID: <504009DF.4070408@biostat.ucsf.edu> (raw)

/dev/md1 was RAID 1 built from hda3 and hdb3.  After increasing the 
partition size of hd[ab]3, md1 could not be assembled.  I think I 
understand why and have a solution, but I would appreciate it if someone 
could check it.  This is with 0.90 format on Debian Lenny with the 
partitions in raid auto-detect mode.  hda and hdb are virtual disks 
inside a kvm VM; it would be time-consuming to rebuild it from scratch.

The final wrinkle is that when I brought the VM up and dm1 was not 
constructed one of the partitions was used anyway, so they are now out 
of sync.

Analysis: Growing the partitions meant that the mdadm superblocks were 
not at the expected offset from the end of the partitions, and so they 
weren't recognized as part of the array.

Solution:  (step 3 is the crucial one)
1. Shut down the VM; call it the target VM.
2. Mount the disks onto a rescue VM (running squeeze) as sdb and sdc.
3. mdadm --create /dev/md1 --UUID=xxxxx --level=mirror --raid-devices=2 
/dev/sdb3 missing --spare-devices=1 /dev/sdc3.
UUID taken from the target VM.
4. wait for it to sync.
5. maybe do some kind of command to say the raid no longer has a spare.  
It might be
mdadm --grow /dev/md3 --spare-devices=0
6. Shut the rescue VM and start the target VM.

Does it matter if I call the device /dev/md1 in step 3?  It is known as 
that in the target VM.

Thanks for any help.
Ross Boylan

             reply	other threads:[~2012-08-31  0:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31  0:48 Ross Boylan [this message]
2012-08-31  1:46 ` Problems after extending partition Adam Goryachev
2012-09-01  4:21   ` Ross Boylan
2012-09-04 23:29     ` Problems after extending partition [SOLVED] Ross Boylan

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=504009DF.4070408@biostat.ucsf.edu \
    --to=ross@biostat.ucsf.edu \
    --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).