Find the answer to your Linux question:
Results 1 to 7 of 7
HI there, thank you guys for this forum, I have problems to fully understand what filesystem is in linux and the concept of mounting so far, I understand that since ...
  1. #1
    Just Joined!
    Join Date
    Mar 2011
    Posts
    6

    understanding Filesystem and mounting

    HI there,

    thank you guys for this forum,
    I have problems to fully understand what filesystem is in linux and the concept of mounting

    so far,
    I understand that since all in linux is a file or directory any peripherial will be a file they will need to be mounted into our filesystem, and this may be done in / directory or any other? or any place into the / tree?
    a filesystem by default is a tree starting in /? if yes why I see docs talking about to generate your own filesystem? is possible to have a different tree in paralel as /?

    or filesystem concern also the partitions used for diferent directories? I means the tree from / look to users always the same but /usr or /home or /boot may be stored in complete diferent phisical or virtual volumes?
    to be clear (if I can...! look to me as the filesystem is, let's say, a first layer which look always the same starting from / but as a "second layer, let me say so, there is a "crossover net" linking /usr here, /boot there, /home here (meand hda1, hda2 or whatever...

    well it maybe make nosense that's why I need your help to figure this out at once...
    thank you guys for your help!!
    regards

    fede

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    a filesystem by default is a tree starting in /? if yes why I see docs talking about to generate your own filesystem? is possible to have a different tree in paralel as /?
    I think "generate your own filesystem" just means what you
    do when you format a partition. You are creating a file system
    on that partition. As far as I know, you can't have a separate
    tree from /. Microsoft, as you know, has a separate
    tree on each partition.

    And, yes, different partitions can be mounted at various
    convenient places on the tree. You may choose to mount
    a partition at /home, so if your OS gets messed up
    you can reinstall without having to recreate users' home
    directories. I have a second drive mounted at a folder inside
    my own home directory, for easy access.

    Once you know where you want extra partitions mounted
    the /etc/fstab file can be edited to mount them at
    boot time. Many systems are very clever and automatically
    mount USB drives, putting an icon on the desktop. It is a good
    idea to right click and "unmount" an external drive before
    unplugging it.

  3. #3
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Hi,
    1st:
    A file system is the management system to read and write information on a HDD

    There are several different file systems usable with different advantages and disadvantages.
    Examples: ext3, ext4, xfs, rfs, fat, ntfs (fat and ntfs are the windows fs)
    theses are the most common.

    2nd:
    Unlike in windows a Partition won't be showen as "c:" or anythink like that.

    3rd:
    In linux you have a tree.
    / is root ... it only means that there is no directory above it
    there are several folders reserved for special use:
    /etc = configuration
    /dev = devices connected
    /var = running variables as databases, logs, webpages
    /home = user-space for data
    /root = user-space for root
    /tmp = temporary data in RAM
    ...

    If you connect a HDD and it is found correctly you will find it in the folder /dev
    If it is a SCSI, SATA or USB drive it will have a name starting with: sd
    sda would be the first HDD found.
    sdb the secound ... aso

    If you have a primary partition 1 on the hdd sda
    you will find a entry: /dev/sda1

    Here the filesystem starts:
    Now it is possible to create a filesystem on that partition. (In windows you just would be asked to format a newly found HDD)

    If that is done you can mount the filesytem.
    Since linux ain't using letters like c,d,e ... you need to tell where you want your drive showen.
    Ubuntu for example will create a folder /media/sda1 ... but you are able to change that folder to nearly anything you like.
    The information where the system will mount a partition is stored in /etc/fstab

    As you can imagine one partition needs to store the whole config, and folders that aren't a mounting point ...
    So you need a partition for the folder /.
    Thats the standart system partition.
    If no hdd is mounted on /media/sda1 and you write a file there it will be written on the hdd of /

  4. #4
    Just Joined!
    Join Date
    Mar 2011
    Posts
    6
    If you have a primary partition 1 on the hdd sda
    you will find a entry: /dev/sda1

    Here the filesystem starts:
    Now it is possible to create a filesystem on that partition. (In windows you just would be asked to format a newly found HDD)

    -----------------------
    thank you guys for your help, let me see if I understand correctly,
    I will have the following structure:

    -a main filesystem in / wich will be ext1 and will be mounted on hda
    -a partition as hda1 which will be a filesystem fat and where I will locate /home (only /home directory showed in the main / tree).
    -a partition hdb in ext2 where I will mount /boot (which is the only boot directory showed on my / tree.

    is this correct?

    thank you again

  5. #5
    Linux Newbie
    Join Date
    Dec 2009
    Posts
    241
    Hi:
    hda itself usually doesn't have a filesystem.
    A HDD is usually parted in sections ... called partitions
    Disk partitioning - Wikipedia, the free encyclopedia

    You can change the partitions of your drive with different tools as partition magic, fdisk, ....

    Then you can create a filesystem on a partition.
    So as example:
    hda = harddisk
    hda1 = first partition
    / = mount point of the system
    /media/hdb1 = possible mount point for hdb1

    What file-system you use is up to you ... the most used in linux are: xfs, ext3 and ext4

    hda1 represents a part of hda ...
    So a possible scenario would be:
    hda is your harddrive with 100G
    hda1 is primary partition 1 with the first 20G of hda
    hda2 is primary partition 2 with the rest of the drive

    hda1 gets a ext4 filesystem (mkfs)
    hda2 gets a xfs

    This commands would create the link from the "tree" to the partition ...
    mount /dev/hda1 /media/hda1
    mount /dev/hda2 /media/hda2

  6. #6
    Linux Newbie theKbStockpiler's Avatar
    Join Date
    Sep 2010
    Location
    Upstate NY
    Posts
    195

    File Systems are way over emphasized Not a big deal

    The user aspect of your computer is so that the user can navigate from file to file. A directory holds nothing but the names of the files that are held somewhere else. The data is not held there. A file is a memory space that is dedicated to a specific data. It just keeps collections of data together and separated from other non-related data just like a regular filing cabinet.File and directory hierarchy only means that the longer the path the more the computer has to look to find a particular piece of data. The Root directory does not have control over the farthest path from it. It is a stupid and worthless way to refer to it. It has more to do with the Russian doll thing where a doll fits inside of another doll than a tree thing.

    A computer uses inodes to keep track of data which stands for (indext nodes). Mounting means that your VFS can not access data unless it is mounted. Mounting is just a administrative task for the O.S . It allows your VFS to have the ability to receive data from it. The O.S does not make all the data on the hard drive accessible when it boots therefor it needs to be mounted to be accessible. A partition is a separate section of a hard drive that is treated as not being connected to the rest of the hard drive so if you have five partitions and only one is mounted the VFS only thinks that one exists so the others are invisible to it. After they are mounted the data on these partitions are now accessible


    To reinforce the path/file system thing , lets say you have a big old style filing cabinet full of documents. This filing cabinet is in the filing cabinet room that has ten filing cabinets in it. The first directory would be the filing cabinet room. This room holds ten filing cabinets. These cabinets all sort of have the same hierarchy because they are all at the same level of the hierarchy or tree. They are all the same distance from anywhere else. Now one of these cabinets is for registered voters so we open this cabinet. This cabinet is also a directory because it holds more than one type of voter registration documents. It hold documents of registered voters by the Province or State you live in. We can throw and actual file in here with the directories if we want but this file will only hold the info for our O.S to be able to find it and not the actual data.

    Most of the file hierarchy/path business is a graphical interface so the user can navigate to different files. The O.S has to find the files too but it gets massively over shadowed by the graphical user aspect of it.


    This is a bit of a ad hock explanation but I hope it will gain you the understanding to help you understand the concept it's self.

  7. #7
    Just Joined!
    Join Date
    Mar 2011
    Posts
    6
    thank you guys again,
    examples helps me, I'll start to use mount and partitioning to catch it

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...