[Techtalk] Linux file system versus dos/win model

Magni Onsoien magnio+lc-techtalk at pvv.ntnu.no
Thu Jul 31 07:52:38 UTC 2008


On 2008-07-29 23:28:47 +0200, Anne Wainwright said:
> Looking for some knowledge here.
> 
> One of the reasons I often read for the superiority of linux over windows is oft-touted statement that under linux 'everything is mounted on one contiguous file system'
> 
> So if I mount my usb stick on linux it comes up on the file system under /flash
> 
> If I mount it on windows (well, plug it it) then it comes up as 'F' with my allocated name of Sahara.
> 
> How is this any different? Both are shown on a tree-like structure. I can move files from the device to any other part of the tree with equal facility.  What am I missing here, what in essence is the real difference?

As you can see from the seven or so different (and correct) answers you
have received (so far!), there are many ways of doing things in Linux
;-)

What I think is the biggest advantage of the hierarchical file system in
Linux (and all other Un*x-like systems) is the flexibility.

A practical example:
I install my desktop machine on an old 40GB harddisk, and make a root 
partition (/) and one for /boot, since that's what was recommended in 
the documentation I found.
Later I find out that I need some more space, so I buy a 200 GB disk. I
make a filesystem of 100 GB on this for my personal stuff. I can then
move all my stuff from /home on the small disk and instead mount the
new, shiny partition as /home on my desktop (I'll skip the details for
how I'd do this).
Several months later I decide to do something similar for the software
installed on my desktop computer, and make a 70 GB partition for the
software installed under /usr, plus a new logfile partition called
/var/log
I can pretty seamlessly move the contents of the old /usr and /var/log
*directories* (remember, they are on the small, old disk) to the new
*partitions*, and still have the files and data available in the same
logical place as before. No need to change anything in my configuration.

The only difference you will see is that while the comman 'df' (on a
command line) showed something like this before:

magnio at box:~$ df -h
Filesystem             Size      Used Avail  Use% Mounted on
/dev/sda1              40G         2G    2G  50%  /

it will show something like this with the new partitions:

magnio at box:~$ df -h
Filesystem            Size       Used Avail  Use% Mounted on
/dev/sda1              40G         2G    2G  50%  /
/dev/sdb1	      100G         5G   95G   5%  /home
/dev/sdb2              70G         7G   63G  10%  /usr
/dev/sdb3              30G         1G   29G   3%  /var/log

Mark the different filesystem names - /dev/sda is the first disk, while
sdb is the second, and the numbers are the partition number.

This is not visible from the file listings (ls on a command line) in the
directories on the machine - som often it's only something the sysadmin
will see, not the user.

I am not sure if you can do this under Windows, but I guess you could if
you were always very proactive and thinking forward when making
directories. In a normal setup you'd just move your personal files to D
and start using that one for storing personal stuff, then later add an
E: "disk" for software and perhals F: for logfiles, and they you have to
change the paths you use for all this in automatic scripts etc. 

You also don't easily see which one of these "disks" are on the same 
physical disk (you can guess from "properties" and also look in the 
hardware section somewhere in the config/admin menus), so if you start 
getting weird errors on the D-disk, it's not obvious that you should 
also back up and save data on the E and F disks. On a Linux machine you 
easily see this from the df-output. [Ok, it MAY be equally easy under
Windows, I just haven't encountered the simplicity yet..]

It may seem a bit overkill for a personal setup, but given how many
extremely poor designs I have seen being adopted to large-scale server
administration, I don't doubvt for a second that there are huge
advantages of being able to think like a serious sysadmin from your
first computer :-)



Magni :)
-- 
sash is very good for you.


More information about the Techtalk mailing list