Auto Mount
Auto Mount
Auto Mount
I added nisplus to the automounts option in /etc/nsswitch.conf file and now I don't get the
RPC errors when starting/stopping autofs but I still can't cd to my directories.
Do I have to define everything in /etc/auto.master and do it that way and manually create
the directories on the client in RHEL 4? I was hoping the machine would automatically
get this information on the automount maps from my server which it seems to do
because when I do a ypcat -k auto.master I see all of my automount maps but I can't CD
to the locations it says no such file or directory.
I have an RHEL 3 machine where this does work and I don't have to put anything in
/etc/auto.master and I can cd to all of my logical locations no problem. Is this a change in
RHEL 4?
Dave.
Marq wrote:
Hi
To make auto mount work
first we have to configure to "/etc/auto.master"
It is like this
/autodir /etc/auto.misc
This means that the when we start the auto mount daemon it begins to monitor
the directory "/autodir"
second we have to create the directory on which we are going to mount and
that should be under the /autodir directory
third configure the "/etc/auto.misc" like this
/autodir/mountdir -rw,soft,intr
nfsserver:/nfsshare
then start the autofs daemon
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Relevant Pages
(13)
The Installation
On RPM based systems like Mandrake, Red Hat or SuSE installation - if it has not been
installed by default - is pretty simple: just install the autofs rpm using any of the package
managers. These distributions all ship autofs RPMs with their CDs, no need to go hunting
for it on the net. For Mandrake the quickest way to install autofs would be "urpmi autofs"
from a command line. And make sure to disable supermount as it might clash with autofs:
backup your fstab with "cp /etc/fstab /etc/fstab.supermount" and then issue a "supermount
-i disable" which will remove the supermount tags from the current fstab.
To actually set up the data, I do recommend that you do not add the removable-media
entries to the /etc/auto.net file - that would be misleading the user. Restrict
/etc/auto.net to hold disks shared on other computers or atleast disk partitions being
network centric and shared with other computers on your network. Instead, create a new
file called /etc/auto.vol since the term "vol" is the traditional unix-centric name of
what we are about to do - "vol" is short for "volume" and you might want remind yourself
of an analogy of a cd-changer with a dozen disk in the box but just one drive to actually
read one cd at a time. Likewise, the access path should start at "/vol" on your local system
and the "volumes" under that top-directory should be numbered - usually with a nameprefix telling the type of cd-changer or the computer holding the volumes. A traditional
name would say "cd-1" or "pc3-hdd".
In this example, I will use the dos-like names of our removable media called "/vol/a" and
"/vol/d" for the floppy and cdrom drive - this is in a way a numbering-scheme starting at
"a", passing "d" and "e" and going up to "z". Many linux distributions will start to setup a
scheme like "/mnt/floppy" but I guess you are fine with "/vol/a" too, and at the same time
this is a traditional unix way. Nice eh! :-)
okay, here is your new /etc/auto.master
# Sample auto.master file
# Format of this file:
Note that I did remove the "sample" /misc and /net mountpoints since my home pc does
not have a use for them. To let the timeout be passed right there in the /etc/auto.master
happens to be a relativly new feature with linux, many older distributions will require to
set a install-variable (e.g. suse 6.x) and in some cases you even have to modify the
init.d/autofs file.
Then (mkdir /vol ; chmod 775 /vol) to create the mountpoint on your disk - most
linux distribution do not have this old/common directory, they just have "/mnt" which is
used for some other taks too (e.g. the installation CDs might get mounted there) and so we
do not want to abuse it. Next we create the /etc/auto.vol file.
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
a
-fstype=auto,rw,sync,umask=002 :/dev/fd0
d
-fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
which assumes you already have a symlink /dev/cdrom pointing to your cdrom drive
(which might be actually /dev/hdb).
And basically, this is it, now you need to restart the autofs daemon using
(/etc/init.d/autofs stop ; /etc/init.d/autofs start) and you can start
accessing "/vol/a" and "/vol/d". Well, you could of course make a some new icons on your
KDE desktop - just rightlick on the background and click on "new URL", then enter an
URL as "file:/vol/a" and choose an icon represting a floppy. The next time that you click
on that icon, a file-manager will pop up with "/vol/a" in its view - which is the floppy disk
of course.
-ro,soft,intr
ftp.kernel.org:/pub/linux
-fstype=auto,rw,sync,umask=002 :/dev/fd0
-fstype=auto,rw,sync,umask=002 :/dev/hda1
-fstype=auto,rw,sync,umask=002 :/dev/hda5
-fstype=auto,rw,sync,umask=002 :/dev/hda6
-fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
-fstype=iso9660,ro,nosuid,nodev :/dev/scd0
# the following
#boot
#floppy
#e2floppy
#jaz
#removable
02
07
12
13
1
3
5
6
7
8
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
-fstype=auto
:/dev/hda2
:/dev/hda7
:/dev/hda12
:/dev/hda13
:/dev/hdd1
:/dev/hdd3
:/dev/hdd5
:/dev/hdd6
:/dev/hdd7
:/dev/hdd8