LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 11-14-2005, 08:28 AM   #1
naveenrajn
LQ Newbie
 
Registered: Mar 2005
Location: India
Distribution: Redhat
Posts: 21

Rep: Reputation: 0
why do OS use File systems ?


hi,

Why do operating systems use file systems? In case of linux we use /boot, /usr , /root etc.. why couldnt all files reside in 1 place say "/" . Is it bcos of any hardware limitation of the HDD or some thing else?
 
Old 11-14-2005, 08:37 AM   #2
meranto
LQ Newbie
 
Registered: Nov 2005
Location: /home/ridderkerk/NL or /work/heerhugowaard/NL
Distribution: Gentoo
Posts: 20

Rep: Reputation: 0
Re: why do OS use File systems ?

Quote:
Originally posted by naveenrajn
hi,

Why do operating systems use file systems? In case of linux we use /boot, /usr , /root etc.. why couldnt all files reside in 1 place say "/" . Is it bcos of any hardware limitation of the HDD or some thing else?
Even if you would only work with "/" you would still have a filesystem.

The reason why not everything is placed in "/" is that you can't use the same filename twice, so in the end you would have terribly long weird filenames.

How about trying to find a document while scanning trough 90000+ files if you don't know the exact name (because you had to make up a weird name to prevent duplicate filenames)

Last edited by meranto; 11-14-2005 at 08:40 AM.
 
Old 11-14-2005, 08:39 AM   #3
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
With a multiuser system its easier to configure access/security based on folders rather than configuring every single file individually.
 
Old 11-14-2005, 10:38 AM   #4
blindcoder
ROCK Linux
 
Registered: Dec 2003
Location: Berlin, Germany
Distribution: Crystal ROCK
Posts: 108

Rep: Reputation: 15
Re: Re: why do OS use File systems ?

Quote:
Originally posted by meranto
The reason why not everything is placed in "/" is that you can't use the same filename twice, so in the end you would have terribly long weird filenames.
Of course you can!
Code:
blindcoder@ceres:~/tmp$ ls -lR
.:
total 4
drwxr-xr-x  2 blindcoder users 4096 Nov 14 16:35 a
-rw-r--r--  1 blindcoder users    0 Nov 14 16:35 foo

./a:
total 0
-rw-r--r--  1 blindcoder users 0 Nov 14 16:35 foo
There are simple reasons for this:
If you put /home on its own partition, you can later reinstall the system WITHOUT LOSING ALL YOUR CONFIGURATIONS AND DATA!
If you put /boot on its own partition, you can for example put / on a RAID or encrypt it.
If you put /var on its own partition, you can mount it via NFS and store your logfiles and other "var"iable stuff on a remote machine.

The possibilities here are endless.


Greetings,
Benjamin
 
Old 11-14-2005, 10:46 AM   #5
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
http://en.wikipedia.org/wiki/Filesystem

Read that, it may clear up your confusion.
 
Old 11-14-2005, 01:22 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,183

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
The arrangement of files into a hierarchy of folder-names anchored with "/" is a logical arrangement of information that is used throughout all Unix variants. This may or may not correspond to the physical arrangement of the data.

In many systems, it does correspond: the various top-level directories such as /usr, /boot, /opt, /temp may well reside on different devices and/or partitions, and all of the information under that particular directory reside on the same physical volume. This can be done for several reasons, such as: protection against device failure; ease of upgrading; physical location and/or type of media.

But... it ain't necessarily so. Subsystems like LVM (Logical Volume Management) are commonly used on severs. (See for example this very complete two-part article from IBM. Part two is here. The LVM HOWTO from The Linux Documentation Project (TLDP) is here.)

In this scenario, each "logical" volume is stored on one or several physical volumes. Space can be added, reallocated, and removed if necessary, all without rebooting the system. Files can be distributed among several physical volumes at the same time, perhaps to gain the advantage of distributing the I/O load among different devices instead of creating a bottleneck of continuous access against just one. Some LVM management systems are quite sophisticated, with the ability to maintain backup copies of the same file on different volumes at once; to migrate frequently-used files to faster volumes; to take a "system-wide" view in cases where more than one computer-system in a cluster is accessing the same information.
 
Old 11-15-2005, 01:17 PM   #7
redhatrosh
Member
 
Registered: May 2004
Location: Student of University of Mumbai, Maharastra State, India
Distribution: Redhat Linux 9.0, Knoppix LIVE CD, Ubuntu Live CD, Kubuntu Live CD
Posts: 483

Rep: Reputation: 30
Generally, the purpose of a file system is to structure the storing and retrieving (and sometimes protecting/controlled access) to files.

It is not just purely names or the file itself, but the entire system has applications that need to work with it so it has to be designed and made in a format so that the Operating System can access files easily and provide it to the applications when required.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is arrangement of file systems will differ if we copy a file from FAT 32 to ext 3 ? anindyanuri Linux - Software 2 02-20-2005 12:39 PM
File systems gpit2286 Linux - General 2 02-09-2005 11:02 AM
About File Systems ahmed_alzahrani Linux - Newbie 3 08-31-2004 11:30 PM
about file systems anwar_lpk Linux - Hardware 1 11-30-2003 12:23 AM
file systems jdctx Linux - General 6 03-12-2002 12:05 AM


All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration