Announcement

Collapse
No announcement yet.

NFS File Write Problem [Solved]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NFS File Write Problem [Solved]

    I've got two machines, both running Kubuntu 7.10, one set up as a NFS server and the other as a NFS client. Both have the same user defined with the same UID and GID and the mount point on the server is owned by that user. The line in the client side /etc/fstab is as follows:

    Code:
    server-backup.local:/mnt/nfs-compaq   /mnt/compaq_backup   nfs   rw,bg,soft 0 0
    It seems to mount without a problem both automatically if the server is on when the client starts, or manually if I turn the server on after the client has booted.

    I'm trying to do a simple copy of one or more files from the client to the server, but I consistently get an error that it can't copy the files. The files appear on the server side, but are always empty. Any ideas of what might be going on? I'll admit right now that I'm a bit ignorant about the use of NFS so any pointers are greatly appreciated.

    Bill Lugg

    #2
    Re: NFS File Write Problem

    If you want to transfer files from the client to the server, then you must install and setup the server on the other machine. The "client" can read and write files on the "server". The"server" can't read and write files on the "client". So you must make both machines, both "client" and "server". Then you can set up the /etc/exports file on both machines. I'm no expert either, but that's the way I have mine setup and it works perfectly for me between four machines. I use static IP addresses to simplify the process. Here is the fstab entry that mounts one of my other machines folders on the machine I am using now.

    192.168.1.16:/home/turtle /mnt/gina nfs users,rsize=8192,wsize=8192,timeo=14,intr,atime,au to,rw,dev,exec,suid 0 0

    Comment


      #3
      Re: NFS File Write Problem

      And these are the /etc/exports file entries that allow the other machine to see two folders on this machine.

      /home/gramps/Pictures 192.168.1.16(rw,async,root_squash)
      /home/gramps/Documents 192.168.1.16(rw,async,root_squash)


      Note that by using the exports file, you can specify exactly which machine can see what folders. After making changes to this file you have to restart NFS.

      Comment


        #4
        Re: NFS File Write Problem

        Well, this is really frustrating. I've followed the suggestions provided and I just don't seem to be getting anywhere.

        Here's my /etc/fstab entry (I.m using manual IPs so they shouldn't be causing a problem):

        Code:
        192.168.1.103:/mnt/nfs-compaq /mnt/compaq_backup nfs users,rsize=8192,wsize=8192,timeo=14,intr,atime,auto,rw,dev,exec,suid 0 0
        And here's the contents of my /etc/exports file on my server:

        Code:
        /mnt/nfs-antec  192.168.1.102(rw,async,root_squash)
        /mnt/nfs-compaq  192.168.1.100(rw,async,root_squash)
        Obviously the entry we're interested in is the nfs-compaq one.

        The error I'm getting on the client side is "Could not write to file..." and it list the path to the file it can't write. The strange thing is that it creates an empty file of that name in the target location.

        Does anyone have an idea of what I might be doing wrong here and how I can get this thing to work? Am I forgetting something on the client side? I thought it was as simple as mounting the server volume and start using it, but that's proving not to be the case so far.

        Thanks for any help you can provide.

        Bill Lugg

        Comment


          #5
          Re: NFS File Write Problem

          It may be a permissions problem. I have all of my exports in my home directory and all of my mounts are also in my home directory. I have never had a problem writing to either. Ditto for the other computers on the network, shared directories are always in the home folder, as are exported directories.

          Comment


            #6
            Re: NFS File Write Problem

            You know, it may be that I'm just brain dead, too. After looking at the problem a bit more, I pulled up KDiskFree and lo and behold, the partition was full! Who would have guessed? I had run some backups to it many moons ago, before I switched to Kubuntu, but the app I used went away when I switched and then I stared having problems. Coincidentally, the last backup I ran filled the partition and I wasn't bright enough to figure it out. But I have now and everything works great.

            Thanks for the help.
            Bill Lugg

            Comment


              #7
              Re: NFS File Write Problem

              Glad you figured it out. Could you add [Solved] to the title of your original post.

              Comment

              Working...
              X