1 |
On Monday 25 Jul 2011 12:18:34 YoYo Siska wrote: |
2 |
> On Mon, Jul 25, 2011 at 11:40:55AM +0100, Mick wrote: |
3 |
|
4 |
> > I never understood properly how the mount --bind/rbind works. I |
5 |
> > understand that the original partition content becomes visible on a |
6 |
> > second partition, but I'm not at all sure what happens when the space on |
7 |
> > the first partition runs out? |
8 |
> |
9 |
> Not "on a second partition" but under another "mount point" i.e. another |
10 |
> path... When you try to access a file by its filename, the kernel takes |
11 |
> the absolute file name, compares it to all the moutend "mount points", |
12 |
> takes the best match and tries to find (create) the file in that |
13 |
> filesystem/partition... |
14 |
> |
15 |
> Lets say you do something like: |
16 |
> |
17 |
> mount /dev/sda1 / (well... you don't actually do this... ;) |
18 |
> mount /dev/sda2 /mnt/sda2 |
19 |
> mount --bind /mnt/sda2/bigtmp /tmp |
20 |
> |
21 |
> Then path "/home/yoyo/something" is accessing file "home/yoyo/something" |
22 |
> on partition sda1. |
23 |
> |
24 |
> The path "/mnt/sda2/somedir/somefile" is accessing file "somedir/somefile" |
25 |
> on partion sda2. |
26 |
> |
27 |
> The path "/tmp/somedir/somefile" is accessing file |
28 |
> "bigtmp/somdir/somefile" on partition sda2. |
29 |
> |
30 |
> |
31 |
> The files (and free space) under /mnt/sda2 and /tmp are actually on |
32 |
> partition sda2, everything else is on sda1... |
33 |
> |
34 |
> |
35 |
> So if sda1 runs out of space (by writing to other places than /mnt/sda2 |
36 |
> and /tmp), it doesn't in any any way affect /mnt/sda2 and /tmp which |
37 |
> have their free space from sda2. Conversely if you fill up sda2 by |
38 |
> writing to /tmp, your "system" partition still has free space ;) |
39 |
> |
40 |
> |
41 |
> yoyo |
42 |
|
43 |
I think I got it. Thanks! |
44 |
-- |
45 |
Regards, |
46 |
Mick |