Using DigitalOcean Spaces to store moodledata directory as volumes
Halo. I have this moodle that i need to migrate to cloudron, but the problem is the moodledata directory is too large 90 GB in size.
I've already store this moodledata on digitalocean space and mount it on cloudron host, and it worked with this steps below :
nano /etc/fstab add this to the last line : s3fs#moodlestikesnh /mnt/volumes/moodlestikesnh fuse _netdev,passwd_file=/root/.passwd-s3fs,url=https://sgp1.digitaloceanspaces.com,use_path_request_style,allow_other,nonempty 0 0 sudo mount -a
Next. I add the mountpoint as a volume on cloudron. Enable read and write permission. Done.
The volume then mounted to my lamp moodle container in /media/moodlestikesnh
Now I can see the mounted directory from app terminal.
The problem is that, when i change the moodle config.php
From : $CFG->dataroot = '/app/data/moodledata';
To : $CFG->dataroot = '/media/moodlestikesnh/moodledata';
The access to the app viaa browser is becoming super slow : https://lms.stikesnh.bgsmd.cloud/
It takes 10 minutes to load the page, and still not complete. The browser still spinning.
Any idea on how to solve this?
@andirahmat I don't think s3fs is going to work. Ultimately, S3 (and DO Spaces) is an object store, it is not meant for filesystem. For example, things like symlinks, file permissions won't work out of the box. There is also probably limitations around filenames which we will discover only and as we hit them.
@andirahmat yes, block storage is the correct thing to use for app data directory. But even in block storage, some filesystems like CIFS are not suited (since they don't have permissions and symlink support either). Of course, other filesystems like FAT, NTFS etc are totally out of question.