[CentOS-virt] Best practices for LVM and virtualization

Mathieu Baudier mbaudier at argeo.org
Wed Feb 10 11:09:32 UTC 2010

> yes, you can add / remove disks to a VM without restarting the guest.
> look at the xm block-attach  / block-detach commands

My understanding is that xm is Xen specific (I'm using Qemu/KVM)

I tried with virsh:

virsh # attach-disk 6 /dev/mapper/vg_alma_fast-lv_test_virtlvm2 vdb
Disk attached successfully

virsh # dumpxml 6
<domain type='kvm' id='6'>
    <disk type='block' device='disk'>
      <source dev='/dev/mapper/vg_alma_fast-lv_test_virtlvm'/>
      <target dev='vda' bus='virtio'/>
    <disk type='block' device='disk'>
      <driver name='phy'/>
      <source dev='/dev/mapper/vg_alma_fast-lv_test_virtlvm2'/>
      <target dev='vdb' bus='virtio'/>

But I still cannot see the disk using fdisk: there is no /dev/vdb.

Please note that I'm testing with a minimal CentOS installation
(without even the Base group).
So maybe it lacks some required deamons (there is no ACPI deamon for exmaple).

I will try again with an install including the Base group.

More information about the CentOS-virt mailing list