How to: Device Mapper Number to LV Name

It is often confusing when device mapper number appears while troubleshooting in place of logical volume names. Device mapper numbers are like dm-1, dm-2 ..., while logical volume names are given names. There is a simple command available to find out which dm belongs to which lv. 

Run:
dmsetup ls

This would show something similar to the following:

# dmsetup ls
vg0-tp0-tpool (253:4)
vg0-tp0_tdata (253:3)
vg0-tp0_tmeta (253:2)
vg0-qcow2 (253:9)
vg0-tp0 (253:5)

It says dm-5 is /dev/vg0/tp0 or dm-9 is /dev/vg0/qcow2. The number after : would extend the dm number in /dev.
  • lvm, device mapper, dmsetup, dev, linux
  • 0 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

LVM Cheatsheet

To install LVM2 in CentOS/Redhat servers: yum install lvm2 1. Add a partition to physical...

How to: Extend LVM partition

To increase the partition lv0 under volume group vg0 by 50GB, use lvextend command: lvextend...

How to: LVM Snapshot

LVM snapshot can be useful for filesystem integrity check and backups. A snapshot of size 15GB...

How to: Repair a lvm thin pool

Sometimes there can be error like the following:Thin's thin-pool needs inspection.It can appear...

How to: List volume id or uuid in Linux

There are places where it is called volume id like r1soft, while most of the cases they are...