[linux-lvm] failing hard drive

Bryn M. Reeves breeves at redhat.com
Thu Mar 22 21:31:50 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tim Milstead wrote:
> I have made the copy using a rescue CD and an external USB drive.
> Fitting the replacement internally is going to be difficult hence the
> question about doing it this way. Are you sure? I was just worried that
> perhaps LVM looked beyond a simple '/dev/hde' referred to drives in some
> deeper way e.g. serial number, model, make etc.

LVM doesn't use the '/dev/hdX' names at all. Instead it scans all block
devices looking for a label that was written to the disk when pvcreate
is run (stored in the 2nd sector).

As long as this label gets copied over the two devices will be
indistinguishable to LVM. If you dd the whole device over, then you're
definitely going to include the label.

You do need to arrange to make the replacement drive inaccessible to LVM
though if it will still be physically attached to the machine.

Either wipe the label out or mask the device using a filter in
/etc/lvm/lvm.conf - see the man page for details of this.

That said, if I was doing this on my own system, I would be using the
pvcreate/vgextend/pvmove steps I outlined further down.

>> To temporarily bring the VG up to 10 disks to allow you to remove the
>> failing member. You should then find the "pvmove /dev/hde" works as
>> expected (assuming the new disk is at least as big as the one you are
>> replacing).
>>   
> Yes, but given the space constraints I'd rather avoid this.

I don't see how the space constraints make a difference here - you're
going to have both devices attached at the same time however you decide
to do this.

Once the pvmove completes (analogous to the dd in the other method), you
can run "vgreduce /dev/hde" to permanently remove the failing drive from
the volume group, bringing you back down to 9 disks.

Kind regards,

Bryn.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGAvXG6YSQoMYUY94RAjZ2AJ9XJhR/gif4JDKblFGoxxKVtUT8egCgjOdr
XQIwn9vsSnl/NMK59Cj3ybo=
=rz4H
-----END PGP SIGNATURE-----




More information about the linux-lvm mailing list