Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding server /nfs/xxxx mounted folder to public_html/

Discussion in 'General Discussion' started by SteveS99, Aug 20, 2017.

Tags:
  1. SteveS99

    SteveS99 Member

    Joined:
    Jul 22, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  2. SteveS99

    SteveS99 Member

    Joined:
    Jul 22, 2016
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,165
    Likes Received:
    1,371
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page