On Wed, 20 Nov 2002, Stefano Pogliani wrote:

> What does it mean writeing to a directory "without" copying to a filesystem ?
> 
I see that Luca has answered your questions -- just elaborating a little
here:

A mount point is nothing more than an empty directory created by mkdir.
When you mount a filesystem, whether on a HD, floppy, or CD, its
hierarchy shows up under the mount point. Copying files to this mount
point then copies files to the disk.

If you unmount the filesystem then the directory is still there. For
example, if you have a system setup in this way:

  /             hda1
  /home         hda2
  swap          hda4

/home and /export are mounted filesystems under /. If you do an ls of
/home, you'd see somethng like:

drwx------    6 klowe    local         401 Oct  7 21:51 klowe
drwx------    6 robert   remote        299 Feb  3  2001 robert
drwx------    6 wperez   remote        299 Feb  3  2001 wperez

If you were then to unmount /home, ls would return nothing, *unless* you
happen to have copied files there when the hda2 partition was unmounted.
E.g.:

$> mkdir /nothing
$> touch /nothing/emptyfile
$> ls /nothing
emptyfile
$> umount /home
$> mount -t ext2 /dev/hda2 /nothing
$> ls /nothing

drwx------    6 klowe    local         401 Oct  7 21:51 klowe
drwx------    6 robert   remote        299 Feb  3  2001 robert
drwx------    6 wperez   remote        299 Feb  3  2001 wperez

In this example, emptyfile was create on the hda1 partition. 

The mount points do not need to be on the root filesystem. You can
create mount points almost anywhere that has a "real" filesystem (i.e.,
probably not /proc -- though I admit I've never tried). So you could
create a /home/external that's mounted on a separate disk. The mount
point is created on hda2 in this example, but the mounted filesystem
could be anywhere.

This is what allows rescue disks to work. They boot up, create their own
/, /usr, /lib, etc.., but then mount the damaged filesystems somewhere
on their hierarchy.


Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to