# KVM Virtio disk major no

**URL:** <https://forums.suse.com/t/kvm-virtio-disk-major-no/23790>\
**Category:** SLES Virtualization\
**Created:** [March 27, 2013, 3:13pm UTC](https://forums.suse.com/t/kvm-virtio-disk-major-no/23790 "2013-03-27T15:13:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ningappa](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@Ningappa](https://forums.suse.com/u/Ningappa)\
**Post date:** [March 27, 2013, 3:13pm UTC](https://forums.suse.com/t/kvm-virtio-disk-major-no/23790/1 "2013-03-27T15:13:39Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/5/5012ba89e3ffb5220dac47d5ea0ba032e2fe1cb6.png) [@system](https://forums.suse.com/u/system)\
**Post date:** [March 31, 2013, 4:39am UTC](https://forums.suse.com/t/kvm-virtio-disk-major-no/23790/2 "2013-03-31T04:39:33Z")

</div>

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” (??)

---

<div class="post-metadata">

**Author:** ![Ningappa](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@Ningappa](https://forums.suse.com/u/Ningappa)\
**Post date:** [April 1, 2013, 8:30am UTC](https://forums.suse.com/t/kvm-virtio-disk-major-no/23790/3 "2013-04-01T08:30:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ningappa](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@Ningappa](https://forums.suse.com/u/Ningappa)\
**Post date:** [April 1, 2013, 4:26pm UTC](https://forums.suse.com/t/kvm-virtio-disk-major-no/23790/4 "2013-04-01T16:26:31Z")

</div>

Hi,  
Can I identify Virtio block device,without looking @ major no…???😕

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [April 3, 2013, 2:55pm UTC](https://forums.suse.com/t/kvm-virtio-disk-major-no/23790/5 "2013-04-03T14:55:50Z")

</div>

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
