LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   data capacities of root and mounted partitions (https://www.linuxquestions.org/questions/linux-newbie-8/data-capacities-of-root-and-mounted-partitions-810968/)

bluegospel 05-29-2010 02:58 PM

data capacities of root and mounted partitions
 
Hi. I just want to confirm my understanding of the filesystem and mount point setup is correct.

My Linux partition is 9 GB. I have an NTFS partition for files shared between Windows & Linux. Now, if my shared partition is 40 or 50 GB, how does that fit into the filesystem.

My understanding is that my Linux filesystem itself can contain up to 9 GB (this size of my Linux partition) with the exception of those directories to which my shared partition, for example, are mounted.

So am I correct in saying that a directory to which a partition is mounted has its own capacity separate from the filesystem, and that the filesystem itself is 9 GB, with the exception of these special directories?

baig 05-29-2010 03:24 PM

Hi,
Your mounted drive is accessed through mount point, which happens to be an empty folder. Mount doesn't mean all contents of mounting drive are copied under "/" directory or into mount point only it give you a method of accessing a drive. It's the way linux handles drives to be accessed.

Cheers!!

bigearsbilly 05-29-2010 03:25 PM

A filesystem is what you put on a partition.
format in dos speak.
NTFS = NT File System. FAT16 FAT32 etc.
linux is usually ext3fs.

in unix the root filesystem is the master.
other filesystems are mounted on to direcories.
you can even mount an NTFS filesystem onto a linux tree.

in windows you can even mount a volume onto a directory.

ext3 fs has a limit of: 2 TB to 32 TB according to wikipedia.

Robhogg 05-29-2010 03:37 PM

Yes, sort of, except that it is not the directory that has the capacity. It is the filesystem mounted on that directory.

The mountpoint is just a normal directory, created in the Linux filesystem. If you unmounted the NTFS partition, and saved a file in the directory, it would take up some of the 9GB capacity of it's parent filesystem. When you mount another partition on that directory, though, it becomes something like a link into the other filesystem.

Any files that were saved into the directory before mounting the NTFS filesystem would still be there, but inaccessible until the partition was unmounted again.

bluegospel 05-29-2010 04:20 PM

Thanks folks. Now I understand.

tommyttt 05-31-2010 02:36 AM

Quote:

Originally Posted by bigearsbilly (Post 3985738)
A filesystem is what you put on a partition.
format in dos speak.
NTFS = NT File System. FAT16 FAT32 etc.
linux is usually ext3fs.

in unix the root filesystem is the master.
other filesystems are mounted on to direcories.

Not necessarily! Other filesystems can ALSO be mounted on their own partition. For instance, I have /Data and /opt on their own partitions.
Quote:

you can even mount an NTFS filesystem onto a linux tree.

in windows you can even mount a volume onto a directory.

ext3 fs has a limit of: 2 TB to 32 TB according to wikipedia.

alli_yas 05-31-2010 02:54 AM

Quote:

other filesystems are mounted on to direcories.
Quote:

Not necessarily! Other filesystems can ALSO be mounted on their own partition. For instance, I have /Data and /opt on their own partitions.
Regarding the above, understand that you don't mount a partition on a mount point. The process is that a partition is representative of a raw device that has been "formatted" into an OS logical device of sorts.

When you create a filesystem for a particular partition/s, you are now formatting a type of filesystem on that area of disk.

Thereafter this filesystem can be mounted on a particular mount point that you create. You don't mount a filesystem on a partition.

The root filesystem on *nix is the "master" filesystem; and if you so choose to partition your disk into many slices; and thereafter create multiple filsystems; this is also supported.

To answer the OP's questions:

Quote:

My understanding is that my Linux filesystem itself can contain up to 9 GB (this size of my Linux partition) with the exception of those directories to which my shared partition, for example, are mounted.
Unfortunately your understanding hear is incorrect. Your Linux and NTFS partitions are distinct partitions that won't impact each other since these are distinct areas of your disk; that have been earmarked as different devices.

Quote:


So am I correct in saying that a directory to which a partition is mounted has its own capacity separate from the filesystem, and that the filesystem itself is 9 GB, with the exception of these special directories?
More or less your understanding is near correct. The first inaccuracy is that you don't mount a partition - you mount a filesystem.

Secondly you don't mount onto a directory; you mount onto a mount point

Lastly I'm not sure what you mean by "special directories". If you have a 9GB filesystem (be it ext3 or ext4 etc) mounted on a specific mount point; then you have 9GB of space available within that filesystem. The filesystem is accessed via the mount point.

So if you mount a filesystem of 9GB on /myhomedir; doing a df -kh will show you exactly what filesystem is mounted on your mount point; as well as the capacity used/free.


All times are GMT -5. The time now is 10:53 AM.