Announcement

Collapse
No announcement yet.

Kubuntu local network file sharing with NFS

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

    Kubuntu local network file sharing with NFS

    (Eventually I decided not to use NFS. After a while spent trying different configurations and methods, I arrived at a solution that meets my needs. I learned a lot and received much valuable help here on these Forums)

    I have been wanting to share a folder between two computers on my wired home network (which includes a wireless printer) and decided to use NFS to achieve this. I do not have any dealings with windows so as far as I can see I have no need for SAMBA.
    The two PC's each have Kubuntu 14.04 installed and I followed a simple set of instructions at http://mostlylinux.wordpress.com/network/nfshowto to create the shared folder.

    I called the shares /home/myname/thisfile and home/othername/thisfile and the link is via /home/myname/thisfile/linkfile and home/othername/thisfile/linkfile

    The share works well, I followed the set up instructions to the letter and was pleased with the result, until I realised that if I turned one of the computers off it caused an undesirable effect on the computer still powered up.
    What happens is that browsers and the Internet still work but Dolphin goes into an unresponsive state, files and directories will no longer open, the application is frozen. Restarting the computer restores everything into a workable state.
    This means that if I shut down one pc the other has to be restarted to keep things working properly.
    I have double checked the set up and tried dabbling with settings all to no avail. I suspect that some configuration is needed but I have no idea what or where. My attempts to Google for info about NFS have left me with brain-ache but little else. Can anyone help, I would like to make this a success story?
    Last edited by bobbicat; Jul 18, 2014, 01:15 PM.

    #2
    That is weird...I have to say that Im not quite pleased with dolphin handling network filesystems either not even samba.

    I hardly cant help but to say that you might want a give a try to Konsole and access the nfs with Konsole...Maybe you can try to run in Konsole a dolphin instance and try access via root dolphin to the nfs and if it crushes just kill the instance ?

    Comment


      #3
      kdesudo dolphin creates a root instance of Dolphin that is frozen, unfortunately
      my partner wants me to remove the file sharing as it interferes with her use of her PC
      I wish I could solve this as it could be a very useful function

      Comment


        #4
        you might want to try with the '_netdev' option for the mount(s) in the clients /etc/fstab. this will tell mount its a network device and not to try to mount with out network being up .. the 'user' option might also help since it will let non-root users unmount / mount the share.

        there is also the 'intr' options it's described as follows: Allows NFS requests to be interrupted if the server goes down or cannot be reached.
        Mark Your Solved Issues [SOLVED]
        (top of thread: thread tools)

        Comment


          #5
          this was my fstab line before editing
          192.168.1.X:/home/othername/thisfile /home/myname/thisfile/link nfs rw,hard,intr,noexec 0 0

          this was my fstab line after suggested edits
          192.168.1.X:/home/othername/thisfile /home/myname/thisfile/link nfs rw,user,hard,intr,_netdev,noexec 0 0

          there was no improvement, dolphin still froze on shutdown of the other pc
          I was still able to browse the /home folder using rekonq
          Last edited by bobbicat; Jul 15, 2014, 06:19 AM.

          Comment


            #6
            possible solution - will report back with results

            I have found a thread on these Forums dealing with my exact problem.
            It offers a couple of solutions, I'll give them a try and report back here with any results I experience.
            For those interested the thread is at https://www.kubuntuforums.net/showth...ives-using-NFS

            Comment


              #7
              I do seem to have found a solution.

              It is the fact that the shared file is still mounted on shutdown that causes the lockup on the other PC.
              In Dolphin there is an entry in the left most column for the share.
              It is possible to unmount this share within Dolphin by right clicking its entry (in the same way you would 'safely remove' a pen drive).
              However the line defining the mount for the share in /etc/fstab needs to include the option 'users' to enable this ability to unmount.(NOTE. this is USERS and not USER)
              It is not essential, but I also included the noauto option, so that the share is only mounted when it is required rather than every time at start up.

              My fstab line now looks like this:

              192.168.1.X:/home/othername/thisfile /home/myname/thisfile/link nfs rw,noauto,hard,intr,_netdev,users,noexec 0 0

              Remember to unmount in the way outlined above and the problem is no more.

              I would say that the threads

              http://mostlylinux.wordpress.com/network/nfshowto
              and
              https://www.kubuntuforums.net/showth...ives-using-NFS

              adequately cover the subject of NFS filesharing in Kubuntu


              I'll test this for a couple of hours and if I come across nothing new I'll mark the thread SOLVED
              Last edited by bobbicat; Jul 15, 2014, 02:50 AM.

              Comment


                #8
                Auto mount Windows 8.1 shared drive over WiFi

                Hi, I know this is an old thread, but I have recently installed Kubuntu 14.04 and can successfully mount an external hard drive attached to my windows 8.1 PC. The problem is, I have to do this manually every time I boot up Kubuntu. I was wondering whether there was an auto script way to do this on desktop in the new 14.04 as I haven't been able to figure it out yet. The konsole command I use is as follows: sudo mount -t cifs //192.168.1.28/d/Entertainment/ /mnt/entertainment/ -o username=,password=
                After running this the network drive appears in Dolphin and I am good to go.

                Comment


                  #9
                  Hi bobsyauncle - first I'd like to point out that if you have a problem it is probably better to start a new thread and title it so that the rudiments of your difficulty are apparent to anyone scanning thread titles - that way you'll get quick and relevant answers and others with similar problems will see where to look when seeking answers.
                  (oops, lecture over)

                  If you are logged in you will see a button - Post New Thread at top left in Help the New Guy Forum
                  Go start a new thread, title it - 'How do I automatically mount an external hard drive in Kubuntu?' or 'Auto mount Windows 8.1 shared drive over WiFi'
                  The kindly and knowledgeable people here on these Forums will swiftly point you in the right direction and if this query leads to more questions I'm sure they will be answered too.
                  Last edited by bobbicat; Jul 15, 2014, 06:17 AM.

                  Comment


                    #10
                    My fstab line now looks like this:

                    192.168.1.X:/home/othername/thisfile /home/myname/thisfile/.link nfs rw,noauto,hard,intr,users,noexec 0 0

                    I turned the link file into a hidden file by putting a "." in front of it. I removed option _netdev as this did not seem essential everything works the same without it.

                    In order to share, the share has to be mounted, afterwards it is then unmounted to prevent problems if one of the PC's is turned off.
                    This is achieved by opening and subsequently unmounting in Dolphin as outlined above.

                    There is still a possibility of a hiccup, which I've yet to solve.
                    If shares are mounted on both PC'S simultaneously a situation arrives where it is impossible to unmount one of the shares - which then reverts to the situation where lockups occur.
                    I can cope with this for now, needing to be careful to mount and unmount one share at a time.
                    This works but needs refining.

                    I won't mark this as solved as the solution this far is only partial.
                    Last edited by bobbicat; Jul 15, 2014, 06:04 AM.

                    Comment


                      #11
                      _netdev should be used when your automounting . it will hold off the mounting untill the network connection is up . since your using the noauto option it kinda negates any benifit that _netdev would provide . woops i guess i forgot the "s" for users sorry about that .
                      Mark Your Solved Issues [SOLVED]
                      (top of thread: thread tools)

                      Comment


                        #12
                        Hi sithlord48 and thanks, but as a relatively newbie, what do you mean by using _netdev, is this something I need to install or is it a command line?

                        Comment


                          #13
                          If you install the kdenetwork package (and its friends that it pulls in), then for any folder on your network that is marked for sharing in its properties, you can use dolphin, click Network and then "Add Network Folder", and I usually use ssh and the fish protocol to make the link to the folder on the other machine. This method avoids the issues associated with mounting NFS shares (or not), and having the other computer running all the time.

                          Comment


                            #14
                            Thanks dibl, I tried that out, its all good
                            Here's how it worked out for me:


                            The PC's need fixed local addresses (I can set these in my router)

                            I opened a console on both computers and entered on each:
                            sudo apt-get install openssh-server kdenetwork


                            on one PC I ran in terminal:
                            sudo mkdir /home/username1/"Shared Files"


                            on the other machine:

                            I then went into Dolphin and clicked the Network icon then 'Add Network Folder'
                            I chose the 'Secure shell(ssh)' radio button

                            I then entered:

                            Name: You choose
                            User: the other PC's log in name [username1]
                            Server: the other PC's network address (eg 192.168.0.XX)
                            Port: 22 (the default)
                            Protocol: fish (from drop down menu)
                            Folder: /home/username1/"Shared Files"
                            Encoding: Unicode (UTF-8) [default]

                            and ticked box for 'create an icon' [default]
                            pressed 'save and connect'
                            continued, ignoring warning
                            entered password for other machine at prompt, ticked remember

                            all this produced a link called 'You choose' in Dolphin's Network folder.
                            This link gives full access to /home/username1/"Shared Folder" from the other machine.


                            I tried to set a share in the opposite direction but was unable to (maybe I borked some config files with my messing) its not vital, anyhow

                            I think this achieves what I set out to do so I've marked this thread 'solved'
                            Last edited by bobbicat; Jul 18, 2014, 07:47 AM.

                            Comment

                            Working...
                            X