I looked around but could not find any info on how to expand a libvirt managed LVM storage pool. I do not see any virsh command to do it but I was successful using the vgexpand command to add some more storage once I destroyed the pools and then restarted it. I'd like to verify that this is the proper way to grow the storage in a libvirt LVM storage pool. And this brings up a second question, I did this without any VM running so I'd like to know what the impact of destroying a running pool is on running VMs. Does taking the pool off-line cause any issues with running VMs or is the only affect that the pool is unavailable for management by libvirt? These are the commands that I ran to create my pool and expand it after a kickstart of the server: pvcreate -ff -y /dev/mapper/mpath? virsh pool-define-as --name GuestVols --type logical --source-dev /dev/mapper/mpatha --target /dev/GuestVols virsh pool-build GuestVols virsh pool-start GuestVols virsh pool-autostart GuestVols virsh pool-destroy --pool GuestVols vgextend GuestVols /dev/mapper/mpath{b..d} vgdisplay GuestVols virsh pool-start --pool GuestVols virsh pool-info --pool GuestVols Is this the best way to create a managed pool across 4 LUNs? And to potentially expand the storage group in the future if more storage is needed? --jim
Resending since no one replied over the weekend... --jim> -----Original Message----- > From: libvirt-users-bounces@redhat.com [mailto:libvirt-users- > bounces@redhat.com] On Behalf Of McEvoy, James > Sent: Friday, September 20, 2013 11:16 AM > To: libvirt-users@redhat.com > Subject: [libvirt-users] Expanding an LVM Storage Pool > > I looked around but could not find any info on how to expand a libvirt > managed LVM storage pool. I do not see any virsh command to do it > but I was successful using the vgexpand command to add some more storage > once I destroyed the pools and then restarted it. > I'd like to verify that this is the proper way to grow the storage in a libvirt LVM > storage pool. And this brings up a second > question, I did this without any VM running so I'd like to know what the impact > of destroying a running pool is on running VMs. > Does taking the pool off-line cause any issues with running VMs or is the only > affect that the pool is unavailable for management by libvirt? > > These are the commands that I ran to create my pool and expand it after a > kickstart of the server: > > pvcreate -ff -y /dev/mapper/mpath? > virsh pool-define-as --name GuestVols --type logical --source-dev > /dev/mapper/mpatha --target /dev/GuestVols > virsh pool-build GuestVols > virsh pool-start GuestVols > virsh pool-autostart GuestVols > virsh pool-destroy --pool GuestVols > vgextend GuestVols /dev/mapper/mpath{b..d} > vgdisplay GuestVols > virsh pool-start --pool GuestVols > virsh pool-info --pool GuestVols > > Is this the best way to create a managed pool across 4 LUNs? And to potentially > expand the storage group in the future if more storage is needed? > > --jim > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users
On 21/09/13 02:15, McEvoy, James wrote:> I looked around but could not find any info on how to expand a libvirt managed LVM storage pool. I do not see any virsh command to do it > but I was successful using the vgexpand command to add some more storage once I destroyed the pools and then restarted it. > I'd like to verify that this is the proper way to grow the storage in a libvirt LVM storage pool.It's not the proper way in principle, but since libvirt doesn't support to extend the volume groups for a logical pool yet, it's the only way now. One hint though, you can try to refresh the pool by command "virsh pool-refresh" after the volume group of the pool is extended. I.e, don't have to restart the pool.> And this brings up a second > question, I did this without any VM running so I'd like to know what the impact of destroying a running pool is on running VMs.If you have any VM which uses the pool's volume, it affects, especially if you are using the volume with pool and volume name in domain config. e.g. <source pool="$pool" volume="$volume"/>> > Does taking the pool off-line cause any issues with running VMs or is the only affect that the pool is unavailable for management by libvirt?Same as above. It's one of the thing in our TODO list : we probaly need to prevent destroying the pool if any its volume is being used by any VM, especially if the volume is used with pool and volume name in domain config.> > These are the commands that I ran to create my pool and expand it after a kickstart of the server: > > pvcreate -ff -y /dev/mapper/mpath? > virsh pool-define-as --name GuestVols --type logical --source-dev /dev/mapper/mpatha --target /dev/GuestVols > virsh pool-build GuestVols > virsh pool-start GuestVols > virsh pool-autostart GuestVols > virsh pool-destroy --pool GuestVols > vgextend GuestVols /dev/mapper/mpath{b..d} > vgdisplay GuestVols > virsh pool-start --pool GuestVols > virsh pool-info --pool GuestVols > > Is this the best way to create a managed pool across 4 LUNs? And to potentially expand the storage group in the future if more storage is needed? > > --jim > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users