Max binds
Hi
I'm building chrooted environment for users and I'm using mount --bind <what> <where> -scheme to mount some important directories for the user. This works fine for couple users but what is the limit for binding directories to show up on a different place? I tried googling but couldn't find any direct answers.
Thanks,
Jarmo
Quoted 7 lines · you [Jarmo Järvenpää]
Hi
I'm building chrooted environment for users and I'm using mount --bind <what> <where> -scheme to mount some important directories for the user. This works fine for couple users but what is the limit for binding directories to show up on a different place? I tried googling but couldn't find any direct answers.
-- v --
Quoted 5 lines · Ville Herva
See
Quoted 1 line
um=1&prev=/groups%3Fq%3Dg:thl1557665770d%26dq%3D%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Dlinux.kernel.3AE307AD.8>21AB47C%2540linuxjedi.org
Hmm, I read the thread and it contained mostly stats on memory usage on different scenarios. Also, bit outdated discussion (kernel v 2.4.4). No direct answer though.
Jarmo
Quoted 10 lines · Jarmo Järvenpää
Quoted 5 lines · Ville Herva
See
Quoted 1 line
um=1&prev=/groups%3Fq%3Dg:thl1557665770d%26dq%3D%26hl%3Den%26lr%3D%26ie%3DUTF-8%26selm%3Dlinux.kernel.3AE307AD.8>21AB47C%2540linuxjedi.org
Hmm, I read the thread and it contained mostly stats on memory usage on different scenarios. Also, bit outdated discussion (kernel v 2.4.4). No direct answer though.
I'm no expert on the mount --bind stuff, but as far as I understand it, this is simple (I guess Al Viro would agree *g*) VFS magic, so what happens seems to be the following:
- a new vfsmount entry is created by either copying the old tree or cloning the original mount (if it is a mountpoint)
- the required dentries are added to the dcache
so the number of --bind mounts from another mount point will be roughly limited by the number of vfsmount structures possible, and the space available to cache/store dentries ...
I guess there will be some tradeoff when the number of --bind mounts becomes very high, but I guess it is neglectible for normal use ...
I might be totaly wrong, so do not rely on it 8-)
HTH,
Herbert
Quoted 6 lines
Jarmo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/