What is this dm-0 device?
While poking around trying to figure out why a Linux -> Linux file transfer is running slower than I think it should, I stumbled across something I'm not familiar with. /dev/dm-0 seems to be my bottleneck, but I have no idea what it is.
On my destination server, the iostat command shows a device at the bottom, /dev/dm-0, as being 100% utilized. This server has 6 disks in a mdadm raid5 set, with LVM running on top of it. Each of the underlying disks are sitting around 50% util. The transfer is writing to a logical volume located on this raidset.
What is this /dev/dm-0 thing? Once I know what it is, maybe I can find how to increase its speed, or at least understand why its the speed that it is.
Solution 1:
It's part of the device mapper in the kernel, used by LVM. Use dmsetup ls
to see what is behind it.
Solution 2:
Those are LVM logical "devices"
You can map them using:
# sudo lvdisplay|awk '/LV Name/{n=$3} /Block device/{d=$3; sub(".*:","dm-",d); print d,n;}'
dm-0 /dev/SysVolGroup/LogVolRoot
dm-1 /dev/SysVolGroup/xen
dm-2 /dev/SysVolGroup/db1-2
dm-3 /dev/SysVolGroup/db1-2swap
dm-4 /dev/SysVolGroup/python1
dm-5 /dev/SysVolGroup/python1swap
dm-6 /dev/SysVolGroup/db1-2snap
source: http://www.linuxquestions.org/questions/linux-newbie-8/dm0-in-iostat-652771/
Solution 3:
As usual under a Linux system, there should be many ways to get the same result. If you've been given a non root user, I advise you to use lsblk
command (e.g. list block devices) which will build a tree view of disks dependencies:
[oracle@abcdlinux ~]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 300G 0 disk
└─RATGORA1DSY_PJSTORE_1 (dm-4) 253:4 0 300G 0 mpath
└─RATGORA1DSY_PJSTORE_1p1 (dm-5) 253:5 0 300G 0 part /oradata
sdb 8:16 0 100G 0 disk
└─Boot-RATGORA1DSY (dm-0) 253:0 0 100G 0 mpath
├─Boot-RATGORA1DSYp1 (dm-1) 253:1 0 100M 0 part /boot
├─Boot-RATGORA1DSYp2 (dm-2) 253:2 0 16G 0 part [SWAP]
└─Boot-RATGORA1DSYp3 (dm-3) 253:3 0 83.9G 0 part /
sdc 8:32 0 300G 0 disk
└─RATGORA1DSY_PJSTORE_1 (dm-4) 253:4 0 300G 0 mpath
└─RATGORA1DSY_PJSTORE_1p1 (dm-5) 253:5 0 300G 0 part /oradata
sdd 8:48 0 100G 0 disk
└─Boot-RATGORA1DSY (dm-0) 253:0 0 100G 0 mpath
├─Boot-RATGORA1DSYp1 (dm-1) 253:1 0 100M 0 part /boot
├─Boot-RATGORA1DSYp2 (dm-2) 253:2 0 16G 0 part [SWAP]
└─Boot-RATGORA1DSYp3 (dm-3) 253:3 0 83.9G 0 part /