I am revisiting this question (thus googling what others have done) due to fact that NC talks about upcoming speed improvements in SMB. My experience is with NFS.
Iām curious about performance and stability considerations for mounting external storage.
For about 3 years now (OC 7, if I remember correctly) or so Iāve been using OC (now NC) in a setup where ādataā directory is mounted share from another machine within LAN (point to point actually). It is used by 12 people everyday via desktop clients.
Setup is as follows.
NC runs on MachineA - Ubuntu Server (due to fact that all files are elsewhere you can make it really small (<7L case) and snappy for FS/DB access - MiniTX MOBO, i3+ CPU (hardware AES can be found on cheaper too), NVMe and lots of RAM).
Real files are on machineB - NAS server (32TB RAID-Z2, ECC, WD REDs, snapshots, scrubs, offsite backups to even another NAS, all the goodies to keep data as safe as possible ).
MachineA and Machine B are interconnected both through LAN as well as point to point (if each each machine has 2+ NICs, use them, one for LAN, one for point to point).
For example /home/cloud/cloud-www/www/
is webroot on MachineA for NC installation.
Iām also using mpm_itk_module (yes, mod_php
on Apache, Iām open for discussion why would anyone want to run NC on PHP-FPM (Apache/nginx) for sub ~60 users) to run it as cloud:gcloud
user:group. This is important for my setup.
On machineB i have a dataset with unix (no ACLs!) permissions.
For example /mnt/vol/cloud/
It contains the magical directory ādataā, for example /mnt/vol/cloud/clouddata/data
On both machines user ācloudā as well as group āgcloudā has same ID and GID. It is easy to achieve, just when creating users on both machines manually set them.
I have a symlink in machineA /home/cloud/cloud-nas-link
that points to /home/cloud/cloud-nas
/home/cloud/cloud-nas
on machineA is actually mounted NFS share from machine B
mounting it (fstab) as
XX.XX.XX.XX:/mnt/vol/cloud/clouddata /home/cloud/cloud-nas <params>
would result in that
/mnt/vol/cloud/clouddata/data
from MachineB will be reachable in machineA under /home/cloud/cloud-nas/data
Meaning that config.php will contain
'datadirectory' => '/home/cloud/cloud-nas-link/data',
You might ask why Iām using symlink, not
'datadirectory' => '/home/cloud/cloud-nas/data',
Historically I was moving around the mountpoint on MachineA, so in order for me not to have to change config.php I just used symlink, that I could point to mountpoint. I know i should get rid of it, however more better improvement would be something I have postphoned for (too) long now - upgrade that direct link between machines from 1 to 10GbE.
No issues with performance and stability.
One thing though is that you always have to keep in mind that MachineB has to be running before MachineA boots (for example after UPS initiated reboots or needs-to-reboot system updates), otherwise fstab will not fire and you will have to manually mount NFS on MachineA (but donāt worry if it happens, NC will just throw error that data directory is not found, and wait for it to become available).
I hope this is helpful.
EDIT: And yes - reason for manual mounting data is historical. As i said - 3 years. Back then things were different with what you can do in WEB GUI/APPs. Plus it was (and for me still is) NFSv3. And matching permissions (ID/GID) is not an issue, if you are thinking about this you should be root anyways.