Professional Web Applications Themes

NFS and file locking - FreeBSD

Hi all, I've got a FreeBSD 6.x -current file server running NFS and I mount lots of things via NFS on other Freebsd 6.x -current servers with an NFS client. I get _lots_ of file locking issues. See below for just one example. I'm wondering, will NFSv4 fix this or switching to samba ? If not, I'd be gratefull for suggestions. Thanks in advance! vegeta# df krillin:/usr/ports 15390126 3159612 10999304 22% /usr/ports krillin:/usr/local/apps 15390126 3159612 10999304 22% /usr/local/apps krillin:/usr/src 15390126 3159612 10999304 22% /usr/src krillin:/usr/obj 15390126 3159612 10999304 22% /usr/obj krillin:/usr/home 15390126 3159612 10999304 22% /usr/home vegeta# cd /usr/ports/www/apache21/ vegeta# ...

  1. #1

    Default NFS and file locking

    Hi all,

    I've got a FreeBSD 6.x -current file server running NFS and I mount
    lots of things via NFS on other Freebsd 6.x -current servers with an NFS
    client. I get _lots_ of file locking issues. See below for just one
    example. I'm wondering, will NFSv4 fix this or switching to samba ?
    If not, I'd be gratefull for suggestions.

    Thanks in advance!

    vegeta# df
    krillin:/usr/ports 15390126 3159612 10999304 22% /usr/ports
    krillin:/usr/local/apps 15390126 3159612 10999304 22% /usr/local/apps
    krillin:/usr/src 15390126 3159612 10999304 22% /usr/src
    krillin:/usr/obj 15390126 3159612 10999304 22% /usr/obj
    krillin:/usr/home 15390126 3159612 10999304 22% /usr/home

    vegeta# cd /usr/ports/www/apache21/
    vegeta# make
    [......]
    buildconf: Using libtool15.m4 at /usr/local/share/aclocal/libtool15.m4.
    Creating include/arch/unix/apr_private.h.in ...
    autom4te259: cannot lock autom4te.cache/requests with mode 2 (perhaps
    you are running make -j on a lame NFS client?): Operation not supported
    autoheader259: /usr/local/bin/autom4te259 failed with exit status: 1
    Creating configure ...
    autom4te259: cannot lock autom4te.cache/requests with mode 2 (perhaps
    you are running make -j on a lame NFS client?): Operation not supported
    Generating 'make' outputs ...
    rebuilding rpm spec file
    rebuilding srclib/apr-util/configure

    Looking for apr source in ../apr
    Creating include/private/apu_config.h ...
    autom4te259: cannot lock autom4te.cache/requests with mode 2 (perhaps
    you are running make -j on a lame NFS client?): Operation not supported
    autoheader259: /usr/local/bin/autom4te259 failed with exit status: 1
    ../buildconf failed for apr-util

    --
    END
    ------------------------------------------------------------------------------

    Philip M. Gollucci
    Consultant
    E-Mail: com
    URL : http://p6m7g8.net/Resume/resume.shtml
    Phone : 301.254.5198

    $Id: .signature,v 1.7 2004/09/05 23:46:37 philip Exp $

    Philip Guest

  2. #2

    Default Re: NFS and file locking

    Hi,

    I had exactly same problem, to resolve this, use the -L option of mount_nfs.
    But I don't know how can I add this option in /etc/fstab.

    Hope this help.

    Regards.


    On Sat, 19 Mar 2005 11:42:34 -0500, Philip M. Golllucci
    <com> wrote: 


    --
    There's this old saying: "Give a man a fish, feed him for a day. Teach
    a man to fish, feed him for life."
    Dominique Guest

  3. #3

    Default Re: NFS and file locking

    Hi,

    That works!

    I haven't tried it yet...., but is it better to use the -L
    or run these 3 services ? Also, if anyone knows how to add this in
    fstab that would be nice too... Not that I reboot that often :)


    Thanks!


    -L
    Do not forward fcntl(2) locks over the wire. All locks will be
    local and not seen by the server and likewise not seen by other
    NFS clients. This removes the need to run the rpcbind(8) service
    and the rpc.statd(8) and rpc.lockd(8) servers on the client.
    Note that this option will only be honored when performing the
    initial mount, it will be silently ignored if used while updating
    the mount options.

    END
    ------------------------------------------------------------------------------

    Philip M. Gollucci
    Consultant
    E-Mail: com
    URL : http://p6m7g8.net/Resume/resume.shtml
    Phone : 301.254.5198

    $Id: .signature,v 1.7 2004/09/05 23:46:37 philip Exp $



    Dominique Goncalves wrote: 
    >
    >
    >[/ref]
    Philip Guest

Similar Threads

  1. File locking in XP
    By martingriffiths@adobeforums.com in forum Adobe Illustrator Windows
    Replies: 1
    Last Post: April 16th, 03:04 PM
  2. Win 2K3 & File Locking
    By Paanwa in forum PERL Modules
    Replies: 1
    Last Post: February 22nd, 01:50 AM
  3. File locking for all my needs
    By Matija Papec in forum PERL Miscellaneous
    Replies: 0
    Last Post: September 9th, 09:38 PM
  4. Replies: 8
    Last Post: July 26th, 04:02 PM
  5. Locking File
    By Ron Vecchi in forum ASP.NET General
    Replies: 2
    Last Post: July 23rd, 07:40 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139