Here is the video version, if you prefer it:
Today let’s talk about the thing that bothered me for some time. What is a partition exactly? What is a filesystem, exactly? How do they relate to each other?
Let’s go top-down, from the biggest to the smallest. First, the hardware – the permanent storage devices. There are many permanent storage devices, but let’s focus on the ones most people use in their computer for permanent storage. They can be either hard drives or solid state drives. Permanent storage device is the physical device your data is stored on. Again, the term also includes USB drives, CDs and DVDs, but let’s focus on hard drives and solid state drives. Let’s call them disks.
Partitions are subdivisions of the whole disk. A disk can, thus, be divided into multiple partitions. Partitions are defined on a small area of the disk called a partition table. (Ward, 2014)
Every partition has a filesystem. A filesystem is a hierarchy of files and directories you are accustomed to interacting with. A filesystem resembles a database. A great illustration of this is in the figure below, modeled after (Ward, 2014), page 66.
If we want to access a file, we first consult the partition table to see which partition we need to access. Then after we access that partition, we consult the filesystem database to find the data we are looking for.
I think this is important to understand conceptually, as there is a lot of confusion between what is a partition and what is a filesystem. I hope this cleared it up.
Thank you for reading!
Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Pages 66-67
Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.