LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RHEL5: fdisk -l returns: What does it mean? Wish to understand linux partitions. (https://www.linuxquestions.org/questions/linux-newbie-8/rhel5-fdisk-l-returns-what-does-it-mean-wish-to-understand-linux-partitions-747572/)

redhat5 08-14-2009 12:05 PM

RHEL5: fdisk -l returns: What does it mean? Wish to understand linux partitions.
 
[root@localhost ~]# fdisk -l

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 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 1288 10241437+ 83 Linux
/dev/sda3 1289 1419 1052257+ 82 Linux swap / Solaris
/dev/sda4 1420 9729 66750075 5 Extended
/dev/sda5 1420 9729 66750043+ 8e Linux LVM

MensaWater 08-14-2009 12:31 PM

You can get a lot of information by typing "man fdisk".

Your output shows you have only one drive (/dev/sda, a second drive would be /dev/sdb, a third /dev/sdc etc...) which is 80 GB in size.

The sda1, sda2, sda3, sda4 are "primary partitions". (You can only have 4). sda5 is an extended partition.

sda1 and sda2 have been designated as Linux partitions (meaning you can put Linux filesystems on them). sda3 is designated as Linux swap meaning it can have the swap device (used to augment virtual memory pool by combining disk space with physical memory). sda4 was made Extended so you could have extended partitions made from it. One extended partition, sda5, was made as a Linux LVM partition using all the space allocated in the sda4 Extended partition. (You could have had more than sda5 if it weren't using all that space). LVM = Logical Volume Manager. LVM allows for more "logical volumes" (LVs) which means you can split up that one partition into multiple LVs and mount each of those.

You can get more details of your layout by running "df -h" and examining /etc/fstab. Also running vgdisplay and lvdisplay commands will give you more information.

"man df", "man fstab" and "man lvm" will give you more details. For most commands, libraries and configuration files in Linux there is a man page.

forrestt 08-14-2009 12:37 PM

OK, It is saying:

line 1: you have a Disk attached to /dev/sda (scsi disk 1 a=1, b=2, c=3, etc.) that is 80 GB
line 2&3: tells you the geometry of the drive (not really important anymore)
line 6: the first partition of the drive is bootable (the *) it starts at sector 1 and continues to sector 13. it is 104391 blocks and has a type ID of 83 which means it is a Linux partition (as it says).
line 7: the second partition starts at sector 14 and ends at 1288 which takes up 10241437+ blocks it is also type 83 (Linux)
The next partition has a type of 82 which is either a Linux swap partition or a Solaris partition (they both fought over type ID 82 and neither won).

You then have an extended partition which takes up the rest of your disk.
The last line says that you are using Logical Volume Management to manage that partition.

HTH

Forrest


All times are GMT -5. The time now is 09:29 PM.