S
S
SchmeL2016-06-02 12:30:23
LXC
SchmeL, 2016-06-02 12:30:23

Is it possible to mount NFS shares in LXC via bind?

There are two LXC containers with websites. There is a separate nginx balancer. There was a question about the general storage.
In my version, GlusterFS is already configured and used on both hosts, volumes are connected as NFS balls (so really faster than through FUSE).
In order not to set up NFS inside the containers, I did mount --bind the balls on the host inside the containers.

/mnt/public-sites/www  /var/lib/lxc/sites-node-1/rootfs/var/www   none   bind,create=dir
/mnt/public-sites/nginx-pub /var/lib/lxc/sites-node-1/rootfs/etc/nginx  none  bind,create=dir
/mnt/public-sites/php5 /var/lib/lxc/sites-node-1/rootfs/etc/php5  none  bind,create=dir

Now the question is - is it possible to do this?
Will there be any problems with NFS locks?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2016-06-02
@SchmeL

No, container processes from the point of view of the main system are quite ordinary processes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question