Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I understand that the key would be used as the path on the remote server so: /export/home/keyvalue
However I don't get how this works:
Code:
* &:/export/home/&
Quote:
You can use the ampersand character to represent both the remote server and the remote subdirectory, in the same line of the indirect map. For example, if the user’s home directories are physically located on many different servers, but the directory under which the home directories are located is called /export/home/servername on all the servers, the following line in the /etc/auto_home map mounts all the users home directories from any server:
So how does autofs know what all those NFS servers are? There is no definition of what NFS servers to use.
I think where your thinking is going wrong is in assuming that the key will always represent a user. For a user home directory export it certainly doesn't make much sense, but if you had a bunch of servers, each exporting a /export/$hostname then an indirect "* &:/export/&" map attached at /servers may actually be useful.
I think where your thinking is going wrong is in assuming that the key will always represent a user. For a user home directory export it certainly doesn't make much sense, but if you had a bunch of servers, each exporting a /export/$hostname then an indirect "* &:/export/&" map attached at /servers may actually be useful.
Ow yes yes yes Thanks! That makes it clear.
It just looks a bit weird to do an export on the server that has the same directory name as the server itself. It could be as well /nfsexport(on each server), ...
And then this on the autofs client side would work too
It just looks a bit weird to do an export on the server that has the same directory name
Yes, I know what you mean, and I don't think anyone would use that naming scheme on a standalone server as there's no point, but if you had a 2 node cluster where the nodes provide mutual application fail-over for each other, in the event of failure you could potentially end up with both /export/hostname-1 and /export/hostname-2 on the same node at the same time, so you couldn't use the same name for the directory. Of course, this was the way things were done in the pre-virtualisation/containerisation days. I expect you'd just move the whole virtual machine image across nowadays, but this was how it was done before virtual-machines came along. I installed and supported a couple of warehouse management systems on clusters that worked just like this back in the good old days.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.