Solved

Automount

Posted on 1998-04-23
6
485 Views
Last Modified: 2010-04-22
Now I gave 2 machines. and I use to mount the 2'nd macinne
using moung -t machine2:/ /net
Now I wounder what amd is. How it works and how to set this up.
Does automount mean that i can do so I have /net unmounted but it get mounted when I cd to the directory /net and It unmount the directory by it self???
0
Comment
Question by:hulken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 2

Accepted Solution

by:
jaked earned 50 total points
ID: 1633641
amd will automatically mount an NFS partition when you try to access a file in a particular directory. It works pretty well.

Here's a generic config for automounting to /net:

/defaults fs:=${autodir}/${rhost}/root/${rfs};opts=nosuid,nodev
*       rhost:=${key};type:=host;rfs:=/

You want to start amd with "/net /etc/amd.conf" as arguments (assuming you have the above config in /etc/amd.conf).

With this setup, the pathname contains the hostname of the server you want to mount, and the name of the exported volume, such as

/net/ftp.kernel.org/home/ftp/pub

ftp.kernel.org is the server and /home/ftp/pub is the exported volume.

If you just want to mount a single machine and volume, try

kernel       type:=nfs;rhost:=ftp.kernel.org;rfs=:/home/ftp/pub

Alternatively, you could create another directory with symlinks, like kernel->/net/ftp.kernel.org/home/ftp/pub, for your frequently used volumes. This is kind of nice because you can just cd to the directory to mount the volume, instead of having to actually access a file.
0
 

Author Comment

by:hulken
ID: 1633642
I think I don't understand. But mabe it's because my english is so bad.
I run RedHat 5.0. and amd starts when I start my computer.
My /etc/amd.conf looks like this:

/defaults fs:=${autodir}/${rhost}/root/${rfs};opts=nosuid,nodev
*       rhost:=${key};type:=host;rfs:=/

Say that I like machine1.domain.se to mount / from machine2.domain.se under /net

What shall I edit???
If I understand you right I shall add
/net/machine2.domain.se/ somewhere is this right?
BTW. I like root on machine1 to have premission to write on machine2. How do I fix this?


0
 
LVL 2

Expert Comment

by:jaked
ID: 1633643
OK, if you already have amd set up, all you have to do is go to /net/machine2.domain.se and you should see the volume--you don't need to edit anything. Amd will mount the volume for you.

In order to map root on machine1 to root on machine2, you need to edit your /etc/exports and add no_root_squash to the options for the exported volume.

0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:hulken
ID: 1633644
Oh, thanks.. So it have been working all the time. It worked direct when I did a cd /net/machine2

I thougt I could get it to work like this:

if I did a cd /net
amd should mount machine 2 there. But mabe the best way to do this is with an alias.

I just wounder one thing more.
When I use amd. Do I nead to start the nfsfs on machine one???
Do I have to start nfs on machine one???
(/etc/rc.d/rc3.d/S60nfs and /etc/rc.d/rc3.d/S15nfsfs)
0
 
LVL 2

Expert Comment

by:jaked
ID: 1633645
No, you don't need those. The 'nfs' startup script starts nfsd, so you need it only on machine2. The 'nfsfs' script mounts all filesystems in your fstab with typ nfs, and since you're handling that through amd you don't need it either.

0
 

Author Comment

by:hulken
ID: 1633646
If you se this. I wounder one more thing. I have something  /etc/rc.d/init.d/autofs
What is this???
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question