[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] Best way to image devices in an LVM environment


I have a server I'm currently finalising the setup of, which uses
two 80G SATA drives in a RAID-1 (md) with LVM on top.  When I've got it
how I want it I need to replace the 80G drives with a much larger

Now, I've kept notes about my setup of course so I can just put the
new disks in and do it all over again, but that strikes me as a big
waste of time.

I also of course have space elsewhere to take an image of the md
devices with dd and I could copy them back over the top once md is
set up again on the new disks.  The majority of space though is in
my single LVM volume group and only 18.5G of this 72.5G is used, so
taking an 80G image seems to also be rather a waste of time.

Here's the setup:

/dev/md0 (sda1, sdb1) is swap
/dev/md1 (sda2, sdb2) is /boot
/dev/md2 (sda3, sdb3) is /
/dev/md4 (sda5, sdb5) is an LVM PV and VG 'mainvg'

Everything else is LVs within mainvg and all filesystems are ext3.

So how would you accomplish the task of replacing sda and sdb with
larger disks in the least amount of effort?  Downtime is not a
problem, taking backups of the data is not a problem, booting off a
live cd is not a problem; the goal is to find the least
labour-intensive way to do this.

The best I can think of booting off a live cd, taking a dd of each
md device to another server, installing the new drives, setting up
the md devices again and then overwriting them with the images.
Will I run into problems with their UUIDs being overwritten?


Attachment: signature.asc
Description: Digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]