Mounting an NFS Home Share on CentOS 7 Clients
-
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.
-
I've never used autofs, does it do the /etc/fstab stuff for you, or just replace it altogether for the home folder?
-
@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.
-
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.
-
@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.
-
No such luck
-
What happens if you are connected and then lose connection to the NFS server? Does it store data until reconnection?
-
@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.
-
@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.
-
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.