Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    5

    Default NFS mounts

    Hi All,

    I have a question regarding using WHM/cPanel with multiple servers at the same location. I have one server running solaris 9 and the WHM/cPanel server running RedHat Enterpricse 3. I want to use nfs to store all the customer data (including mail and sql db's) on the solaris server. My question is what directories do I need to have stored on the solaris box to appomplish this? Like /home, etc... Thanks for your time.

    -Marc

  2. #2
    Member
    Join Date
    Aug 2003
    Location
    Tucson,AZ
    Posts
    77

    Default

    I really don't recommend using NFS with Cpanel. I thought it was a wonderful idea until I implemented it and discovered that I still have to man-handle accounts to get them to work. Let me explain the problems I have (and Cpanel staff can't resolve. No offense meant to them).

    1) When a new account is added you have to manually edit and add the new user to the quotas file on the nfs server in order for accounts to work. Quotas are not handled by the local filesystem.

    2) When a customer logs in to their cpanel the left hand column doesn't report their disk
    usage correctly. This is a problem between the system command 'repquota' and nfs.

    3) Ever since a recent RedHat update the 'quota' command no longer works with NFS mounts. If I roll back to the older quota rpm it works just fine.
    4) jailed ssh doesn't work. I can only attribute this to the fact that the user's home directories are on an nfs mount. The problem seems to be that the jailed file system doesn't get created in /home/virtfs/<username>. I can manually go in and create the filesystem it's looking for

    My logical setup is the same as yours except I am using a Netapp FAS250 as the NFS server. The only solution I have with this setup is to migrate to iscsi which solve the problem. The netapp support iscsi and there is software on sourceforge that allows for iscsi w/o the need for hardware on the client side. I have already created the new lun and I am testing it for a few weeks before I copy all the customer data to it and change the mount point.

    For future servers I plan on building a server that has HW raid 10 capabilities using Serial ATA. I think this would be a better fit and cheaper than continuing to use my Netapp and creating a new iscsi lun or using straight NFS.

    Now to answer your question You may want to create a /export/home tree and mount the file system there. I would leave /home alone (heh, I said 'home alone') since you're dealing with nfs exports.

    Hope this information helps.

    bigj

  3. #3
    Registered User
    Join Date
    Dec 2005
    Posts
    2

    Default

    Dear Sir,
    I am new to Linux, not a sysAdmin, but a IS engineer.

    so, my question, might look stupid to you.

    I need to set up a common chat on several web servers in the same location. I decided to use NFS. Right now I only have 2 servers. The web server and the DB server.
    I wish to mount the chat directory, which is under /exports/chatfiles

    I wrote this path in the exports file. Then, when I start the nfs service, I am getting this message:

    Starting NFS services: [ OK ]
    Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused
    rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
    [FAILED]
    Starting NFS daemon:

    What am I doing wrong? I do not need any quotas there, I just need to share this single directory.

    Can someone give a newbee a step-by-step guidance how to set this thing up? It can not be that difficult, can it?

  4. #4
    Member
    Join Date
    Aug 2003
    Location
    Tucson,AZ
    Posts
    77

    Default

    Quote Originally Posted by EnigmaPlanet
    Dear Sir,
    I am new to Linux, not a sysAdmin, but a IS engineer.

    so, my question, might look stupid to you.

    I need to set up a common chat on several web servers in the same location. I decided to use NFS. Right now I only have 2 servers. The web server and the DB server.
    I wish to mount the chat directory, which is under /exports/chatfiles

    I wrote this path in the exports file. Then, when I start the nfs service, I am getting this message:

    Starting NFS services: [ OK ]
    Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused
    rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
    [FAILED]
    Starting NFS daemon:

    What am I doing wrong? I do not need any quotas there, I just need to share this single directory.

    Can someone give a newbee a step-by-step guidance how to set this thing up? It can not be that difficult, can it?
    What OS is the NFS server and the clients?

    --
    bigj

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    2

    Default

    The OS of the server is CentOS.
    The OS of the clients is Fedora 2.

    I need to set up the shared directory on the CentOS, so that clients, who connect to the web server on Fedora would see it.

  6. #6
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    to use NFS portmap must be running

    also you must allow access to the portmappers between the machines you wish to use nfs on

    also make sure your /etc/exports file is set properly

    if portmap is not running on all involved mach9ines you will get the above error
    Dave Browning
    Intersite Technologies
    Greenbrier Ar
    dave@isitetech.com

  7. #7
    Member
    Join Date
    Aug 2003
    Location
    Tucson,AZ
    Posts
    77

    Default

    Enigma, Did Dave9000's solution solve your problem?

    --
    bigj

  8. #8
    cPanel Partner NOC cPanel Partner NOC Badge myusername's Avatar
    Join Date
    Mar 2003
    Location
    chown -R us.us *yourbase*
    Posts
    712
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Ever seen this?

    root@server[/etc/rc.d/init.d]# service portmap status
    portmap is stopped

    Ok. Lets start it then.

    root@server[/etc/rc.d/init.d]# service portmap start
    Starting portmapper: [ OK ]

    Great! It started! Lets double check though...

    root@server[/etc/rc.d/init.d]# service portmap status
    portmap dead but subsys locked

    Did some digging. Says portsentry is to blame. Options:

    1. Remove portsentry.
    2. Reconfigure it.
    3. Turn it off.

    I think I vote for option 2. Anyone seen docs on this?

    I assume it means to remove an IP from the portsentry.conf and figure out how to get NFS listen only on that port. From my preliminary findings NFS runs on random ports 1024 and below.

    Edit: Actually I was looking at the conf file and its almost as if portsentry does nothing at all other than run. almost like it was going to be used at one point then it got forgotten.

    I assume simply turning it off won't hurt much.
    Last edited by myusername; 02-22-2006 at 11:01 PM.
    GlowHost.com | Professional Managed Web Hosting Since 2002.
    >> Fully Managed Dedicated, Cloud VDS, Reseller & Semi-Dedicated
    >> Cloud Servers for Enterprise

  9. #9
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    What we do is leave portsentry in default configuration and we add

    portmap:ALL to /etc/hosts.deny

    and

    portmap:<ip range> as in 192.168.1. or 192.168.1.0/24
    to the /etc/hosts.allow

    and also make sure all hosts involved in the nfs sharing are listed in the /etc/hosts file

    and we have no issues with portmap running nor any problems with mounting via nfs

    on the nfs server we do configure the /etc/exports file with

    allowed ip range (rw,no_root_squash)

    we block all nfs traffic at our core router so its limited to our internal network so we don't worry too much about being able to access the nfs partition with root

    as far as turning off portsentry if you restrict the portmap to the machines/network in your subnet I really don't see why it would matter if portsentry is running or not
    Last edited by dave9000; 02-22-2006 at 10:00 PM.
    Dave Browning
    Intersite Technologies
    Greenbrier Ar
    dave@isitetech.com

  10. #10
    cPanel Partner NOC cPanel Partner NOC Badge myusername's Avatar
    Join Date
    Mar 2003
    Location
    chown -R us.us *yourbase*
    Posts
    712
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Thanks Dave for the suggestions.

    I will give it a go here shortly.

    How about something like:

    in /etc/hosts.deny
    portmap: ALL

    in /etc/hosts.allow
    portmap: *.domain.com

    where serverA.domain.com and serverB-Z.domain.com could connect regardless of today's IP for that host?

    Do you know if DNS or wildcards are permitted syntax or if it only allows for IP sets?


    Question 2:

    In /etc/hosts, should that be installed on the client as well?
    I'd imagine the NFS server should have something similar to:

    Code:
    111.111.111.111         nfsserver.domain.com nfsserver
    127.0.0.1                    localhost
    222.222.222.222         servera.domain.com servera
    333.333.333.333         serverb.domain.com serverb
    444.444.444.444         serverc.domain.com serverc
    then the /etc/hosts on say serverA would simply be like:

    Code:
    222.222.222.222         servera.domain.com servera
    127.0.0.1                    localhost
    111.111.111.111         nfsserver.domain.com nfsserver
    as serverA has no reason to share filesystems with anything other than the main NFS server.
    Last edited by myusername; 02-25-2006 at 04:17 PM.
    GlowHost.com | Professional Managed Web Hosting Since 2002.
    >> Fully Managed Dedicated, Cloud VDS, Reseller & Semi-Dedicated
    >> Cloud Servers for Enterprise

  11. #11
    Member dave9000's Avatar
    Join Date
    Apr 2003
    Location
    arkansas
    Posts
    891
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    i have never tried a FQDN or wildcard in the /etc/hosts.* files so i can not say for sure one way or the other

    the /etc/hosts files look correct
    Dave Browning
    Intersite Technologies
    Greenbrier Ar
    dave@isitetech.com

Similar Threads & Tags
Similar threads

  1. NFS vs SMb vs iSCSI for remote backup mounts
    By SoftDux in forum Data Protection
    Replies: 1
    Last Post: 01-13-2011, 06:05 AM
  2. Adding /var/lib/mysql to virtfs mounts
    By wizzy420 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 06-14-2009, 12:10 PM
  3. Bind mounts under /home/virtfs?
    By astopy in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-10-2009, 12:33 PM
  4. NFS and quota
    By bjarne in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 04-18-2007, 06:46 PM
  5. Using NFS
    By bgoldman in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-29-2004, 02:51 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube