Asterisk & NFS

Is anyone useing NFS file sharing in conjunction with Asterisk. I’m thinking about using it to share config files (/etc/asterisk), agi-scripts, and voice files across a few machine I have. Has anyone had any good / bad experiences with doing this?


i share out the config files via samba and have not problems. i’m the only one accessing them.

Are you trying to setup some sort of linux cluster by doing this? I would have to opt on hardware depending on how mission critical the setup is…

I currently have a group of two machines running Asterisk. I am currently using NFS to share just the sound files. I do this because files recorded on one machine need to be accessible to both machine for playback.

It has worked good so far except recording directly to NFS has issues. Sometimes recording directly to NFS would cause the end of the audio to “speed up”. I got around it by just recording to /tmp and moveing the file to my NFS partition.

The reason I’m asking is because I’m adding one or two more machines to my group and it will be a pain to administer them all individually. So rather than just do it and risk having problems, I thought I’d throw it out there and see if anyone has done this before.


Are you executing a context and recording the sounds directly through a handset?

Also have you checked the logs to see if NFS is blowing errors?

I was recording sound from the caller through the head set with the Record application. I didn’t look at the log files to see exactly what was going on. It was one of those things that needed to get fixed ASAP, so I didn’t have much time to investigate.


Ok a call comes in, the context initiates, recording starts, and its saved on the NFS share. Is this just for backups or do these get accessed right away?

A quick but reliable fix could be saving them to the tmp directory, or for security purposes a directory owned by the user/group running asterisk, then moved/chowed/whatever with a simple perl script and crontab… That is if theyre not needed right away.

Is it still mission critical that it gets fixed?

Thanks for your help. The fix you described is pretty much what I did to work around the problem. It is working very well, so I’m not too worried about persuing the issue with recording files directly to NFS anymore.

My larger concern is with storing the asterisk config files and agi scripts on NFS partitions. This is something that I would like to implement soon. Any thoughts on on this subject?


I don’t see why not… You can share and directory you’d like as long as it’s mounted. I would draw something up before implementing it though, keeping security in mind for hosts / rw access etc.