Results 1 to 9 of 9

Thread: 10.04 NFS Server with Mac OS X NFS Client

  1. #1
    Join Date
    Feb 2011
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    10.04 NFS Server with Mac OS X NFS Client

    Hey All,

    Here's my situation: my company is currently running an Ubuntu 10.04 Server (ProdDB01) as an NFS file server, for which we currently only have one client, a Mac Xserve running OS X 10.6.4 (Snow Leopard) (ProdApp1). The NFS server is sharing out only one directory: /data/files, where /data is mounted on a RAID 10 (/dev/sdb1) made up of 6x 1TB drives.

    The Mac OS X NFS client is set up with a standard NFS mount through the Disk Utility using the mount location "/Users..../bones/shared" mapped to nfs://proddb01/data/files.

    Here is the NFS server's fstab and exports files:
    /etc/exports
    Code:
    # /etc/exports: the access control list for filesystems which may be exported
    #               to NFS clients.  See exports(5).
    #
    # Example for NFSv2 and NFSv3:
    # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
    #
    # Example for NFSv4:
    # /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
    # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
    
    /data/files 192.168.100.0/255.255.255.0(rw,async,insecure,root_squash)
    /etc/fstab
    Code:
    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    /dev/mapper/ProdDB01-root /               ext4    errors=remount-ro 0       1
    # /boot was on /dev/sda1 during installation
    UUID=b1e5af65-2d97-4bfd-a238-ad0c2277f9ad /boot           ext2    defaults        0       2
    /dev/mapper/ProdDB01-swap_1 none            swap    sw              0       0
    
    /dev/sdb1       /data           auto    rw,suid,dev,exec,auto,nouser,async      0       0
    -------------

    Our issue is that every few days or so (very intermittent times, but mostly noticed in the morning hours between 6-9am), the Mac NFS client unmounts the the "shared" location and won't bring it back up until I 'cd' to the "shared" directory via Terminal/SSH. Once I 'cd', the NFS share is re-mounted and reindexed by the client automatically.

    I've seen this in the syslog, but not sure if it's related at all:
    Code:
    Feb  6 07:15:24 ProdDB01 mountd[906]: authenticated unmount request from 192.168.100.200:939 for /data/files (/data/files)
    Feb  6 07:15:27 ProdDB01 mountd[906]: authenticated mount request from 192.168.100.200:970 for /data/files (/data/files)
    Any ideas or troubleshooting that I need to additionally do here? We are fairly new to NFS, so any help is welcome. Thanks all for any support.

  2. #2
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,134
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 10.04 NFS Server with Mac OS X NFS Client

    I have run NFS from a Ubuntu 10.04 server to a Snow Leopard XServe and many iMacs and Mac Pros for a long time, and I've never seen this behavior before.

    I don't know why you're passing all of those mount options in your /etc/fstab. I used to have my LVM share mounted this way...
    Code:
    # /var/marketing was on /dev/cciss/c0d0p3 during installation
    UUID=20c77fcf-f12e-43e3-9049-bcb459911cc3 /var/marketing  xfs     rw,noatime,nobarrier,logbufs=8,logbsize=256k        0       2
    You should only need to mount the filesystem, and then set the file/folder permissions from there.

    With /var/marketing permissions like this...
    Code:
    chown -R nobody:nogroup /var/marketing
    chmod -R 755 /var/marketing
    I eventually went away from NFS from the Ubuntu server do to the lack of easily configurable security, and instead used iscsi from the Ubuntu box, and mounted that share on the Xserve with the free globalsan iscsi initiator. Then, I shared out the folder from there to all of our other Macs. Here's the initiator if you're interested.

    http://www.snsftp.com/public/globalsan/

  3. #3
    Join Date
    Feb 2011
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04 NFS Server with Mac OS X NFS Client

    We will be moving to a SAN in the near future, just waiting on the budget to be approved.
    However, for the time being, we have to use NFS and be able to support it.

    To tell you the truth, most of the fstab was auto-generated when we installed Ubuntu. The only entry we added was the line:
    Code:
    /dev/sdb1       /data           auto    rw,suid,dev,exec,auto,nouser,async      0       0
    And, the mount options were default options we found here:
    http://ubuntuforums.org/showthread.php?t=283131

    The one thing you mentioned that we haven't tried is having the anonymous user/group (nobody, nogroup) own the NFS share, which may make a difference since we are using the root_squash option in the exports file.

  4. #4
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,134
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 10.04 NFS Server with Mac OS X NFS Client

    Oh, maybe I didn't explain myself very well before. You don't have to have a SAN to use ISCSI. The name of the initiator has san in the name, so maybe that's why there's confusion. What type of filesystem do you have on /dev/sdb1? If it's ext4 (I would bet that it is), your /etc/fstab line could/should look more like this...
    Code:
    /dev/sdb1       /data           ext4	defaults	0	0
    Unless, you really need to override defaults (you probably don't), it's a good idea to run with it set as defaults. Those options are defaults for a reason

    Have you done any network monitoring to make sure there aren't any network interrupts going on that are causing the server to disappear briefly from the client's perspective? I ask, because your previous log message shows the client requesting to umount the file share. That would happen either if the network dropped or you actually unmounted the share.

  5. #5
    Join Date
    Feb 2011
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04 NFS Server with Mac OS X NFS Client

    My bad. I saw "san" in the name of it, and assumed it was SAN management.

    I think we added the actual default values, just as a way to see what our defaults actually were in case we ever needed to change the fstab. The only change I could make here is changing the "auto" to "ext4" (which I verified as the filesystem on sdb1).

    As for monitoring, I'll see if we can set up something to watch for any network drops between the server and client. Do you have any suggestions for monitoring software for that purpose?

    Also, thanks for your help on this.

  6. #6
    Join Date
    Feb 2011
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04 NFS Server with Mac OS X NFS Client

    I believe I figured this out. It ended up being a Mac configuration, of course. Mac OS X uses the AutoFS daemon to control its NFS mounts. The autofs.conf file has a set timeout, and ours was 1 hour. Seems that the early morning hours were a symptom of that, as we see less server load (and sometimes none) at those hours. I just set ours really high (a week) and we should be OK now.

    Thanks again.

  7. #7
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,134
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 10.04 NFS Server with Mac OS X NFS Client

    Great glad to hear that you might have solved it. Just so you know, I've never had to adjust that config file on any of the over 30 Macs that I administrate, but I hope that truly does solve your problem.

  8. #8
    Join Date
    Feb 2011
    Beans
    5
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: 10.04 NFS Server with Mac OS X NFS Client

    Apparently, the timeout isn't a true "timeout" per se, but more of a counter. Every hour it was trying to unmount the drive, and only if it wasn't busy. It's possible that one could never have to touch this config file, and still never see the issue (especially if navigating through the terminal or Finder), because autofs automounts the drive if it sees it needs to because of one of those activities. Our specific issue was not seeing images on our website that were hosted in the NFS share, a function possibly overlooked by autofs since it isn't an explicit "cd" or "ls".

    More on the issue we found in this Apple thread:
    http://discussions.apple.com/thread....readID=2052577

  9. #9
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,134
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: 10.04 NFS Server with Mac OS X NFS Client

    Thank you for the explanation and the link. I'll bookmark that so if I have have this problem, I'll have the solution at my fingertips

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •