[Lxc-users] Mount /dev/shm of the host inside a container
Gordon Henderson
gordon at drogon.net
Tue Jan 10 11:00:20 UTC 2012
On Tue, 10 Jan 2012, Daniel Lezcano wrote:
> On 01/10/2012 01:39 AM, Fred Finkelstein wrote:
>> I finally found it with the help of the #lxcontainers irc channel. I have
>> to replace this in lxc.fstab:
>> /dev/shm /dev/shm bind 0 0
>> with this:
>> /dev/shm /srv/shm none bind 0 0
>> and I can access it.
>
> Why /srv/shm ?
And do you actually need to mount it at all?
I don't in my containers - but the startup scripts running inside my
containers mount it for me automatically. I guess it depends on
permissions in /dev for this to work, but I've never had an issue.
Although re-reading the original post - perhaps you're after a shared
/dev/shm for all containers?
(And I've not heard of /srv/ either - maybe a distribution specific
thing? I used Debian - a-ha:
http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/srv.html
Gordon
More information about the lxc-users
mailing list