LVM2 doesn't recognise 'virtio' virtual disks (/dev/vd*)

Bug #205011 reported by Martijn vdS
8
Affects Status Importance Assigned to Milestone
lvm2 (Ubuntu)
Fix Released
High
James Westby

Bug Description

Binary package hint: lvm2

I have several virtual servers running in kvm (both host and guest are up-to-date hardy). Using LVM2 version 2.02.26-1ubuntu8

I've tried to enable the virtio disk bits (-drive file=/dev/mapper/whatever,if=virtio,boot=on on the kvm command line), but if I do that, my system hangs on boot, while trying to find the root fs (which is on an LV).

The virtio devices are detected, and if I boot another guest in exactly the same way (except that it's not using lvm2 for /), everything works fine.

Adding "types = [ "virtblk", 16 ]" to the devices {} section of /etc/lvm/lvm.conf, making sure that file gets added to initramfs (it doesn't by default!), and then regenerating initramfs seems to solve the problem for me.

I think the "virtblk" device should be added to a default list of allowed devices.

Revision history for this message
Marco Baan (marco-sente) wrote :

Followed exact same steps, had same issues.

Changed in lvm2:
status: New → Confirmed
Revision history for this message
Soren Hansen (soren) wrote :

This is important and simple to fix (add virtblk to filter.c)

Changed in lvm2:
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
James Westby (james-w) wrote :

Hi,

Attached is a debdiff to fix the issue, would someone be able
to test that this works correctly?

Thanks,

James

James Westby (james-w)
Changed in lvm2:
assignee: nobody → james-w
status: Confirmed → In Progress
Revision history for this message
James Westby (james-w) wrote :

Hi,

liw gave a positive testing report with this fixed package.
He was unable to boot using -drive with the old lvm2,
but could with this version.

Could someone please sponsor the package in to Hardy
for post-RC?

Thanks,

James

Revision history for this message
Daniel Holbach (dholbach) wrote :

Søren: can you take a look at it?

James Westby (james-w)
Changed in lvm2:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.