3

So I had been considering that partition is like a separate section of space. Recently, I decided to experiment with partitions and found a flaw in my understanding. Some examples refer to a case where one should make 3 partitions:

  1. / = root, 32GiB
  2. /boot = boot, 1GiB
  3. /home = home, 100% = 200GiB

Now it gets somewhat confusing to me - since I suppose that the / is the main container and other containers are children of the former one, why child containers, like, /home (200GiB) actually exceed the limits of / which has only 32GiB?

  • 1
    /home is not a child of / (ie., it is not contained within it) unless you do not create a separate partition for it, in which case you would need to make / large enough to contain it. – jasonwryan May 28 '16 at 20:58
4

You are confusing filesystem (organization) semantics with partition (storage) semantics.

Linux filesystem hierarchy is like a single giant tree with a stem (/) , branches ( /boot, /home, /bin, /usr, /var ) and sub-branches ( /usr/bin, /var/log ...). This metaphor is equivalent of the parents, children and grandchildren.

All these symbols/names in the filesystem represent points on the tree where storage space, like a partition , usb, external drive etc. can be hung ("mounted").

If you hang/mount some storage space only onto the stem of the tree (/) , then all the branches, and subranches of the stem (/boot,/home,/usr/bin) have to be contained within that storage space.

However if , after mounting the first storage space onto the stem (/), you then proceed to mount some additional storage space (e.g. another partition) onto one of the branches (e.g. /home) , then this second mounted storage is added to the total storage under the filesystem, but can only be accessed through its mountpoint (e.g. /home) on the filesystem. This second storage mounted on /home is in ADDITION to that mounted on the (/). All other branches of the / (like /boot, /usr, /var etc) will still have to be contained with the first mounted storage !

So / , /boot, /home, and others are simply access points on the filesystem. When you mount some storage onto any of those points (e.g. /), all the children and grandchildren of that point are automatically contained within this storage space UNTIL you mount some additional storage on one of its children or grandchildren.

1

Partitions do not contain other partitions.

Every partition that you use has a mounting point. The main (root) partition, needs to be automatically mounted on / during boot, and then other partitions can be mounted in any existing location you chose.

One important thing to note is that mounting a partition somewhere will hide what is already present at that same location of the partition it is mounted on. So if you write files in /boot before mounting it, those files will not be available once /boot gets mounted.

0

The root (/) is the main container, and it contains all of your system. Partitions are just pieces of the hard drives, containing a file system.

Now, the root has nothing to do with the other file systems, you have to 'mount' them first. That way you bind a directory to a partition. So the 'home' directory in your file system would redirect to partition you mounted it. Note that the root itself is mount to a partition.

The partitions are not contained in each other, you just connect one with another by mounting them.

You can see in your /etc/fstab which partitions you have, and where they are mounted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.