Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

If I run iostat I got

sda0, sda1,

I sort of know that those are the "hard disks".

then there is dm-0, dm-1? I wanted to check the documentation.

I checked http://linux.die.net/man/1/iostat it's not mentioned at all.

Also my mount command shows this:

/dev/mapper/VolGroup-lv_root    /   ext4    usrjquota=quota.user,jqfmt=vfsv0    1   1
UUID=1450c2bf-d431-4621-9e8e-b0be57fd79b6 /boot                   ext4    defaults        1 2
/dev/mapper/VolGroup-lv_home    /home   ext4    usrjquota=quota.user,jqfmt=vfsv0    1   2
/dev/mapper/VolGroup-lv_swap swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/usr/tmpDSK             /tmp                    ext3    defaults,noauto        0 0
/dev/sdb1               /home2                  auto    auto,defaults         0 0
/dev/sdc1               /home3                  auto    auto,defaults         0 0
/dev/sdd1               /home4                  auto    auto,defaults         0 0

It looks like dm-0, corresponde to one of /dev/mapper/VolGroup-lv. Not sure which one.

share|improve this question

migrated from serverfault.com Jan 2 '13 at 15:08

This question came from our site for system and network administrators.

3 Answers 3

up vote 5 down vote accepted

sda0, sda1 are the hard drives attached to your machine.

dm-0 & dm-1 are the Logical volume managers' logical volumes you would have created while installing or configuring your machine

You can read more about it at Wiki

share|improve this answer
    
I know it's kind of basic. But it's a very good answer and there is no easy way to find this info in google :) –  Sharen Eayrs Dec 24 '12 at 10:00
    
The wiki, for example, doesn't tell that the logical volumes are dm-0 and dm-1 in iostat –  Sharen Eayrs Dec 24 '12 at 10:01

iostat reports statistics on block devices. Block devices include a lot of things, not just hard disks. On my desktop, iostat -p ALL -kx gives 37 lines of stats.

In your case, try the -N option, which will give you nice names for your dm devices.

The names of block devices actually come from the kernel and (maybe) udev; iostat is just dumping out the information the kernel keeps. It doesn't care about the names, really. Its the kernel and udev documentation you need to check to see what the devices are.

Here are some common ones:

  • hdX — ATA hard disk, pre-libata. You'll only see this with old distros (probably based on Linux 2.4.x or older)
  • sdX — "SCSI" hard disk. Also includes SATA and SAS. And IDE disks using libata (on any recent distro).
  • hdXY, sdXY — Partition on the hard disk hdX or sdX.
  • loopX — Loopback device, used for mounting disk images, etc.
  • loopXpY — Partitions on the loopback device loopX; used when mounting an image of a complete hard drive, etc.
  • scdX, srX — "SCSI" CD, using same weird definition of "SCSI". Also includes DVD, Blu-ray, etc.
  • mdX — Linux MDraid
  • dm-X — Device Mapper. Use -N to see what these are, or ls -l /dev/mapper. Device Mapper underlies LVM2 and dm-crypt. If you're using either LVM or encrypted volumes, you'll see dm-X devices.

Note that not all devices keep all iostat information. E.g., mdraid doesn't keep queue statistics, and those columns will always be 0.

You can look in /sys/class/block or /dev/block to see all the block devices on your system.

share|improve this answer

A lot of this stuff is in devices.txt from the kernel source documentation (src/Documentation/devices.txt), also available here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.