ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Linux: Mounting an NFS Share

    IT Discussion
    linux nfs fedora centos filesystem sam linux administration sam linux desktop administration system administration scott alan miller
    5
    16
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller @JaredBusch
      last edited by

      @JaredBusch said in Linux: Mounting an NFS Share:

      I have always wished that the mount command had to switch to put the damn thing Into fstab.

      You mean like --perm and it just appended into fstab? That would rock.

      JaredBuschJ 1 Reply Last reply Reply Quote 0
      • JaredBuschJ
        JaredBusch @scottalanmiller
        last edited by

        @scottalanmiller said in Linux: Mounting an NFS Share:

        @JaredBusch said in Linux: Mounting an NFS Share:

        I have always wished that the mount command had to switch to put the damn thing Into fstab.

        You mean like --perm and it just appended into fstab? That would rock.

        Yeah pretty much anything like that

        1 Reply Last reply Reply Quote 0
        • AdamFA
          AdamF
          last edited by

          Can you explain why if I just mount an NFS share, using the command below, I can get a data transfer/throughput speed of approx 300 MB/s

          mount 192.168.2.2:/var/nfs_share1 /mnt/nfs1
          

          BUT,

          If I put an entry in fstab, it dramatically slows the transfer to about 35-40 MB/s

          192.168.2.2:/var/nfs_share1 /mnt/nfs1 nfs rw,sync,hard,intr 0 0
          

          What causes that?

          scottalanmillerS 1 Reply Last reply Reply Quote 1
          • scottalanmillerS
            scottalanmiller @AdamF
            last edited by

            @fuznutz04 said in Linux: Mounting an NFS Share:

            Can you explain why if I just mount an NFS share, using the command below, I can get a data transfer/throughput speed of approx 300 MB/s

            mount 192.168.2.2:/var/nfs_share1 /mnt/nfs1
            

            BUT,

            If I put an entry in fstab, it dramatically slows the transfer to about 35-40 MB/s

            192.168.2.2:/var/nfs_share1 /mnt/nfs1 nfs rw,sync,hard,intr 0 0
            

            What causes that?

            sync

            1 Reply Last reply Reply Quote 0
            • scottalanmillerS
              scottalanmiller
              last edited by

              "The default export behavior for both NFS Version 2 and Version 3 protocols, used by exportfs in nfs-utils versions prior to nfs-utils-1.0.1 is "asynchronous". This default permits the server to reply to client requests as soon as it has processed the request and handed it off to the local file system, without waiting for the data to be written to stable storage. This is indicated by the async option denoted in the server's export list. It yields better performance at the cost of possible data corruption if the server reboots while still holding unwritten data and/or metadata in its caches. This possible data corruption is not detectable at the time of occurrence, since the async option instructs the server to lie to the client, telling the client that all data has indeed been written to the stable storage, regardless of the protocol used."

              http://nfs.sourceforge.net/nfs-howto/ar01s05.html

              1 Reply Last reply Reply Quote 0
              • scottalanmillerS
                scottalanmiller
                last edited by

                So when you mount with the mount command without specifying, you get async. When you put it into fstab, you manually overrode the async to go with sync. So a major change.

                K AdamFA 2 Replies Last reply Reply Quote 0
                • K
                  krisleslie @scottalanmiller
                  last edited by

                  @scottalanmiller are the nfs shares faster than Windows SMB shares?

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • AdamFA
                    AdamF @scottalanmiller
                    last edited by

                    @scottalanmiller so safer, but slower essentially.

                    DustinB3403D scottalanmillerS 2 Replies Last reply Reply Quote 0
                    • DustinB3403D
                      DustinB3403 @AdamF
                      last edited by

                      @fuznutz04 said in Linux: Mounting an NFS Share:

                      @scottalanmiller so safer, but slower essentially.

                      Slower usually is safer.

                      1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @krisleslie
                        last edited by

                        @krisleslie said in Linux: Mounting an NFS Share:

                        @scottalanmiller are the nfs shares faster than Windows SMB shares?

                        NFS is generally faster than SMB. SMB is traditionally super slow, NFS is screaming fast. SMB has improved over time, but NFS typically beats it.

                        1 Reply Last reply Reply Quote 1
                        • scottalanmillerS
                          scottalanmiller @AdamF
                          last edited by

                          @fuznutz04 said in Linux: Mounting an NFS Share:

                          @scottalanmiller so safer, but slower essentially.

                          Sync is safer for writes, but yeah, way slower.

                          AdamFA 1 Reply Last reply Reply Quote 0
                          • AdamFA
                            AdamF @scottalanmiller
                            last edited by

                            @scottalanmiller Do you typically use the Sync then as a best practice, even though it is much slower to ensure there is no corruption?

                            scottalanmillerS 1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @AdamF
                              last edited by

                              @fuznutz04 said in Linux: Mounting an NFS Share:

                              @scottalanmiller Do you typically use the Sync then as a best practice, even though it is much slower to ensure there is no corruption?

                              Totally depends on the need. A database, hell yeah sync that. A general document file server? Nah, async is fine.

                              AdamFA 1 Reply Last reply Reply Quote 1
                              • AdamFA
                                AdamF @scottalanmiller
                                last edited by

                                @scottalanmiller Sounds solid. The speed difference is dramatic. Thanks.

                                1 Reply Last reply Reply Quote 1
                                • scottalanmillerS scottalanmiller referenced this topic on
                                • 1 / 1
                                • First post
                                  Last post