[ale] Questionable output from fdisk -l

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Sep 25 14:54:31 EDT 2007


On Tue 2007-09-25 14:20:23 -0400, Scott Castaline wrote:

> Disk /dev/dm-7 doesn't contain a valid partition table
>
> This goes through to dm-15, with the only difference being the
> capacity/geometry listed for each. I also noticed in /dev that there
> are block device files for dm-7 to dm-15. What do these represent? 

the dm-X devices come from devmapper, the ultra-flexible Linux block
device abstraction layer.  LVM makes much use of devmapper.  each LV
(logical volume) in an LVM system has its own block device.
Naturally, there's no reason to put a partition table on an LV, which
explains why fdisk can't find a legitimate partition on any of
/dev/dm-7 through /dev/dm-15.

You can figure out which /dev/dm-* is which by matching device node
major and minor numbers.  For example, on my system, /dev/dm-3 is my
swap LV:

[0 dkg at squeak ~]$ ls -la /dev/dm-5
brw-rw---- 1 root disk 253, 5 2007-09-14 14:48 /dev/dm-5
[0 dkg at squeak ~]$ ls -la /dev/mapper | grep ' 253, *5 '
brw-rw----  1 root disk 253,  5 2007-09-14 14:48 squeak0-swap
[0 dkg at squeak ~]$ 

These major and minor node numbers might switch around across various
manipulations of LVM (including reboots) so don't count on them to be
static.

hth,

        --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 826 bytes
Desc: not available




More information about the Ale mailing list