linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Stuart D. Gathman" <stuart@bmsi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] dealing with a failing drive (esp pvmove)
Date: Wed, 22 Dec 2010 22:17:19 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.1012222210490.11910@bmsred.bmsi.com> (raw)
In-Reply-To: <1293047716.10784.28.camel@corn.betterworld.us>

On Wed, 22 Dec 2010, Ross Boylan wrote:

> I have a volume group made from 3 partitions on 2 different physical
> disks.  One of the disks is failing.  I have a new disk connected via
> USB; it is large but a bit slow (5400RPM, though the USB might be
> temporary).  It is large enough to hold the entire contents of the
> existing VG.
> 
> I am looking for suggestions about how to  approach this.  The pvmove
> command looks promising, but the docs warn that things are in a delicate
> state during the migration (and advise backups).  Since it seems almost
> certain there will be I/O errors on the old drive, I'm not sure if
> pvmove is a good idea.  Is it?

If it is not necessary to keep the VG live, the following will handle
errors better and be faster (depending on how much of the failing 
PV is in use):

1) Make a new partition(s) at least as big as the failing partition, and use
ddrescue to copy the failing partition(s).  Don't do anything that might
cause a vgscan (lvm commands) during the copy (since the copy will have the
same UUID).  (Or else do the copy with the VG offline, booted from CD
if needed.)

2) Shutdown and remove the failing drive.  The new copy should be 
recognized by its UUID.

3) Record blocks skipped due to io errors, and map them to files
and filesystems to take appropriate action: 

  http://smartmontools.sourceforge.net/badblockhowto.html#id3073907

-- 
	      Stuart D. Gathman <stuart@bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.

      parent reply	other threads:[~2010-12-23  3:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 19:55 [linux-lvm] dealing with a failing drive (esp pvmove) Ross Boylan
2010-12-22 20:38 ` Richard Shaw
2010-12-23  3:17 ` Stuart D. Gathman [this message]

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=Pine.LNX.4.64.1012222210490.11910@bmsred.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 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).