RHEL5: fdisk -l returns: What does it mean? Wish to understand linux partitions.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.