[asterisk-users] recording not working to NFS

Dave Platt dplatt at radagast.org
Sun Oct 17 20:25:35 CDT 2021


On 10/17/21 12:59 PM, cio-alves at playerschool.edu wrote:
> I did test manually and the NFS mount works fine. I do create a 
> directory and it shows at the server.
> I am using containers, indeed. How can it be affecting Asterisk that I 
> am using LXC containers?

I'm by no means an expert in containers, but from reading a few sites on 
the net and reading between the lines, here's how I understand it.

Containers are, fundamentally, a way of isolating an app environment 
from other things.  With LXC one must apparently explicitly grant the 
container access to resources such as filesystems.  Apparently, if you 
expose a filesystem to a container, that exposure applies only to that 
filesystem - and not to other filesystems mounted within it.

In order to allow a container access to an NFS resource, one must 
apparently do several things:

 1. The host mounts the NFS share somewhere (e.g. /mnt/nfs/server5/spool).
 2. The host must create a directory (e.g. /var/mounts/voicemail).
 3. The host must do a loopback mount of the NFS share mount-point onto
    the second directory (e.g. "mount -o loop /mnt/nfs/server5/spool
    /var/mounts/voicemail")
 4. The host must give the container access to the loopback mount point
    (separately from any other accesses)... in effect treating this as a
    separate disk or filesystem for the container.

Once that's done, an app in the container (e.g. Asterisk) can access 
/var/mounts/voicemail and it'll be accessing the NFS share.

At least, that's how I read what I read.  I may be mistaken.  I'd 
suggest checking the LXC documentation for the details.






More information about the asterisk-users mailing list