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

Re: lvm: creating a snapshot



On Sun, 05 Oct 2014, lee wrote:
> So it would have to be at least a partition? I don't have one free ...
> I could use the swap partition temporarily for something like that.

Doesn't matter. It just has to be a block device that you can add as a
physical volume to the volume group. [And obviously, it shouldn't be a
block device which already exists within the volume group, like a file
on a logical volume which is in the volume group... that way lies
madness.]

> Once I added such a partition to a volume group, can I simply remove
> it from the VG when I don't need it anymore?

Yes, you can use pvmove to make sure that everything is off of that
physical volume, and then vgreduce to remove that physical volume from
the volume group.

This is actually one of the many reasons why lvm is awesome. You can
migrate whole servers from one set of drives to another with no downtime
by using vgextend/pvmove/vgreduce.

-- 
Don Armstrong                      http://www.donarmstrong.com

We must realize that today's Establishment is the New George III.
Whether it will continue to adhere to his tactics, we do not know. If
it does, the redress, honored in tradition, is also revolution.
 -- William O. Douglas _Points of Rebellion_


Reply to: