How do I know what physical drives/partitions are behind my /dev/mapper/isw_dghbbcaabe_RAID_Volume11?
This is a just upgraded Ubuntu 10.04.1 LTS machine.
The /dev/mapper/isw_dghbbcaabe_RAID_Volume11
is "new" to the upgrade but I don't know what physical drives/partitions are included in the "device".
I have tried:
root@barabasi:~# blkid
/dev/sda1: UUID="8258e116-265a-4797-59d1-fae72a643620" TYPE="swap"
/dev/sdb: TYPE="isw_raid_member"
/dev/mapper/isw_dghbbcaabe_RAID_Volume11: UUID="1d4721b1-5649-4772-8a03-5c3db81eba1b" TYPE="ext3"
/dev/mapper/isw_dghbbcaabe_RAID_Volume15: UUID="b9a639af-dee8-4e0c-90f6-15432efac4f2" TYPE="swap"
and
root@barabasi:~# ls -alh /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root 100 2011-01-14 12:49 .
drwxr-xr-x 5 root root 100 2011-01-14 12:49 ..
lrwxrwxrwx 1 root root 41 2011-01-14 12:49 1d4721b1-5649-4772-8a03-5c3db81eba1b -> ../../mapper/isw_dghbbcaabe_RAID_Volume11
lrwxrwxrwx 1 root root 10 2011-01-14 12:49 8258e116-265a-4797-59d1-fae72a643620 -> ../../sda1
lrwxrwxrwx 1 root root 41 2011-01-14 12:49 b9a639af-dee8-4e0c-90f6-15432efac4f2 -> ../../mapper/isw_dghbbcaabe_RAID_Volume15
But I still don't know what physical drives are involved.
Best quick overview I have seen is lsblk, which prints a reasonable output even if you have a complicated setup.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 223,6G 0 disk
├─sda1 8:1 0 350M 0 part
├─sda2 8:2 0 29G 0 part
├─sda3 8:3 0 488M 0 part /boot
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 193,8G 0 part
├─vg_ssd-lv_root_solid 254:0 0 13,3G 0 lvm /
├─vg_ssd-lv_srv_solid 254:2 0 46,6G 0 lvm /srv
└─vg_ssd-lv_home_solid 254:3 0 107G 0 lvm /home
sdb 8:16 0 74,5G 0 disk
└─sdb1 8:17 0 74,5G 0 part
├─vg_ssd-lv_swap_solid 254:1 0 3,7G 0 lvm [SWAP]
└─vg_ssd-lv_videos 254:4 0 28G 0 lvm /mnt/videos
See also: this more detailed answer on server fault.
I found the easiest command is -
$ sudo dmsetup deps -o devname
Which gives you the actual device name without the need to figure out the major/minor numbers.
Or just execute the following command:
$ sudo dmsetup ls --tree
which will show how your block devices are stacked.
You can use dmsetup. Invoke:
$ sudo dmsetup -v table /dev/mapper/isw_dghbbcaabe_RAID_Volume11
That will give you a list of sectors which are mapped to another device. In my case (encrypted root partition), I get the following output:
$ sudo dmsetup table /dev/mapper/hacki-mobile
0 567028121 crypt aes-cbc-essiv:sha256 0000000000000000000000000000000000000000000000000000000000000000 0 8:6 2056
That means that sectors 0-567028121 are mapped to a device with major/minor number 8/6. That is the 6th partition on my sda drive, as you can see with:
$ ls -Al /dev/sda6
brw-rw---- 1 root disk 8, 6 2010-12-21 14:38 /dev/sda6
Your output from dmsetup maybe a bit different, as I'm on Ubuntu 10.04