[opensuse] howto automount nfs
12.1 Hi On good advice, I've been advised to install automounted nfs. I am exporting this: cat /etc/exports /home2 *(rw,sec=none:sys:krb5:krb5i:krb5p,no_subtree_check,insecure) /home2 contains /share1 /share2 /share3 ... and /user1 /user2 /user3 ... Under normal nfs, we mount the whole of /home2 from the server on /home2 on the client. The user home directories are held in LDAP as: /home2/DOMAIN/user Just as a test I'm trying to do the same withy autofs (we can discuss anything else after) I have setup /etc/auto.master: /home2 /etc/auto.misc and /etc/auto.misc /home2 -rw,sec=krb5 server:/home2 When a user logs in I get: automount [xxxx]: key "DOMAIN" not found in map source(s). What have I done wrong? Thanks, L x -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 28/03/12 19:27, lynn wrote:
12.1 Hi On good advice, I've been advised to install automounted nfs.
I am exporting this: cat /etc/exports /home2 *(rw,sec=none:sys:krb5:krb5i:krb5p,no_subtree_check,insecure)
Now it works:-) cat /etc/exports /home2/DOMAIN *(rw,sec=none:sys:krb5:krb5i:krb5p,no_subtree_check,insecure) auto.master /home2/DOMAIN /etc/auto.misc auto.misc * -rw,sec=krb5 server:/home2/DOMAIN/& And yes. Very neat. Upon user login, are any of the following correct? 1. The log shows that only the user folder has been mounted 2. The other folders under /DOMAIN are available but are only mounted on demand 3. At the cli, you have to know the names of other shared folders that are there. 4. In a gui you don't. 5. There is no cli auto completion (hit tab after the first few letters) for non mounted folders. 6. It would be better to get out the big hammer and stick the automount map stuff in LDAP. Thanks, L x -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
lynn said the following on 03/28/2012 02:02 PM:
And yes. Very neat.
Neater, and ultimately cleaner when you come to dump it all into YP/NIS/LDAP, is to have a map table per server :::::::::::::: auto.master :::::::::::::: /mnt/homeserver /etc/auto.homeserver # /mnt/homeserver ldap:ldapservername:homeserver # or # /mnt/homeserver homeserver # if using nsswitch for 'type' # see settings in /etc/sysconfig/autofs # for LDAP entries /mnt/fileserver /etc/auto.fileserver /mnt/CDserver /etc/auto.CDserver /mnt/local /etc/auto.local :::::::::::::: That last entry has proven very very useful :-) So WHY? Don't mount on 'where its going to go'; use symlinks. It's safer. Its more flexible. Mount everything under /mnt. "That's what 'mnt' is for ..." It lets you see all the things that you mount. It offers a flexibility. In the long run you are going to shed load; not all homes will come from the same server (another reason not to put it directly on /home) and people might want to dynamically mount other files from the file server or CD server. I have the music server under everyone's ~/Media/Music/Shared/ as a dynamic mount on demand. The template on account creation sets up ~/Media/Music/Shared as a symlink to /mnt/CDserver/Music/Shared/ As you might guess, not everything on the CD server is actually a CD :-) PLEASE do look at /etc/sysconfig/autofs and please do read autofs(5).
Upon user login, are any of the following correct?
1. The log shows that only the user folder has been mounted
That will depend on what you have in PAM for login. (Are we talking CLI or GUI?)
2. The other folders under /DOMAIN are available but are only mounted on demand
If you think about how the wild-card mechanism has to work .... The alternative is the way I do it with symlinks. You may find that the "mount at /mnt and use symlinks" ends up with things being a lot clearer. Or at least more is visible (and hewnce understandable and debugable)
3. At the cli, you have to know the names of other shared folders that are there. 4. In a gui you don't.
Isn't that always the case? If I use Dolphin it has actually scanned to build the GUI that it presents.
5. There is no cli auto completion (hit tab after the first few letters) for non mounted folders.
That seems reasonable, for the way you are doing it. Its why I prefer the "mount at /mnt" so I can see them all :-)
6. It would be better to get out the big hammer and stick the automount map stuff in LDAP.
See my notes above, /etc/sysconfig/autofs and autofs(5) I don't recall having all this trouble.... -- shin (n): A device for finding furniture in the dark. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 28/03/12 23:02, Anton Aylward escribió:
lynn said the following on 03/28/2012 02:02 PM:
And yes. Very neat.
Neater, and ultimately cleaner when you come to dump it all into YP/NIS/LDAP, is to have a map table per server
:::::::::::::: auto.master :::::::::::::: /mnt/homeserver /etc/auto.homeserver # /mnt/homeserver ldap:ldapservername:homeserver # or # /mnt/homeserver homeserver # if using nsswitch for 'type' # see settings in /etc/sysconfig/autofs # for LDAP entries /mnt/fileserver /etc/auto.fileserver /mnt/CDserver /etc/auto.CDserver
/mnt/local /etc/auto.local
::::::::::::::
That last entry has proven very very useful :-)
So WHY?
Don't mount on 'where its going to go'; use symlinks. It's safer. Its more flexible. Mount everything under /mnt. "That's what 'mnt' is for ..." It lets you see all the things that you mount. It offers a flexibility.
In the long run you are going to shed load; not all homes will come from the same server (another reason not to put it directly on /home) and people might want to dynamically mount other files from the file server or CD server. I have the music server under everyone's ~/Media/Music/Shared/ as a dynamic mount on demand. The template on account creation sets up ~/Media/Music/Shared as a symlink to /mnt/CDserver/Music/Shared/
As you might guess, not everything on the CD server is actually a CD :-)
PLEASE do look at /etc/sysconfig/autofs and please do read autofs(5).
Upon user login, are any of the following correct?
1. The log shows that only the user folder has been mounted
That will depend on what you have in PAM for login. (Are we talking CLI or GUI?)
Just keeping with cli for a moment, the login produces only a single mount. The of the user's /home folder. iow, as expected.
2. The other folders under /DOMAIN are available but are only mounted on demand
If you think about how the wild-card mechanism has to work .... The alternative is the way I do it with symlinks. You may find that the "mount at /mnt and use symlinks" ends up with things being a lot clearer. Or at least more is visible (and hewnce understandable and debugable)
3. At the cli, you have to know the names of other shared folders that are there. 4. In a gui you don't.
Isn't that always the case? If I use Dolphin it has actually scanned to build the GUI that it presents.
Sorry. Yes of course. The other folders become visible and therefore get mounted because the filemanager has scanned them. This would create a mount request. . .
See my notes above, /etc/sysconfig/autofs and autofs(5)
Yep. I actually looked at the man auto.master to get the map syntax:)
I don't recall having all this trouble....
This site has only 9 Linux boxes. To get the automounter maps into AD ldap would involve extending the schema. Automounting from flat files is fine just now. I suppose going to LDAP would save us having to update every client but hey it's only adding 4 lines to /etc. . . Thanks for your help. Any tips on getting the stuff into AD most welcome. The schema is here. http://dl.dropbox.com/u/45150875/automount.ldif L x -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
El 28/03/12 23:44, lynn escribió:
El 28/03/12 23:02, Anton Aylward escribió:
lynn said the following on 03/28/2012 02:02 PM:
:::::::::::::: auto.master ::::::::::::::
/mnt/local /etc/auto.local
::::::::::::::
That last entry has proven very very useful :-)
Could you post an example of your /etc/auto.local? L x -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Could you post an example of your /etc/auto.local? L x
Here's my /etc/auto.nfs ... Note that & is expected by the automounter to the name of the target, and $OSNAME and $ARCH are expanded to that of the client system. av eldarion:/export/& pub eldarion:/export/& svn eldarion:/export/& smb.d eldarion:/export/home/sys/& games eldarion:/export/home/sys/& sys eldarion:/export/home/sys/$OSNAME-$ARCH host eldarion:/export/home/hosts/$HOST -Nick -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
lynn said the following on 03/28/2012 05:48 PM:
El 28/03/12 23:44, lynn escribió:
El 28/03/12 23:02, Anton Aylward escribió:
lynn said the following on 03/28/2012 02:02 PM:
:::::::::::::: auto.master ::::::::::::::
/mnt/local /etc/auto.local
::::::::::::::
That last entry has proven very very useful :-)
Could you post an example of your /etc/auto.local?
I use it on one machine to defer mounting thigns that should be on the dataFileServer but aren't. It varies from machine to machine. This is from my laptop .... :::::::::::::: auto.local :::::::::::::: Downloads -fstype=ext3,nodev,noatime,noacl,nodiratime,nosuid :/dev/vgmain/Downloads Media -fstype=reiserfs,nodev,noatime,nodiratime,noacl,nosuid :/dev/vgmain/Media PDF -fstype=reiserfs,nodev,noatime,nodiratime,noacl,nosuid :/dev/vgmain/PDF -- Appraise war in terms of the fundamental factors. The first of these factors is moral influence. Sun-Tzu -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Anton Aylward
-
lynn
-
Nick LeRoy