Re: lvm: creating a snapshot
On Sat, 11 Oct 2014, lee wrote:
> Well, who can afford that? Someone who can doesn't need to swap
> drives.
I've upgraded the drive capacity in machines on multiple occasions
because drives have gotten cheaper... but we don't have enough funding
to afford replacing the computers at the same time.
> How do I merge VGs that have different extent sizes?
Change the extent size using vgchange, and then vgmerge them.
> The snapshots are to back up guests in vg_guests. They must go into the
> free space available in vg_mydata. Other than that, there's a 16GB swap
> partition (/dev/sda2) currently used by one of the guests.
>
> Both sda and sdb are logical RAID volumes. Dom0 is on /dev/sda1.
>
> As you can see, it's a very straightforward and logical set up, except
> for the swap partition which is way too large for dom0 and thus has been
> re-assigned to a guest that actually requires it. The only problem is
> LVM which doesn't let me make snapshots.
OK. This sounds like you can just disable the swap on /dev/sda2
(swapoff), pvcreate /dev/sda2; vgextend /dev/mapper/vg_guests /dev/sda2;
Do your snapshots, and whatever else you need, then you can vgreduce
/dev/mapper/vg_guests /dev/sda2; and reset your swap if you need to.
Alternatively, you can make the physical extents the same (probably
using vgchange on vg_mydata to make the size 16M), inactivate all of the
volumes of vg_guests, vgmerge it, and then make snapshots.
> > Volume groups don't reside on partitions or devices. They encompass
> > physical volumes which do.
>
> Physical volumes do not reside on partitions or devices. They provide
> them.
This is incorrect. A physical volume (LVM) sits on top of a block
device, which is usually a partition (or an entire disk).
--
Don Armstrong http://www.donarmstrong.com
"The trouble with you, Ibid" he said, "is that you think you're the
biggest bloody authority on everything"
-- Terry Pratchet _Pyramids_ p146
Reply to: