Solved

Automount

Posted on 1998-04-23
6
482 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
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu 16.04 AMD video card driver issues 20 328
Linux server cannot access samba share 12 90
Linux as a middle box 7 62
route 2 traffic streams on single NIC 6 35
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

911 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

20 Experts available now in Live!

Get 1:1 Help Now