[libvirt] failed to write to disk on vm with lvm pool

Vasiliy Tolstov v.tolstov at selfip.ru
Thu Oct 24 07:56:10 UTC 2013


Hi all. Today i can't mkfs.ext3 inside virual machine while install it
(ubuntu 13.04).

Why this happening? On other node i see that
virSecurityDACSetOwnership sets perms on /dev/vg/xxx and /dev/dm-xxx,
but in this host this not happening.

Libvirt logs:
2013-10-24 07:50:15.639+0000: 3700: info : virNetDevProbeVnetHdr:94 :
Enabling IFF_VNET_HDR
2013-10-24 07:50:15.782+0000: 3700: info :
virSecurityDACSetOwnership:271 : Setting DAC user and group on
'/dev/vg/402' to '108:102'
2013-10-24 07:50:15.783+0000: 3700: info :
virSecurityDACSetOwnership:271 : Setting DAC user and group on
'/srv/ubuntu/13.04/kernel' to '108:102'
2013-10-24 07:50:15.783+0000: 3700: info :
virSecurityDACSetOwnership:271 : Setting DAC user and group on
'/srv/ubuntu/13.04/initrd' to '108:102'
2013-10-24 07:50:16.386+0000: 3700: warning : virCgroupMoveTask:887 :
no vm cgroup in controller 3
2013-10-24 07:50:16.386+0000: 3700: warning : virCgroupMoveTask:887 :
no vm cgroup in controller 4
2013-10-24 07:50:16.386+0000: 3700: warning : virCgroupMoveTask:887 :
no vm cgroup in controller 6

domainxml disk:
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'
ioeventfd='on' event_idx='off'/>
      <source dev='/dev/vg/402'/>
      <target dev='vda' bus='virtio'/>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </disk>

pool xml
<pool type='logical'>
  <name>default</name>
  <uuid>2a135e38-dd92-1b4d-bd82-3aafd369d207</uuid>
  <capacity unit='bytes'>3000454086656</capacity>
  <allocation unit='bytes'>386547056640</allocation>
  <available unit='bytes'>2613907030016</available>
  <source>
    <device path='/dev/bcache0'/>
    <name>vg</name>
    <format type='lvm2'/>
  </source>
  <target>
    <path>/dev/vg</path>
    <permissions>
      <mode>0711</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

qemu.log:

2013-10-24 07:50:15.777+0000: starting up
LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin
QEMU_AUDIO_DRV=none /usr/bin/qemu-system-x86_64 -name 402 -S -M pc-1.0
-enable-kvm -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uuid
0ee50ad7-8c2b-57e9-5bee-0000571d77c1 -no-user-config -nodefaults
-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/402.monitor,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-reboot -no-shutdown -kernel /srv/ubuntu/13.04/kernel -initrd
/srv/ubuntu/13.04/initrd -append ks=file:///ks.cfg -device
piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device
virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive
file=/dev/vg/402,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native
-device virtio-blk-pci,ioeventfd=on,event_idx=off,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
-drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device
ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev
tap,fd=22,id=hostnet0,vhost=on,vhostfd=23 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:00:01:55,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
spicevmc,id=charchannel0,name=vdagent -device
virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
-chardev socket,id=charchannel1,path=/var/lib/libvirt/qemu/402.agent,server,nowait
-device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=org.mighost.agent.0
-vnc 0.0.0.0:0,password -vga std -device
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
char device redirected to /dev/pts/0 (label charserial0)


-- 
Vasiliy Tolstov,
e-mail: v.tolstov at selfip.ru
jabber: vase at selfip.ru




More information about the libvir-list mailing list