home bbs files messages ]

Just a sample of the Echomail archive

<< oldest | < older | list | newer > | newest >> ]

 Message 10282 
 jlavigne@hits-buffalo.com to All 
 Re: Question about mount command and loc 
 02 Mar 07 15:22:42 
 
Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.co
!nntp.giganews.com!nx01.iad01.newshosting.com!newshosting.com!fu
berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Joe LaVigne 
Newsgroups: alt.os.linux.ubuntu
Subject: Re: Question about mount command and location of files
Date: 2 Mar 2007 20:22:42 GMT
Lines: 56
Message-ID: <54rfciF21ueahU2@mid.individual.net>
References: 
 
 <54pnb4F21pso3U1@mid.individual.net>
 
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net nft5l5K+xGpv4F2LPU7qPwZVSRgaBIGJZcQDXe3bjYskTBld7j
User-Agent: pan 0.123 (El Nuevo Barretto)
Xref: number1.nntp.dca.giganews.com alt.os.linux.ubuntu:11324

On Fri, 02 Mar 2007 13:23:43 +0000, Chris Fasano wrote:

> On Fri, 02 Mar 2007 04:26:13 +0000, Blue wrote:
>> 
>> Mounting does not shift the files (phyisically). It just allows them to be
>> read. 
> 
> 
> 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?"

It doesn't "shift" files.  I makes a mount point.  When you mount a drive,
you are granting access to it.  Your filesystem is not drive dependent. 
So, if you haven't mounted the drive, /newdirectory is part of a
filesystem mounted on hda.  When you mount hdb1 to /newdirectory, it is
now the startpoint for the filesystem on hdb1.

You are thinking very much in Windows terms, where drives each have a
letter, and a very strict (and limited) way in which they are usually
used.  Even Windows can be mounted like we are discussing, though.

> 
> I'm not disputing the answer, just trying to understand how it works, 
> and it's driving me nuts.  I won't post again on this issue; thanks
> again.
> 
> Is there a difference between these two tasks:
> 
> 1. mkdir under /home
> 2. add files to /home/newdirectory
> 3. mount /dev/hdb to /home/newdirectory
> 
> and
> 
> 1. mkdir under /home
> 2. mount /dev/hdb to /home/newdirectory
> 3. add files to /home/newdirectory

Yes.  A monstrous difference.  In example 1, when you add the files, the
mount has not been done, so the files are written to the drive currently
mounted there, which is wherever /home is (note:  You don't intimate, in
this example, that it is on hda1, so it cannot be assumed.  /home could be
anywhere).

In example 2, you mounted the partition to the mountpoint first, so the
files are written to the mounted partition.

> 
> There must be a difference between these tasks.  I'll experiment tonight
> after work.
--- Platinum Xpress/Win/WINServer v3.0pr5
 * Origin: Omicron Theta BBS (1:261/20)

<< oldest | < older | list | newer > | newest >> ]

(c) 1994,  bbs@darkrealms.ca