[Novalug] "clandestine" lvm disk move?
Stuart D. Gathman
stuart at gathman.org
Thu Apr 5 23:44:29 EDT 2007
On Thu, 5 Apr 2007, Kurt Yoder wrote:
> I have a somewhat unusual question regarding my myth LVM volume. Tonight one
> of the disks in the LVM volume started returning errors. So I need to replace
> it. Luckily for me, I just happen to have a replacement disk on hand (that
> arrived today and was slated for other purposes, believe it or not... pure
> serendipity). Unluckily, the replacement is IDE, whereas the failing disk is
> SATA. As I write this, I am using dd_rescue to copy block-by-block from the
> failing disk onto the replacement IDE disk. This leaves me with a question of
> how I will slip the new disk (/dev/hdc) into the lvm volume to replace the
> previous disk (/dev/sda) without lvm "having a cow".
I can't help you with your current situation, except to suggest the
lvm mailing list. However, I have a "coulda shoulda" for future
reference. I use raid1 (mirroring) via the md driver for everything. Feed
/dev/md? devices to LVM. (Linux LVM is just starting to support mirroring
directly, which may make this nicer - almost like AIX LVM.) Now,
you can migrate partitions to new disks, replace faulty disks, etc,
all while the system is running. (Physically replacing disk
with the system running requires hot swap hardware. But you can replace,
boot and start using the system while the data migrates.)
The caveat is that the mdadm UI is rather nerve wracking with all
the dire warnings - and justified at that: one mistake can wipe stuff
quickly. Which is why handling mirroring in LVM is friendlier. The only time
you are warned about wiping data is when adding a disk to a volume group.
--
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flamis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
More information about the Novalug
mailing list