KVM Virtio disk major no

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.

On 03/27/2013 08:14 AM, Ningappa wrote:[color=blue]

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.[/color]

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ā€ (??)

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.

Hi,
Can I identify Virtio block device,without looking @ major noā€¦???:confused:

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