Adding server /nfs/xxxx mounted folder to public_html/

SteveS99

Member
Jul 22, 2016
5
0
1
Indonesia
cPanel Access Level
Root Administrator
Hello Everyone,

I have WHM 64.36 running on a CentOS 7.3 server - The server has a correctly configured and working /nfs/xxxx mounted folder on a remote server.

How do I ADD this mounted folder to a cPanel /public_html/xxxx folder so my site can access the data (images) on the remote server folder?

Any help would be greatly appreciated.

Thanks in advance.
 

SteveS99

Member
Jul 22, 2016
5
0
1
Indonesia
cPanel Access Level
Root Administrator
Hi Everyone,

I have solved the problem by "playing" and working through the issue - Solution shared here as it may help others:

The NFS mount was initiated in the wrong place within the file structure - I initially set the mount point to be /nfs/audit-images

I then realized the mount point in the fstab NEEDS to be within the actual cPanel home directory and not a system mount point.

So I updated the /etc/fstab file with the following line:

10.10.101.30:/mnt/data/images/v4 /home/comisporta/public_html/iservaudit/AuditSurveyImages nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0

So to help others:
The 10.10.101.30:/mnt/data/images/v4 is the source server where the data is located together with the folder location

The /home/comisporta/public_html/iservaudit/AuditSurveyImages is the location on the WHM server (within the clients area) where the mount point is to be shown

The nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0 is from the NFS share tutorial I followed.

Hope this helps someone else.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,225
463
Hello,

I'm happy to see you were able to find a suitable workaround. Keep in mind the use of NFS is unsupported per the following note in our installation documentation:

Code:
We only develop and test cPanel & WHM on filesystems that support flock. Some network filesystems (for example, NFS) may require additional configuration in order to function properly. However, these configurations are difficult to implement successfully and we do not support them.
Thank you.