[Bug 893450] Re: libvirt fails to start correctly because LVM is not ready

Horacio 893450 at bugs.launchpad.net
Fri Jan 20 19:11:59 UTC 2012


Some comments about performance:
- reading works well with big and small block sizes
- writing with big block size works ok
- the problem arise when writing with small block size

----------

Reading works ok with small and large block size:

reading blocks of 1KiB from sda2

# /usr/bin/time dd if=/dev/sda2 of=/dev/null bs=1024 count=$(( 1024*32 )) 
32768+0 records in
32768+0 records out
33554432 bytes (34 MB) copied, 0.48956 s, 68.5 MB/s
0.00user 0.07system 0:00.49elapsed 14%CPU (0avgtext+0avgdata 3552maxresident)k
66016inputs+0outputs (0major+268minor)pagefaults 0swaps

# /usr/bin/time dd if=/dev/sda2 of=/dev/null bs=1024 count=$(( 1024*1024 )) 
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB) copied, 8.74106 s, 123 MB/s
0.08user 2.23system 0:08.74elapsed 26%CPU (0avgtext+0avgdata 3536maxresident)k
2097632inputs+0outputs (0major+268minor)pagefaults 0swaps

reading blocks of  1MiB from sdb2 (to ensure that nothing is cached)

# /usr/bin/time dd if=/dev/sdb2 of=/dev/null bs=$((1024*1024)) count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 8.76866 s, 122 MB/s
0.00user 1.82system 0:08.77elapsed 20%CPU (0avgtext+0avgdata 7616maxresident)k
2097408inputs+0outputs (0major+522minor)pagefaults 0swaps

Now, writing with blocks of 16MiB works ok (64.5 MB/s!!!)

# /usr/bin/time dd if=/dev/zero of=/mnt/rsync/zeros bs=$((1024*1024*16)) count=128 oflag=dsync
128+0 records in
128+0 records out
2147483648 bytes (2.1 GB) copied, 33.2825 s, 64.5 MB/s
0.00user 6.69system 0:33.37elapsed 20%CPU (0avgtext+0avgdata 69072maxresident)k
1464inputs+4195328outputs (0major+4363minor)pagefaults 0swaps

With 1MiB the performance is bad (12.1 MB/s)

# /usr/bin/time dd if=/dev/zero of=/mnt/rsync/zeros bs=$((1024*1024)) count=256 oflag=dsync
256+0 records in
256+0 records out
268435456 bytes (268 MB) copied, 22.1709 s, 12.1 MB/s
0.00user 0.97system 0:22.17elapsed 4%CPU (0avgtext+0avgdata 7616maxresident)k
40inputs+524288outputs (1major+521minor)pagefaults 0swaps

With 1KiB I got.. 33.3 kB/s!!! (I pressed Ctrl+C after some time)

# /usr/bin/time dd if=/dev/zero of=/mnt/rsync/zeros bs=1024 count=$(( 1024*32 )) oflag=dsync
(pressed Ctrl+C)
^C9069+0 records in
9069+0 records out
9286656 bytes (9.3 MB) copied, 279.276 s, 33.3 kB/s
Command terminated by signal 2
0.00user 1.30system 4:39.90elapsed 0%CPU (0avgtext+0avgdata 3504maxresident)k
0inputs+72552outputs (0major+265minor)pagefaults 0swaps

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to udev in Ubuntu.
https://bugs.launchpad.net/bugs/893450

Title:
  libvirt fails to start correctly because LVM is not ready

Status in “libvirt” package in Ubuntu:
  Incomplete
Status in “udev” package in Ubuntu:
  Incomplete

Bug description:
  Some times, one of the KVM guest failed to start. I've 3 guest, two
  started OK and one failed (the two times the same has failed). After
  rebooting the host two times, the KVM guest started OK, but this is a
  server and found too risky this behavior. The host server is running
  "Ubuntu 11.04 Server 64bits" and libvirt 0.8.8-1ubuntu6.5

  The two times that failed, I've found this on syslog:

  error : virSecurityDACSetOwnership:125 : unable to set user and group to '105:115' on '/dev/vg_default/lv_robot-pv0': No such file or directory
  kernel: [  200.354543] type=1400 audit(1321932141.068:11): apparmor="DENIED" operation="open" parent=2539 profile="/usr/lib/libvirt/virt-aa-helper" name="/dev/dm-7" pid=2638 comm="virt-aa-helper" requested_mask="r" denied_mask="r" fsuid=0 ouid=105
  kernel: [  200.692255] type=1400 audit(1321932141.408:12): apparmor="STATUS" operation="profile_load" name="libvirt-7262201f-566b-d0b1-16ec-0b404ccd5336" pid=2639 comm="apparmor_parser"
  libvirtd: 00:22:21.424: 2539: error : virSecurityDACRestoreSecurityFileLabel:143 : cannot resolve symlink /dev/vg_default/lv_robot-pv0: No such file or directory
  libvirtd: 00:22:21.707: 2539: error : qemuAutostartDomain:275 : Failed to autostart VM 'robot': unable to set user and group to '105:115' on '/dev/vg_default/lv_robot-pv0': No such file or directory

  The LVM device is on a software raid. Maybe this is taking too long to
  come up?

  FYI, running "aa-status" (after the reboots) gives me:
  apparmor module is loaded.
  9 profiles are loaded.
  9 profiles are in enforce mode.
     /sbin/dhclient
     /usr/lib/NetworkManager/nm-dhcp-client.action
     /usr/lib/connman/scripts/dhclient-script
     /usr/lib/libvirt/virt-aa-helper
     /usr/sbin/libvirtd
     /usr/sbin/tcpdump
     libvirt-7262201f-566b-d0b1-16ec-0b404ccd5336
     libvirt-c032ea0a-8c62-7730-fb4d-e1bf60c15a31
     libvirt-f06ad419-f312-f002-444f-3e51f40d2291
  0 profiles are in complain mode.
  4 processes have profiles defined.
  4 processes are in enforce mode :
     /usr/sbin/libvirtd (2459) 
     libvirt-7262201f-566b-d0b1-16ec-0b404ccd5336 (2521) 
     libvirt-c032ea0a-8c62-7730-fb4d-e1bf60c15a31 (2551) 
     libvirt-f06ad419-f312-f002-444f-3e51f40d2291 (2582) 
  0 processes are in complain mode.
  0 processes are unconfined but have a profile defined.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/893450/+subscriptions




More information about the foundations-bugs mailing list