On Sat, 21 Jul 2012 14:11:03 -0700, walt wrote:

> I have a 500gig disk that is split roughly in half between two volume
> groups, each containing four physical volumes, and each vg is formatted
> into an ext4 filesystem of roughly 250GB.

This doesn't make sense, VGs don't have filesystems, they contain LVs
and they have the filesystems.

> What I plan to do is merge the two volume groups into one, containing
> one big ext4 filesystem, which will contain all of the files currently
> on the disk.

> 
> Can this be done without copying one of the existing ext4 filesystems
> to a separate drive first, and then copying it back after extending
> the remaining vg/filesystem? (One filesystem has 24GB free and the
> other has 25GB free.)

It can, by moving data from an LV on one VG to an LV on the other, then
reducing one LV and VG and increasing the other. But with so little free
space, it would take forever, and you'd still end up with a 90%+ full
filesytem.

If you have a spare drive, I'd add a partition on that to the VG you want
to keep, increase the LV size and move everything over. Then remove the
VGs from the second disk, add it to the first VG and use pvmove to move
everything off the spare disk before removing it from the VG. You can
continue to use the system while this runs, so this gives the least
downtime with minimal hassle.


-- 
Neil Bothwick

Never underestimate the bandwidth of a station wagon full of tapes!

Attachment: signature.asc
Description: PGP signature

Reply via email to