<div><div><div class="gmail_quote">On 30 October 2012 19:43, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On 10/30/2012 06:03 AM, Douglas Russell wrote:<br>
> I am slightly lost trying to attach some storage to a functioning virtual<br>
> machine. If this where a real machine, I would simply be trying to mount a<br>
> LVM volume.<br>
><br>
> I have found a lot of documentation about adding storage pools, but I'm<br>
> unsure if that is actually what I should be doing. Is that just for storage<br>
> of the virtual machines themselves? Once I'd added my LVM volume group to<br>
> virsh I could see no way of then assigning one volume of that to be offered<br>
> as a logical volume to one particular virtual machine.<br>
><br>
> I've also seen this:<br>
> <a href="http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Virtualized_block_devices-Adding_storage_devices_to_guests.html#proc-Virtualization-Adding_storage_devices_to_guests-Adding_physical_block_devices_to_virtualized_guests" target="_blank">http://docs.fedoraproject.org/en-US/Fedora/13/html/Virtualization_Guide/sect-Virtualization-Virtualized_block_devices-Adding_storage_devices_to_guests.html#proc-Virtualization-Adding_storage_devices_to_guests-Adding_physical_block_devices_to_virtualized_guests</a><br>


><br>
> Looks like I could use that to assign one of the LVM volumes in my LVM<br>
> volume group to the VM.<br>
<br>
</div>What is typically done is creating LVM volumes in the host, and then<br>
assigning that as a block device for the guest to use as though it were<br>
a raw disk.  The guest then does _another_ layer of PVM/LVM<br>
partitioning, if the guest is something that uses LVM in the first<br>
place.  If you want the guest to see an LVM partition created by the<br>
host as an LVM within the guest, without an additional layer, then you<br>
have to expose the PVM as the block device to the guest; this is not a<br>
typical setup, in part because it is then up to you to ensure that the<br>
host and guest are not modifying the same storage at the same time (or<br>
put another way, that the guest is not reading from any other LVM<br>
partitions than the one you wanted it to use).<br></blockquote><div><br></div><div>Ok, I understand your answer and I feel I'm close to the solution, but I'm still unclear on the storage pools part. In what you've described below, these aren't used? I assume you've used attach-disk to add the LVM volume to the guest as a block device? I definitely never intended to add the logical volume to the guest and have it appear as a logical volume. I was, as you say, trying to attach it as a block device.<div>

<br></div><div>Thanks for your response!</div></div><div><br></div><div>Douglas</div></div></div></div>