2

Consider this:

 # fdisk -l /dev/sda Disk /dev/sda: 298.9 GB, 298999349248 bytes 255 heads, 63 sectors/track, 36351 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 13 104391 83 Linux /dev/sda2 14 36351 291884985 8e Linux LVM 

and this

 # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/VolGroup00-LogVol00 276883300 3610240 258981300 2% / /dev/sda1 101086 19371 76496 21% /boot tmpfs 1993292 0 1993292 0% /dev/shm 

(The OS is Centos 5.5 64-bit, the HW is IBM ServeRAID M1015 using an LSI MegaRAID BIOS)

Why does df use a long filesystem name instead of /dev/sda2?

1 Answer 1

3

df shows you mounted filesystems, which reside on block devices. fdisk is showing you the partition table on your /dev/sda block device. Since you don't have a filesystem mounted directly on /dev/sda2, you won't see it appear in df output. Your root filesystem (the first entry in df) is on an LVM logical volume, which, after consulting your fdisk output, is likely in turn on an LVM physical volume on /dev/sda2.

When comparing block device names in df output with those in output from the LVM management utilities, it helps to know that the kernel uses the full device name for df (here it's /dev/mapper/VolGroup00-LogVol00). The device mapper creates convenient symlinks in /dev that correspond with your volume group names. You can correlate the two outputs by ignoring the "mapper" portion of the name in df, and replacing the hyphen with a forward slash. Running ls -al /dev/VolGroup00 will illustrate the relationship for you.

This doesn't really have anything to do with hardware raid. These utilities would give you the same information regardless of controller type.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.