All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stuart D Gathman <stuart@bmsi.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] A hint on a process
Date: Mon, 06 Dec 2010 20:13:35 -0500	[thread overview]
Message-ID: <4CFD8A3F.8070403@bmsi.com> (raw)
In-Reply-To: <4CFD6563.70508@free.fr>

On 12/06/2010 05:36 PM, Georges Giralt wrote:
> Hello !
> I've a system (now on Ubuntu 9.04, but initially on a Fedora ) set up as
> follow :
> There are two RAID1 software raid arrays (md0 , which is around 100 Mb
> and holding an Ext2 FS for use in booting, md1 occupying the rest of the
> space used as a PV for LVM) made on a couple of old 160 GB disks.
>
> On the LVM VG0 are a lot of LV onto which Ubuntu is installed.
>
> One of the two disks failed. I can't find a 160 GB replacement. Only 320
> Gb for the smallest availlable disk near where I live.
>
> So I plan to move the system to 320 GB disks and, if possible, not
> wasting the 320-160 difference....
> The process I thought about is as follow :
>
> 1) insert one 320 disk in both arrays (after partitioning it correctly,
> 100 Mb for the first partition and the remaining for the second.)
>
> 2) wait for the raid1 to synchronize.
>
> 3) mark the remaining 160 GB disk as failed and remove/replace with
> another 320 GB disk set up as the first.
>
> 4) wait for the arrays to reconstruct/synchronize.
>
> 5) Extend the PV my Volume Group is build on (md1 in this case)
>
> 6) enjoy a beer...
>
> What do you think of my method ? Is it a good one or am I missing
> something ? You will have understood that losing data is not an option ...
> Many thanks in advance for your answers, critics and pointers...
> Regards.
Your method will fail because the raid superblock is at the end of the
partition.

I use and recommend this variation:

1. Replace 160 with 320, allocate 2 partitions to match (or slightly
exceed if geometry requires) the partitions on
the 160.  Synchronize. 

2. Replace the 2nd 160, resynchronize. 

3. Add a 3rd raid1 with the remaining space, and extend the VG with the
additional PV.

If your system can support 3 drives, you can always partition to mirror
everything despite size mismatches.  For example,
step 3 would become:

3a. reinstall the 160 and allocate 2 80g partitions on the 160 (which is
no longer the default boot drive).  Allocate an 80g partition on each
320 to mirror the 2 80g partitions giving md2 and md3.  Mirror the
remaining 80g in each 320 for md4.  Extend the VG with the addition 3 PVs.

  reply	other threads:[~2010-12-07  1:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-06 22:36 [linux-lvm] A hint on a process Georges Giralt
2010-12-07  1:13 ` Stuart D Gathman [this message]
2010-12-07  7:31   ` Marek Podmaka
2010-12-12 13:20   ` Georges Giralt
     [not found] <1728359014.3510561291714776589.JavaMail.root@zimbra44-e7.priv.proxad.net>
2010-12-07  9:41 ` georges.giralt

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=4CFD8A3F.8070403@bmsi.com \
    --to=stuart@bmsi.com \
    --cc=linux-lvm@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.