PDA

View Full Version : KVM Virtio disk major no



Ningappa
27-Mar-2013, 14:13
Hi

Just I need to know about major no of virtio disk in KVM. for /dev/vda and /dev/vdb I got 253 as major no, is there any possibility like getting other than 253:confused:


Thanks.

cjcox
31-Mar-2013, 02:39
On 03/27/2013 08:14 AM, Ningappa wrote:
>
> Hi
>
> Just I need to know about major no of virtio disk in KVM. for /dev/vda
> and /dev/vdb I got 253 as major no, is there any possibility like
> getting other than 253:confused:
>
>
> Thanks.

Can't say for sure.. but 253 is usually the device mapper devs. It may well be
that it's used for the virtual block devices as well (maybe they are related).

May I ask "why" it's important? My guess is that you're trying to identify
something... and maybe there's a much better way (??)

Can you tell us exactly why it's important to you? It may help in getting you a
"better answer" (??)

Ningappa
01-Apr-2013, 06:30
Hi,
I have a program,which reads major and minor no from "/proc/partition" and identifies whether that drive is SATA, IDE or Virtio. I want to know standard way of Identifying Virtio devices.

Thanks.

Ningappa
01-Apr-2013, 14:26
Hi,
Can I identify Virtio block device,without looking @ major no...???:confused:

jmozdzen
03-Apr-2013, 12:55
Hi Ningapa,

> Can I identify Virtio block device,without looking @ major no

this should be possible by looking at /sys/block/$devname/* ($devname is i.e. from the forth column of /proc/partition - if no /sys/block-entry exists, then it's no device, but just a partition).

The format of the sys entry depends on the type of device, so not every "file" is available for every type. Check a known virtio device entry for some promising indicator and use that for your detection.

Just my 0.02$ ...

Jens