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.

NFS mounts

Discussion in 'General Discussion' started by mdojka, Feb 4, 2005.

  1. mdojka

    mdojka Member

    Joined:
    Mar 27, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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. bigj

    bigj Well-Known Member

    Joined:
    Aug 9, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Tucson,AZ
    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. EnigmaPlanet

    EnigmaPlanet Registered

    Joined:
    Dec 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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. bigj

    bigj Well-Known Member

    Joined:
    Aug 9, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Tucson,AZ
    What OS is the NFS server and the clients?

    --
    bigj
     
  5. EnigmaPlanet

    EnigmaPlanet Registered

    Joined:
    Dec 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    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
     
  7. bigj

    bigj Well-Known Member

    Joined:
    Aug 9, 2003
    Messages:
    75
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Tucson,AZ
    Enigma, Did Dave9000's solution solve your problem?

    --
    bigj
     
  8. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
    #8 myusername, Feb 22, 2006
    Last edited: Feb 22, 2006
  9. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    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
     
    #9 dave9000, Feb 22, 2006
    Last edited: Feb 22, 2006
  10. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    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.
     
    #10 myusername, Feb 25, 2006
    Last edited: Feb 25, 2006
  11. dave9000

    dave9000 Well-Known Member

    Joined:
    Apr 7, 2003
    Messages:
    891
    Likes Received:
    1
    Trophy Points:
    16
    Location:
    arkansas
    cPanel Access Level:
    Root Administrator
    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
     
Loading...

Share This Page