Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Automount

Posted on 1998-04-23
6
Medium Priority
?
488 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 200 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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

715 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