Putting Moodle data on nas storage

Putting Moodle data on nas storage

by Ahmed Ibrahim -
Number of replies: 4

Hello all;

I am going to install moodle on a CentOs VM and I want to put moodledata on a nas storage on network that can be access by an IP

Will I install moodle locally then change it into config.php? what can I write into it for that?

Or will I install it directly and put moodledata on nas storage? and how can I do that?

Thanks in advance

Average of ratings: -
In reply to Ahmed Ibrahim

Re: Putting Moodle data on nas storage

by Ken Task -
Picture of Particularly helpful Moodlers

Suggestion ...

On a typical CentOS 7 code directory is in /var/www/html/ (all the moodle code in here).

moodledata is typically in /var/www/ ... a directory that apache user/server already knows about.

In moodledata, **leave all but filedir** in moodledata ... those directories are muc,localcache,cache, sessions, etc directories ... why?  Speed ... apache/php talking to moodle code which accesses directories in moodledata is fastest when accessed by localhost ... ie, same server.

The filedir directory in web server's moodledata is a mount point to the NAS @ nasserver/moodle/moodledata/filedir.

If you run automated backups might also make another mount point /var/www/autobackups that goes to the NAS.   Course backups could also have a directory of it's own that could be yet another mount point.

The files uploaded to a moodle is in filedir.

The following might help:

https://console.bluemix.net/docs/infrastructure/network-attached-storage/mount-nas-storage-linux.html#mounting-nas-storage-in-linux

'spirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Putting Moodle data on nas storage

by Duccio Di Blasi -

Dear Ken,

thaks for sharing, I'm going to follow your suggestions, but I'm wandering if there would be some permission/ownership issues in reading/writing from/to a remote NAS mounted with cifs.

I'm not a moodle expert, but I think taht the moodledata folder has to be owned by the www-data (or OS-equivalent user) linux user.

Many thanks in advance for any shared thought.


In reply to Duccio Di Blasi

Re: Putting Moodle data on nas storage

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well... the folder needs to have sufficient permissions for local www-data to read and write to it. Most NAS boxes have flexible permissions systems that should accommodate that.
In reply to Duccio Di Blasi

Re: Putting Moodle data on nas storage

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

> issues in reading/writing from/to a remote NAS mounted with cifs

Probably you mean to make the NAS serve Moodle its data directory https://docs.moodle.org/en/Installation_quick_guide#Create_data_directory, what we call 'moodledata'. Two problems there:

1. What do you mean by "remote"? https://en.wikipedia.org/wiki/CIFS is the old SMB/Samba network protocol for serving files through the network - in the LAN. Not suitable through networks.

2. The simple data directory of Moodle has evolved over time and now it is a bunch of places which one can configure individually. Some are useful to server big files, but slow, and others have not big throughput but need to be very fast.

Overall, I think you'll be better off, to have the fast data storage local and conneting the NAS through some https://docs.moodle.org/en/Repository.