Mailinglist Archive: opensuse (3964 mails)

< Previous Next >
Re: [SLE] How can a partition that's not mounted be written and read to? (Was - Re: [SLE] Missing space on my hard drive.)
  • From: Anders Johansson <andjoh@xxxxxxxxxx>
  • Date: Sun, 14 Nov 2004 23:06:45 +0100
  • Message-id: <200411142306.45517.andjoh@xxxxxxxxxx>
On Sunday 14 November 2004 22:40, Colin Murphy wrote:
> A curious collection of problems I've amassed. It would appear that I have
> a partition that I can read and write to even if it is not mounted:-

> Can someone explain how this can be please?

OK, let me try

When a linux system starts up, you have one partition mounted, the so-called
"root" partition. in this partition, you have a number of directories, one of
them is called /data1. If you don't do anything else, and you create a file
in /data1, that file will be created on the root partition just as it would
in any other directory

Now, if you "mount" another partition on /data1, what you're saying to the
system is "everytime the user wants to do something in /data1, it should
happen on this other partition". So after "mount /dev/hda5 /data1", if you do
"ls /data1" the system will show you the contents of the hda5 partition. The
file you created before you mounted the hda5 partition will still be there on
the root partition, it's just that the system hides it while hda5 is mounted.

/data1 isn't special just because it's a "mount point", it's just a regular
directory. You can use any directory as a mount point for other partitions.

(trying to think of some descriptive analogy, it's hard, how about this:)
Think of /data1 as a magician's trick door. Behind the door is a regular
room, but when you throw a switch, the door suddenly leads out to the garden.
The original room, along with what you put in it, is still there, but while
the switch is on (the partition is mounted) whenever you go through the door
you will get to the garden

Yeah, ok, lame analogy, but it's the best I could do on short notice :)

< Previous Next >