Re: NFS: what happens to local space when remote space is imported?
From: Tlhingan (tlhingan1_at_optonline.net)
Date: 12/31/04
- Next message: Conrad J. Sabatier: "Re: mount_nfs -T -i --> fstab?"
- Previous message: Logan Shaw: "Re: Dump failure"
- In reply to: Logan Shaw: "Re: NFS: what happens to local space when remote space is imported?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Dec 2004 23:28:19 -0500
On Fri, 31 Dec 2004 03:10:03 GMT, Logan Shaw
<lshaw-usenet@austin.rr.com> wrote:
>Tlhingan wrote:
>> What happens to the space occupied by the local /usr/ports when a
>> directory of the same name is imported? does the local drive get
>> "bigger "? Does one recover local disk real-estate by importing
>> directories that are common?
>>
>> O.K., once again, for me more than you;
>> If the directories were already on there, and then I import on top of
>> them, I'm actually using the nfs server directory - but what happens
>> to the space that was on my disk which had (have?) those directories?
>
>What happens to wallpaper when you put new wallpaper on top of it?
>Nothing. It's still there. It still weighs something and could burn
>if the building caught fire. And it still has the same picture or
>design on it that it did before; you just can't see it because
>the new layer of wallpaper covers it up.
>
>And so it is with Unix filesystems. The "mount" command places a
>new directory on top of the old directory. The new directory is
>the root of another filesystem. The old directory is still there;
>it simply can't be seen because it is obscured by the new one.
>
>Now, you may ask what happens to the files that were "in" the
>directory that you covered up. But in Unix, there is no such
>thing as files really being "in" a directory. A unix filesystem
>simply gives a number (the i-node number) to every file, and a
>directory is a list of filenames and the numbers they go with.
>The directory doesn't contain any files; it's just a list that
>contains numbers which the system can use to find files.
>
>So, some files "in" that directory may still be accessible if
>they are listed by some other directory (that is not obscured)
>as well. This is commonly called a "hard link", although I
>think that's a misnomer since every file is "hard linked"
>in a sense. If a file is named only by some directory that's
>obscured, then file will not be accessible, but it is still not
>gone. When you unmount, it will still be there. And, in fact,
>if you open the file before you obscure it, you can continue
>working with it, just as you can continue working with an open
>file after it has been deleted.
>
>If the idea of obscuring one filesystem with another doesn't
>make sense, it might help to understand that Unix uses a virtual
>filesystem in addition to the individual on-disk filesystems.
>The virtual filesystem keeps track of which directories in the
>filesystem namespace ("/", "/usr/ports", "/etc/passwd") correspond
>to what on the actual filesystems. You can think of it as a
>data structure which includes a mapping between mount points
>and real (disk-based) filesystem root directories. It knows
>that the "/" directory refers to some object that allows
>access to the root of one filesystem, and it knows that "/usr"
>refers to some other object that allows access to the root of
>a different filesystem on a different partition. The virtual
>filesystem data structures exist only in memory, so changing
>them (with the "mount" and "umount" commands) doesn't affect
>the disk.
>
> - Logan
Thank you for the wallpaper analogy - I got it right away. The other
stuff just blew my mind ... I'll read it again tomorrow :)
-Tlhingan
----------------------------------------------------------------
A Conscience is what hurts when everything else feels sooo good.
- Next message: Conrad J. Sabatier: "Re: mount_nfs -T -i --> fstab?"
- Previous message: Logan Shaw: "Re: Dump failure"
- In reply to: Logan Shaw: "Re: NFS: what happens to local space when remote space is imported?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|