AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Automounting NFS directories in AIX

    Posted Tue September 21, 2010 06:27 PM

    Originally posted by: SystemAdmin


    This is my first time dealing with AIX, so I beg patience. :-) We have all our RHEL machines set up such that they will mount any NFS directory from any other server when a user tries to go to it. (So it's configured to put everything under /net, and when a user goes to /net/servername, it mounts the exports from servername automatically.) I can see the exports from the other servers if I do 'showmount -e <servername>', and I can manually mount the directories with no problem. I'm seeing a lot about creating an auto_master file to automount, but that only seems to automate the process of mounting a hard coded list of directories, not a dynamic one. Any thoughts?

    Thank you!
    #AIX-Forum


  • 2.  Re: Automounting NFS directories in AIX

    Posted Wed September 22, 2010 01:30 AM

    Originally posted by: SystemAdmin


    no big difference between rhel and aix: read the docs on autoFS and automount
    #AIX-Forum


  • 3.  Re: Automounting NFS directories in AIX

    Posted Wed September 22, 2010 01:33 PM

    Originally posted by: SystemAdmin


    Well, there's certainly at least one difference - I don't have to create or configure the auto.master in RHEL. It happens automatically. I've never touched anything in RHEL to get this to work...
    #AIX-Forum


  • 4.  Re: Automounting NFS directories in AIX

    Posted Wed September 22, 2010 08:05 AM

    Originally posted by: flodstrom


    There's a sample "auto_master" file in /usr/samples/nfs/. In that file you'll have correct syntax for using the special hosts map.

    Like this for example.

    /net -hosts -nosuid

    Also remember to run a "automount -v" (-v is only for verbose output...) after updating the auto_master file.
    #AIX-Forum


  • 5.  Re: Automounting NFS directories in AIX

    Posted Wed September 22, 2010 01:37 PM

    Originally posted by: SystemAdmin


    That seems to be a very similar file to what I have in RHEL, so I moved it into /etc. However, when I run automount -v I get:
    automount: no mounts
    automount: no umounts

    And if I try to ls in /net it just hangs. The thing is, the hosts file does only have itself and the loopback addy in it (which is the same case as the RHEL machines). So if that's what it's looking at to generate the map file, then there's nothing there to get. Is there a way to get it to work without having to manually add the other machines anywhere?

    Thanks!
    #AIX-Forum


  • 6.  Re: Automounting NFS directories in AIX

    Posted Wed September 22, 2010 01:57 PM

    Originally posted by: SystemAdmin


    Ah - I think I might have found something. In RHEL I do make a few tweaks to the nsswitch.conf, one of which is setting hosts to files, then dns. I'm guessing I might have to do something similar, although there's no nsswitch.conf. Perhaps netsvc.conf? Looks similar.

    goes to play
    #AIX-Forum


  • 7.  Re: Automounting NFS directories in AIX

    Posted Wed September 22, 2010 02:32 PM

    Originally posted by: SystemAdmin


    Yes...that was it! So, for reference of anyone else who might see this, I had to edit /etc/netsvc.conf and add the line:

    hosts = local, bind

    This meant that when autofs was using the hosts map to create its list, that map included hosts from both the local hosts file and from dns. At least, that's what I'm assuming is going on. ;-)

    Thanks for pointing me in the right direction!
    #AIX-Forum