Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.co
!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfe
d.freenet.de!213.132.189.2.MISMATCH!multikabel.net!feed20.multik
bel.net!txtfeed2.tudelft.nl!tudelft.nl!txtfeed1.tudelft.nl!feede
4.cambrium.nl!feed.tweaknews.nl!not-for-mail
Newsgroups: alt.os.linux.ubuntu
From: Sybren Stuvel
Subject: Re: Question about mount command and location of files
References: <54pnb4F21pso3U1@mid.individual.net>
Mail-Copies-To: nobody
X-TheAnswer: 42
Message-ID:
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: slrn/0.9.8.1pl1 (Debian)
Date: Fri, 2 Mar 2007 15:39:25 +0100
Lines: 55
Organization: Tele2
X-Trace: DXC==hFb5^7BffGNXN@RReQ2NF6`Y6aWje^YJE=3MMhkN;^E:[kLYN0
:?FHXabO_S0c0A^6hVN^^Z_ZC
Xref: number1.nntp.dca.giganews.com alt.os.linux.ubuntu:11313
Chris Fasano enlightened us with:
>
> Thank you. This explanation is (somewhat) what's causing my
> misunderstanding. If files aren't physically moved by mounting, then if I
> create a directory under hda1 (home/newdirectory) the /newdirectory is
> physically located on hda.
>
> So why would any files now created under /newdirectory be physically
> located on hdb just because I mounted /dev/hdb1 to /home/newdirectory,
> since as you say "mounting does not shift files physically?"
Let me try to explain. Let's assume that hda1 contains your root
filesystem, like this:
Filesystem: Physical:
/ / on hda1
/etc /etc on hda1
/home /home on hda1
/usr /usr on hda1
Let's say you now mount hda2 on /home and you mkdir /home/somedir.
Your filesystem now looks like this:
Filesystem: Physical:
/ / on hda1
/etc /etc on hda1
/home / on hda2
/home/somedir /somedir on hda2
/usr /usr on hda1
Because you mounted hda2 on /home, the root of hda2 is available at
/home. Files in /home/somedir thus reside on hda2.
Still with me so far? I hope so.
If you unmount hda2, and re-mount it on /usr, your filesystem looks
like this:
Filesystem: Physical:
/ / on hda1
/etc /etc on hda1
/home /home on hda1
/usr / on hda2
/usr/somedir /somedir on hda2
The files in /home/somedir have now moved to /usr/somedir because of
the remounting. However, they are still in the same physical location,
/somedir on hda2. That is what's ment with "mounting does not shift
files physically".
Sybren
--
Sybren Stüvel
Stüvel IT - http://www.stuvel.eu/
--- Platinum Xpress/Win/WINServer v3.0pr5
* Origin: Omicron Theta BBS (1:261/20)
|