1834158 Members
2426 Online
110064 Solutions
New Discussion

Automounter

 
SAM_24
Frequent Advisor

Automounter

Hi,

This is the question about automounter -hosts map.

Let us take one example. I have system A( nfs server ) and system B ( nfs client ). File system /data has been exported. On client when I access "/net/system A/data" works fine. Now I have exported another file system /data2 on nfs server. On the client this change is not updated. Still I am seeing only /data file system.

I tried to restart the automountd. It didn't help.

My question:

When first time clients contacts nfs server and whatever file systems are exported at that time will be mounted by automountd. Additional export of the file systems will not be mounted on the client. Is this right?

If I am wrong please tell me how to fix it?

Thanks.

Never quit
7 REPLIES 7
Shahul
Esteemed Contributor

Re: Automounter

Hi

Here U are trying normal NFS mounting, Not automounting. In normal case the following is the procedure for nfs mounting.

Go to NFS server, Edit /etc/exports file and add the filesystems which U want to export. If U want root access, U will have to mention access=root. Then

#exportfs -a

This will read /etc/export file once again and export the file systems.

Now U should be able to mount the remote file system from client. Follow ths

#mount nfs server:/file system /mountpoint

Automount can be configured thru sam or by editing /etc/auto.direct file.

This is useful when ur NFS server is coming up after the client comes up, In this case without a manual export U will be able to mount remote file system.

I hope I made it clear for U

Best of luck
Shahul
U.SivaKumar_2
Honored Contributor

Re: Automounter

Hi,
First try to mount that new nfs share through
mount command , and see any error is coming ?.

regards,
U.SivaKumar
Innovations are made when conventions are broken
SAM_24
Frequent Advisor

Re: Automounter

Hi,

Shahul - I am trying automount only. When hosts is map is enabled in /etc/auto_master and when system is starting automountd, whatever the systems specified in /etc/hosts file is considered as nfs server and it's exported file systems will be mounted.You can access those file systems by going to /net directory.Under /net mountpoint is hostname.

Example:
NFS server Automount client

/data is exported /net//data

When server exports another file system say /data2 the auto client is not seeing this change. After data2 export I should see like this

/data is exported /net//data
/data2 is exported /net//data2

I stopped and started both NFS server and Automount client or NFS client. It didn't help.

Sivakumar - Regular mount command is working fine.

If you guys have any test system you can try it.

Thanks.
Never quit
SAM_24
Frequent Advisor

Re: Automounter

Correction -

After /data2 is exported I should see

On server,

/data
/data2 two file systems are exported

On the client

/net//data
/data2

Thanks.
Never quit
SAM_24
Frequent Advisor

Re: Automounter

This editor is messing up things.

Under /net// you will see two directories:

data
data2

Thanks.
Never quit
S.K. Chan
Honored Contributor

Re: Automounter

Everything you mentioned in theory should work and I do not have an answer to your question. However I would like to recommend using indirect map for your automounter because it gives you flexibility down the road. For example in your case ...

/etc/auto_master
================
/nfs /etc/auto_indirect

/etc/auto_indirect
==================
data -nosuid serverA:/data
data2 -nosuid serverA:/data2

That way on the client side the automounter path would be /nfs/data and /nfs/data2. The good thing about this config is that you can add additional entries to "auto_indirect" that points to other server. And also you can add additional configuration/map to "auto_master", for example ..

/usersdir /etc/auto_users

and in /etc/auto_users you can put something like ..

jimb -nosuid serverX:/home/jimb
* serverW:/home/&

The point is it gives great flexibility and control.
Helen French
Honored Contributor

Re: Automounter

Some points:

1) AUTOMOUNT will mount exported file systems on request only. It *automatically* mounts a remote file system when a process/user request that mount. If it's not in use, it will *automatically* unmount the same after some time (this time can be specified either with command line or in /etc/rc.config.d/nfsconf)

2) It is not necessary that, whatever you exported on the server be mounted on the client at the time of system start. The file systems/directories will be mounted as and when required.

3) As an eg: in system A, you have an exported /data. While system B starts, the systemA:/data will be mounted on B, only if it is mentioned in the /etc/fstab file as an NFS file system. Otherwise you can mount it with mount command:

# mount systemA:/data /mount_dir

If it's mentioned as an automount directory, then it will be mounted when required. As an eg: this command will *automatically* mount the systemA:/data in /mount_dir:

# cd /mount_dir

4) The automount can be configured with these files - /etc/rc.config.d/nfsconf, /etc/auto_master and automount maps specifed in /etc/auto_master (say /etc/auto_home, /etc/auto_data etc)

5) This will give a better explanation:
# man automount
Life is a promise, fulfill it!