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

    Mounting an NFS Home Share on CentOS 7 Clients

    IT Discussion
    nfs nfs 3 centos centos 7 file server home ntg lab scale scale hc3 rhel rhel 7 linux
    3
    13
    9.1k
    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.
    • A
      Alex Sage
      last edited by Alex Sage

      If the NFS server is down I assume the only way I could login would be with the root account?

      S 1 Reply Last reply Reply Quote 1
      • S
        scottalanmiller @Alex Sage
        last edited by scottalanmiller

        @anonymous said:

        If the NFS server is down I assume the only way I could login would be with the root account?

        That's correct, unless you take other measures. You can always have an admin account that is not on the NFS, which would be recommended.

        So example:

        Normal Account: anon:/home/anon
        Special Account: anonadmin:/opt/home/anonadmin

        /home would be mounted via NFS
        /opt/home would be local to the /opt filesystem (we use /opt over /var in this example because /var is often remotely mounted as well and more volatile.)

        This is a solid workaround so that if anything is wrong with the mounting system on either end, or in the network, that the machine remains reachable and manageable in a simple manner. It is also common to place "utility" accounts in /opt/home for a similar reason. If you have an application that runs and needs a home directory, you likely don't want it mounting it over NFS and pulling data externally like a user would.

        1 Reply Last reply Reply Quote 2
        • S
          scottalanmiller
          last edited by

          Keep in mind that this is not a process for "normal" servers, this is a technique used for servers with users. If you had a pure server that there is no reason for users to log into, you would not likely want to do this in most cases. You would probably not have user accounts at all.

          1 Reply Last reply Reply Quote 1
          • S
            stacksofplates
            last edited by stacksofplates

            I've never used autofs, does it do the /etc/fstab stuff for you, or just replace it altogether for the home folder?

            S 1 Reply Last reply Reply Quote 0
            • S
              scottalanmiller @stacksofplates
              last edited by

              @johnhooks said:

              I've never used autofs, does it do the /etc/fstab stuff for you, or just replace it altogether for the home folder?

              AutoFS does not use fstab at all, it is specifically to replace that as the connections are not permanent, they are ephemeral. It mounts filesystems at the time of use, not proactively. This is better for security as the mounts are not discoverable and better for performance as they are not mounted when not used. It's also good for reliability as if a mount fails now, it will attempt a remount later. It also unmounts after a time of disuse.

              AutoFS uses mount commands under the hood, not the fstab during startup. You can use it with any filesystem. Home is common, and the /net filesystem is standard, but you could use it for anything. It's fully customizable.

              S 1 Reply Last reply Reply Quote 2
              • S
                scottalanmiller
                last edited by

                Tested on the second CentOS 7 server and working there, too. So far so good. And the NFS from OpenSuse Leap 42.1 over the Scale cluster is insanely fast, it looks instant when using it.

                1 Reply Last reply Reply Quote 1
                • S
                  stacksofplates @scottalanmiller
                  last edited by

                  @scottalanmiller said:

                  @johnhooks said:

                  I've never used autofs, does it do the /etc/fstab stuff for you, or just replace it altogether for the home folder?

                  AutoFS does not use fstab at all, it is specifically to replace that as the connections are not permanent, they are ephemeral. It mounts filesystems at the time of use, not proactively. This is better for security as the mounts are not discoverable and better for performance as they are not mounted when not used. It's also good for reliability as if a mount fails now, it will attempt a remount later. It also unmounts after a time of disuse.

                  AutoFS uses mount commands under the hood, not the fstab during startup. You can use it with any filesystem. Home is common, and the /net filesystem is standard, but you could use it for anything. It's fully customizable.

                  I realized how stupid this question was after I walked away and got in the shower. I was hoping to make it back before you read it haha.

                  1 Reply Last reply Reply Quote 2
                  • S
                    scottalanmiller
                    last edited by

                    No such luck 🙂

                    1 Reply Last reply Reply Quote 1
                    • S
                      stacksofplates
                      last edited by

                      What happens if you are connected and then lose connection to the NFS server? Does it store data until reconnection?

                      S 1 Reply Last reply Reply Quote 0
                      • S
                        scottalanmiller @stacksofplates
                        last edited by

                        @johnhooks said:

                        What happens if you are connected and then lose connection to the NFS server? Does it store data until reconnection?

                        Store data? Where would it "store data"? What are you picturing? The filesystem would be gone, same as any "mapped drive" situation.

                        S 1 Reply Last reply Reply Quote 0
                        • S
                          stacksofplates @scottalanmiller
                          last edited by

                          @scottalanmiller said:

                          @johnhooks said:

                          What happens if you are connected and then lose connection to the NFS server? Does it store data until reconnection?

                          Store data? Where would it "store data"? What are you picturing? The filesystem would be gone, same as any "mapped drive" situation.

                          Store as in cache somewhere until it can reconnect.

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

                            No, there is nothing like that. The filesystem is just not there. It would warn you, though, so you would know not to be trying to save to something that doesn't exist.

                            1 Reply Last reply Reply Quote 1
                            • 1 / 1
                            • First post
                              Last post