RFE : Please include rule for virtio block devices

Bug #307845 reported by Tuomas Jormola on 2008-12-14
2
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: udev

Hi,

The following patch adds support for virtio based disks (/dev/vd* devices). The driver was added in Linux 2.6.26 and newer libvirtio supports attaching and detaching of disks while KVM virtual machine is running. With standard Intrepid the block devices are not automatically created when a new disk is plugged in. With this patch applied, hot-plugging of virtio disks works as expected (though the driver currently doesn't implement clean deatchment of disks, but that's another story and not related to udev in any way). Please apply for jaunty.

Tuomas Jormola (tjormola) wrote :

This patches an upstream rules file, please send your patch upstream instead

Changed in udev:
status: New → Confirmed

Err, sorry, jet-lag thinko there.

This patch changes a file *only* included for backwards compatibility with certain parts of the installer, and other pieces we don't know about.

Patching it for new functionality is explicitly wrong.

What is broken by not including this patch? Or did you just grep to see where you might need it?

Changed in udev:
status: Confirmed → Won't Fix
Tuomas Jormola (tjormola) wrote :

Maybe I should've been more specific. Currently, when you boot a KVM
based virtual machine with virtio based block device configured, there
will be /dev/vd[a-z] block device nodes available for disks that were
attached when you first booted. However, if you hot-plug new disks to
the VM by e.g. running command attach-disk in virsh management utility,
and the kernel is configured to detect plugging of disks (default
Intrepid kernel will work just fine as long as acpiphp
module is loaded), no block device for the disk is created under /dev.
udev does not know about these vd* disks and thus no new /dev/vd*
device is created for the newly plugged in disk. Thus you can't actually
access the new disk for e.g. partitioning it since there's no
corresonding block device available. With this patch applied to the rule
file, udev will create /dev/vd* block device for the new disk as
expected, as it does when e.g. a FireWire or USB disk is plugged in, and
you can partition the disk with fdisk or do what ever you normally do
with a block device node. I don't care where this rule should be put,
go ahead and implement functionally equivalent fix somewhere else,
it's just that current udev in Ubuntu does not work as it should.

 status incomplete

On Mon, 2008-12-15 at 14:36 +0000, Tuomas Jormola wrote:

> With this patch applied to the rule file, udev will create /dev/vd*
> block device for the new disk as expected
>
Sorry, but this makes no sense.

The patch you attached makes a change to the 65-id-type.rules file only.
This file has no other effect than setting an $ID_TYPE environment
variable, because that variable is used by the installer.

Please unapply this patch from your system, and then run:

 sudo udevmonitor -e

And then try attaching and detaching disks. Attach the output of that
command.

Scott
--
Scott James Remnant
<email address hidden>

Changed in udev:
status: Won't Fix → Incomplete
Changed in udev:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments