Solved

Automount

Posted on 1998-04-23
6
481 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
  • 3
  • 3
6 Comments
 
LVL 2

Accepted Solution

by:
jaked earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:hulken
Comment Utility
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
Comment Utility
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
Comment Utility
If you se this. I wounder one more thing. I have something  /etc/rc.d/init.d/autofs
What is this???
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now