NFS problems with Linux mounting a file

Discussion in 'Linux Networking' started by Meik Langwald, Jul 8, 2004.

  1. Hi,

    I'm having problems with a Linux NFS server and a Solaris client.
    I can mount a file (not a directory) from a Solaris or AIX box, which is
    bigger than 2GB, but not from a Linux box.

    How to verify:

    (on the linux box)
    - create a 3GB big test file ("dd if=/dev/zero of=testfile3gb bs=1024
    count=3m") and another one smaller than 2GB (chance count to 20k for a
    20MB file).
    - export the directory containing these files

    (on the solaris box)
    - mount the file system containing the above file (and unmount it)
    - mount the smaller test file (and unmount it)
    - mount the bigger test file (and unmount it)

    The first two mounts should succeed, the third one (with the 3g big test
    file) should fail with an error message:

    nfs mount: <hostname>:/<path>/<filename>: Permission denied

    I tried it with a Suse Enterprise Linux 8 (SLES8) with Kernel 2.4.19 and
    a Debian sarge box with kernel 2.6.6. So it doesn't just seem to be a
    problem with kernel 2.4.

    Any ideas how to get around this? I need this feature, otherwise the
    Linux box may be kicked out of the project.

    BTW: I tried it the other way, mounting a file from a Solaris box on a
    Linux box. This fails every time with the error message "mount: Not a

    Meik Langwald, Jul 8, 2004
    1. Advertisements

  2. Meik Langwald

    Dave Guest

    Anything exciting in the /var/log/messages and /var/adm/messages on the
    client and server, respectively, when it fails?

    Dave, Jul 9, 2004
    1. Advertisements

  3. Meik Langwald

    Dave Uhring Guest

    That is understandable. Linux NFS is broken.
    Install Solaris x86 on that box and your problems should go away.
    Dave Uhring, Jul 9, 2004
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    Don't agree with this one, using Linux NFS with various unix(tm)
    clients, you just need to follow the instructions in the Linux
    Case all his hardware is supported...

    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo | perl -pe 'y/a-z/n-za-m/'
    Version: GnuPG v1.2.1 (GNU/Linux)

    -----END PGP SIGNATURE-----
    Michael Heiming, Jul 9, 2004
  5. Meik Langwald

    Dave Uhring Guest

    A few years ago the exact reason for Linux NFS being broken was thoroughly
    discussed on the mailing list but I can no
    longer find the thread in the archives. Linux clients worked OK but BSD
    and Solaris clients did not.

    Perhaps Linus did finally get around to fixing this bug but I no longer
    even attempt to run a Linux NFS server. Samba, DHCP, DDNS, mail and print
    servers work fine under Linux.
    Most is, with the usual exception of NICs, but Intel NICs are quite
    inexpensive, reliable and supported by every x86 OS I have ever tried.
    Dave Uhring, Jul 9, 2004
  6. Meik Langwald

    Keith Keller Guest

    Hash: SHA1

    [note Newsgroups:]

    I don't have any BSD or Solaris clients, but I do have some IRIX clients,
    with a linux NFS server, and haven't had problems on either of them.

    - --keith

    - --
    (try just my userid to email me)

    Version: GnuPG v1.2.3 (GNU/Linux)

    -----END PGP SIGNATURE-----
    Keith Keller, Jul 9, 2004
  7. Meik Langwald

    Juhan Leemet Guest

    I remember reading about it... still see echoes...
    I run a mix of SPARC Solaris and SuSE PC Linux (used to be Mandrake, and
    before...). I generally use Solaris for NFS servers. I recall recently
    trying to mount stuff from a Dell 1400SC, and having some "weird
    problems" (inconsistencies?). I didn't investigate much further, since I
    had the Suns available. Now I just use PC Linux for desktops and/or
    compute boxes (building Linux RPMs, etc.) and "experiments", etc.

    BTW, I have also had "weird stuff" happen with Linux NIS. My Suns can't
    access internet addresses if they are using ypserv from Linux on the DELL.
    I suspect it has to do with NIS/DNS interworking (or lack thereof). Again,
    (like the doctor said) "if it hurts, don't do that" so I use Solaris.
    Linux NIS (and maybe NFS?) and automounter is a moving target. Linux
    automounter didn't used to support direct maps. Recently, someone pointed
    out that autofs4 (under development? not the default!) now does support
    direct maps, but I haven't (re)tested that for myself.

    I had considered that maybe it was just the mix/combination of SuSE and
    Solaris that was the problem. However, Sun invented NFS and NIS, so I
    cannot see that you can claim Sun versions are "busted"? They should be
    the "reference platform". If something doesn't work, then the other side
    is probably busted. The client sides of Linux NFS and NIS work fine though.
    Juhan Leemet, Jul 10, 2004
  8. Meik Langwald

    Dave Uhring Guest

    I made no such claim. Indeed it was I who recommended to the OP that he
    discard Linux on his NFS server and replace it with Solaris x86.
    Dave Uhring, Jul 10, 2004
  9. Meik Langwald

    Juhan Leemet Guest

    Sorry... sloppy writing... I should have said "one cannot claim".
    I meant some kind of indefinite pronoun.
    Juhan Leemet, Jul 10, 2004
  10. I think there should be any problem with solaris and linux mounting
    NFS shares. I did that few years back.

    Well, I can't understand why would someone install solaris x86 for NFS
    to work? Is NFS hardware/architecture dependent?

    Raqueeb Hassan
    Congo (DRC)
    Raqueeb Hassan, Jul 10, 2004
  11. Meik Langwald

    Dave Uhring Guest

    Solaris NFS server shares filesystems, not directories or files. You can
    readily mount those shares on either Solaris or Linux clients but you
    cannot mount individual files.
    Dave Uhring, Jul 10, 2004
  12. Uhm, the NFS server shares filesystems (directory hierarchies, really)
    but the mount protocol allows you to mount anything and Solaris will
    mount anything anywhere (as long as it is mounted on top of a

    # mount server:/export/home/casper/.tcshrc /mnt
    # ls -l /mnt
    -rw-r--r-- 1 casper ir 7837 Mar 16 13:46 /mnt

    Casper H.S. Dik, Jul 10, 2004
  13. Meik Langwald

    Dave Uhring Guest

    I'll be damned; you're right.
    Dave Uhring, Jul 10, 2004
  14. Meik Langwald

    Rich Teer Guest

    No, but the Linux NFS implementation was badly broken until
    fairly recently. So unless you are an all-Linux shop, using
    Solaris x86 for NFS is a good idea.

    Rich Teer, SCNA, SCSA

    Rite Online Inc.

    Voice: +1 (250) 979-1638
    Rich Teer, Jul 10, 2004
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    Unsure what you mean with fairly recently? AFAIR have been using
    Linux <--> Solaris/other *nix NFS since the early 2.4 kernel
    releases and had never problems, which couldn't be fixed by
    taking a deeper look into the Linux NFS howto.

    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo | perl -pe 'y/a-z/n-za-m/'
    Version: GnuPG v1.2.1 (GNU/Linux)

    -----END PGP SIGNATURE-----
    Michael Heiming, Jul 10, 2004
  16. Meik Langwald

    Josh Mckee Guest

    Perhaps the systems are falling back to NFS version 2 for some reason?

    Josh Mckee, Jul 10, 2004
  17. Meik Langwald

    Dave Uhring Guest

    That does not make much sense.

    I duplicated your results using a Slackware-9.1 system running the
    2.4.26 kernel as the server The 3GB file would not mount on a Solaris 9
    SPARC system while smaller files would mount.

    The large file *does* mount when Solaris 9 x86 is used as the server,
    although I had to reduce the size of the file to 2700MB due to space
    limits on the server. Still, that well exceeds the usual 2GB largefile
    Dave Uhring, Jul 11, 2004
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    Sounds like a good idea, v2 can't AFAIK handle files >2GB, v3
    Simply mount with v3 enabled and see if it works (mount/nfsstat).

    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo | perl -pe 'y/a-z/n-za-m/'
    Version: GnuPG v1.2.1 (GNU/Linux)

    -----END PGP SIGNATURE-----
    Michael Heiming, Jul 11, 2004
  19. Hi Dave,

    Thanks, good to hear that. :)
    Sorry, if I was not clear. Using Solaris x86 instead of Linux would be a
    perfect solution for this nfs problem.

    But that box is a production server with several applications on it
    (AFAIK there is even a support contract with Suse for this box) and
    playing an NFS server when restoring the only Solaris box in that data
    center is only one minor job for this box. So convincing the management
    to do switch to solaris x86 and migrating/relicense all the other
    applications would be by far to much effort.

    Right now, I see three possibilities: find a simple fix (not very
    probable, I think), get a "official" bug fix from Suse (not very
    probable, too, from what I know now, Suse will argue that this is a
    feature of the Linux kernel and not a bug) or work around this, maybe by
    using http or ftp instead of nfs.

    Meik Langwald, Jul 11, 2004
  20. Meik Langwald

    Dave Uhring Guest

    There should be no need to mount a 3GB file on the server in order to jump
    start it. After all, the entire Solaris OE is contained on 2 CDs.

    Why is the large file a problem? You can mount the directory on the Linux
    server which contains that large file and most current Linux filesystems
    can deal with large files. The only question is whether that server will
    maintain the integrity of the large file, or even small files for that
    matter. That is why my NFS server is Solaris x86.
    Other people have built Solaris install servers on Linux boxes. It is
    helpful to have a CDROM drive on the SPARC machine, however.
    Dave Uhring, Jul 11, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.