Announcement

Collapse
No announcement yet.

Creating NFS server and client shares

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [DESKTOP] Creating NFS server and client shares

    Okay. I am changing thread as old one not covering real topic..... NFS
    Old thread = https://www.kubuntuforums.net/forum/...lem-with-samba

    Still issues. Read over 50 websites. Searched through and read within this forum & others.
    My current setup.
    PC1 = Main = Always on, so I setup NFS server here. I have shared a folder, it appears to be shared. (I can see it on the server=pc1)

    PC2. Not always on. Has lots of stuff I would like to access remotely, so NFS Client as I already had a server.
    How do I change an existing zpool WITHOUT erasing it, to an NFS share?
    How do I add that share to exports?
    Can I add the zpool share to fstab file as a permanent NFS share even if that PC2 is shutdown, when I turn/restart PC1 ?
    OR
    Should I reverse server=PC2 and client-PC1 ?

    #2
    What's a zpool? Changing or erasing a zpool is not an NFS issue. It's a ZFS issue.

    You probably should NOT set up NFS until ZFS is set up the way you want it.

    Please Read Me

    Comment


      #3
      IIUC the server is where the files are, they get served to the client. With two computers both sharing files, both are clients and servers.
      Regards, John Little

      Comment


        #4
        Originally posted by oshunluvr View Post
        What's a zpool? Changing or erasing a zpool is not an NFS issue. It's a ZFS issue.

        You probably should NOT set up NFS until ZFS is set up the way you want it.
        I kind of figured that part-->EDIT. But Thanks for your input oshunluvr
        I was asking, since my brain isn't working. how do I share an existing "folder"
        nearly all if not all the instructions I have read, are 1. install NFS. 2 setup server or client. 3. MKDIR a folder 4. shown chmod that folder. 5. add folder to exports (server)

        Originally posted by jlittle View Post
        IIUC the server is where the files are, they get served to the client. With two computers both sharing files, both are clients and servers.
        Okayyyy. That's very unhelpful.-->EDIT. Sorry jlittle. I sound angry. Apologies.
        I am now very confused on your comment. "with two computers both sharing files, both are clients and servers"
        As I mentioned (if I mentioned it) a couple of websites say to create both servers and clients on each PC. The last time I was playing with servers was in the Noughts, and it was MS server's. DNS, DHCP, File server. AND. I don't really remember that much about it. I've had to many mental health and brain health issues to care about remembering stuff like that... And i do not have the fund$ to go and buy some PC just to turn it into some Linux server.... When as far as I can tell, I don't need it, AND I really hope Linux isn't moving towards this.

        jlittle. Are you suggesting or encouraging me to put the server on the PC2 that has all most of my files? If this is a yes, does anyone have a preferred method to remove "server" and replace it client Hang on. This instructions I read that made more sense (to me) that others
        [HTML]https://bluexp.netapp.com/blog/azure-anf-blg-linux-nfs-server-how-to-set-up-server-and-client[/HTML]
        ​I install server files
        Then make a root share folder.
        Then chown & chmod root folder.
        ............
        Now I want to share existing folders... /media/username/folder(s)
        So do I just assume that the root share folder /media/username/ is already created and just skip over to the chown & chmod commands? Isn't this going or will this to effect my ability to sort through these folders (ZFS Raid1 & and couple of HDD's). It is coming up to End-of-Year, so I need to clean up folders, get rid of duplicate files, compress "critical" files and copy said "critical" files to multiple locations.

        ----
        So my plan is
        -----
        to add NFS server to PC2.....
        Question.... Is it safe to chmod and chown my /media/username/ folder ?

        Q. I am still not understanding the contents of the export file
        Code:
        # Example for NFSv2 and NFSv3:
        # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
        #
        # Do I use the above or the below ?????
        #
        # 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)
        #
        #  What is this stuff above ... gss/krb5i     fsid=0,crossmnt,
        #
        #/srv/homes       PC2/media/user2/S-Drive(rw,sync,no_subtree_check) 192.168.1.58--cannot get static IP's to work correctly.
        #/media/user2    192.168.1.0/255.255.255.0(rw,no_root_squash,no_subtree_check)​
        I've used the command nfsstat -2 &nfsstat -3 &nfsstat -4 and I have received the following
        Code:
        [FONT=monospace][COLOR=#54ff54][B]user1@PC1[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ sudo nfsstat -2 [/COLOR]
        Server rpc stats:
        calls      badcalls   badfmt     badauth    badclnt
        0          0          0          0          0        
        
        Server nfs v2:
        null             getattr          setattr          root             lookup            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        readlink         read             wrcache          write            create            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        remove           rename           link             symlink          mkdir            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        rmdir            readdir          fsstat            
        0         0%     0         0%     0         0%      
        
        [COLOR=#54ff54][B]user1@PC1[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ sudo nfsstat -3 [/COLOR]
        Server rpc stats:
        calls      badcalls   badfmt     badauth    badclnt
        0          0          0          0          0        
        
        Server nfs v3:
        null             getattr          setattr          lookup           access            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        readlink         read             write            create           mkdir            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        symlink          mknod            remove           rmdir            rename            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        link             readdir          readdirplus      fsstat           fsinfo            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        pathconf         commit            
        0         0%     0         0%      
        
        [COLOR=#54ff54][B]user1@PC1[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ sudo nfsstat -4 [/COLOR]
        Server rpc stats:
        calls      badcalls   badfmt     badauth    badclnt
        0          0          0          0          0        
        
        Server nfs v4:
        null             compound          
        0         0%     0         0%      
        
        Server nfs v4 operations:
        op0-unused       op1-unused       op2-future       access           close            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        commit           create           delegpurge       delegreturn      getattr          
        0         0%     0         0%     0         0%     0         0%     0         0%      
        getfh            link             lock             lockt            locku            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        lookup           lookup_root      nverify          open             openattr          
        0         0%     0         0%     0         0%     0         0%     0         0%      
        open_conf        open_dgrd        putfh            putpubfh         putrootfh        
        0         0%     0         0%     0         0%     0         0%     0         0%      
        read             readdir          readlink         remove           rename            
        0         0%     0         0%     0         0%     0         0%     0         0%      
        renew            restorefh        savefh           secinfo          setattr          
        0         0%     0         0%     0         0%     0         0%     0         0%      
        setcltid         setcltidconf     verify           write            rellockowner      
        0         0%     0         0%     0         0%     0         0%     0         0%      
        bc_ctl           bind_conn        exchange_id      create_ses       destroy_ses      
        0         0%     0         0%     0         0%     0         0%     0         0%      
        free_stateid     getdirdeleg      getdevinfo       getdevlist       layoutcommit      
        0         0%     0         0%     0         0%     0         0%     0         0%      
        layoutget        layoutreturn     secinfononam     sequence         set_ssv          
        0         0%     0         0%     0         0%     0         0%     0         0%      
        test_stateid     want_deleg       destroy_clid     reclaim_comp     allocate          
        0         0%     0         0%     0         0%     0         0%     0         0%      
        copy             copy_notify      deallocate       ioadvise         layouterror      
        0         0%     0         0%     0         0%     0         0%     0         0%      
        layoutstats      offloadcancel    offloadstatus    readplus         seek              
        0         0%     0         0%     0         0%     0         0%     0         0%      
        write_same        
        0         0%      
        
        [COLOR=#54ff54][B]user1@PC1[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#5454ff][B]~[/B][/COLOR][COLOR=#000000]$ [/COLOR][/FONT]
        ​
        And it is meaningless to me. How do I know if I am using Version 3 or Version 4 NFS ??
        Last edited by CharlieDaves; Nov 17, 2024, 03:00 PM.

        Comment

        Working...
        X