AutoMounter 1.4.1 – Automatically mount network shares. February 23, 2017 AutoMounter is a sleek and powerful menu item for automatically mounting your network shares. I am using automount to mount a set of network shares on my macbook. My problem is that when these shares are not available, e.g. When I am out of the office using a different network, I cannot login to my mac. The login screen progress bar stays stuck forever (I've let it go well over 12 hours to test). Currently, my /etc/automaster looks like. Overview of automounting NFS and CIFS shares Mounting CIFS and NFS shares using the mount command, won’t survive a reboot. Luckily there are three different ways to auto-mount CIFS and NFS shares when the machine boots up: Announcement I have released my new course on Udemy, Kubernetes By Example. Sign up now to get free. AutoMounter 1.4 – Automatically mount network shares. February 12, 2017 AutoMounter is a sleek and powerful menu item for automatically mounting your network shares. I am not sure how I told AutoMounter that I want this network share that is on a NAS that no longer exists, but now I cannot find how to un-tell it because AutoMounter is attacking every 60 seconds. Console shows the proof: Share 'homes' started to mount with URL: afp://mlitwin@diaspora(AFP).afpovertcp.tcp.local/homes.
The Automounter is a service (consisting of automount/autofs), to mount file systems automatically. Mounting is performed when accessing the configured directories. Unmounting is performed by default after 5 sec. of inactivity (depending on the used image). On Dreamboxes the service is used to access network shares. The shares can be accessed over cifs and/or nfs.
After mounting the share it's possible to play supported movies, music and images. The network shares can be on Dreamboxes, Linux computers, Macs, NAS and Windows computers.
Advantage of the automounter: no scripts, editing of the fstab or boot settings are required.
Functionality Automounter
For the preamble Automount Mounter, two files are important, autofs and automount. Autofs defines the mount points using the auto.master file. Afterwards the mounting is performed by automount.
Goal of the article
Prerequisites
Configuring the Automounter
There are 3 ways to configure the automounter.
Configuration via Automount Editor
The Automount Editor is available in Enigma since Gemini Project 1.9 and in Enigma2 since Gemini Project 3.2 in the Blue Panel.
Example CIFS Mount
Example of a cifs mount.
The settings need to be changed according to your situation.
description of the settings
Name
Enter the name of the device (e.g. sound). The autofs daemon creates a directory with the selected name. The path of the directory is saved in the file auto.master. Read: Accessing the mount point.
Attention: if using multiple mounts, the name (mount point) should always be different.
Typ
selection of the protocol CIFS.
Parameter
Options for the mount.
Server
IP address of the source device.
Share
Enter the name of the shared directory. Attention, with Enigma2 there shouldn't be a / (Slash) entered at the beginning!
read / write buffer
The options rsize and wsize define the size of the data packages, which are exchanged by the client and server.
User
Enter the user name of for the access on the source device.
Password
Enter the password for the access on the source device.
Charset (utf8)
Sets the character encoding onto utf8, useful for special characters. Example NFS Mount
Example of a nfs mount.
The settings need to be changed according to your situation.
description of the settings
Name
Enter the name of the device (e.g. sound). The autofs daemon creates a directory with the selected name. The path of the directory is saved in the file auto.master. Read: Accessing the mount point.
Attention: if using multiple mounts, the name (mount point) should always be different.
Typ
selection of the protocol NFS.
Parameter
Options for the mount.
Server
IP address of the source device.
Share
Enter the name of the shared directory. Attention, with Enigma2 there shouldn't be a / (Slash) entered at the beginning!
read / write buffer
The options rsize and wsize define the size of the data packages, which are exchanged by the client and server. Accessing the mount point
The access of the created mount point depends on the Gemini version. The easiest way is to use the File Mode (Enigma), or the File Manager (Enigma2).
Configuration via configuration file
The configuration file of the automounter for CVS Boxes can be found in /var/etc and for OE Boxes in /etc (CVS/OE Boxes see here). Here you can find also the different files depending on the image version. The syntax remained the same.
Example CIFS mount
Example of a cifs mount.
The settings need to be changed according to your situation. description of the settings
Name
Enter the name of the device (e.g. sound). The autofs daemon creates a directory with the selected name. The path of the directory is saved in the file auto.master. Read: Accessing the mount point.
Attention: if using multiple mounts, the name (mount point) should always be different.
-fstype=
selection of the protocol CIFS.
rw,soft
Options for the mount.
user=user_name
Enter the user name of for the access on the source device.
pass=password
Enter the password for the access on the source device.
rsize=8192,wsize=8192
The options rsize and wsize define the size of the data packages, which are exchanged by the client and server. ![]()
iocharset=utf8
Sets the character encoding onto utf8, useful for special characters.
://192.168.1.10
IP address of the source device.
/sound
Enter the name of the shared directory. Attention, with Enigma2 there shouldn't be a / (Slash) entered at the beginning! Example NFS mount
Example of a nfs mount.
The settings need to be changed according to your situation. description of the settings
Name
Enter the name of the device (e.g. sound). The autofs daemon creates a directory with the selected name. The path of the directory is saved in the file auto.master. Read: Accessing the mount point.
Attention: if using multiple mounts, the name (mount point) should always be different.
-fstype=
selection of the protocol NFS.
rw,soft,tcp,nolock
Options for the mount.
rsize=8192,wsize=8192
The options rsize and wsize define the size of the data packages, which are exchanged by the client and server.
192.168.1.15:
IP address of the source device.
/video
Enter the name of the shared directory. Attention, with Enigma2 there shouldn't be a / (Slash) entered at the beginning! Accessing the mount point
The access of the created mount point depends on the Gemini version. The easiest way is to use the File Mode (Enigma), or the File Manager (Enigma2).
Interesting shell commands for the automounter
Examples for an Enigma2 based Dreambox up to OE 2.0Stop autofsStart autofsRestart autofsLoad the changed config fileStatus queryExamples for an Enigma2 based Dreambox since OE 2.2Stop autofsStart autofsShow status of autofs
Abgerufen von „http://wiki.blue-panel.com/index.php?title=Automount_(en)&oldid=18163“
English • 日本語
AutoFS is a program that uses the Linux kernel automounter to automatically mount filesystems on demand. It works with USB flash drives and external hard drives, network shares, CD-ROM/DVD/Blu-ray, and so on.
AutoFS works by monitoring directories on the local filesystem. Whenever a program tries to access one of those directories, AutoFS will mount something on that directory. The directories to monitor, as well as what to mount on them, are specified in the AutoFS configuration files such as /etc/autofs/autofs.master. Examples of how to configure AutoFS mounts are given down the page, under #Usage.
Installation
AutoFS requires a kernel module and a userspace program.
Note
To mount a filesystem (whether with AutoFS, or manually), the corresponding mount helper needs to be installed at the time of mounting. For example, sys-fs/ntfs3g or something equivalent is required to mount an NTFS filesystem. Some filesystems may also require changes to the kernel configuration. Check the wiki page for the specific filesystem to see what software and configuration will be required. Kernel configuration
The following kernel option activates the kernel functionality required for automounting.
Note
If the option is set to M, the partition that contains the module file must already be mounted before AutoFS can work. Userspace program
As with most Linux filesystems, in addition to the relevant option being enabled in the kernel, the userspace package must be installed to actually handle the mounting.
USE flags fornet-fs/autofsKernel based automounter
Data provided by the Gentoo Package Database · Last update: 2020-09-29 11:39 More information about USE flags
Install it with the following command:
ConfigurationService
The AutoFS daemon needs to be running for automounting to work.
OpenRC
Add AutoFS to the default runlevel:
To begin using the automounter before rebooting, start it manually:
Of course it is advisable to edit the configuration files first, as described below. If AutoFS is already running when the configuration is edited, run
to make it reload the configuration.
Files
The default installation of AutoFS provides the following four configuration files:
/etc/conf.d/autofs
/etc/conf.d/autofs is the configuration file that corresponds to the initscript /etc/init.d/autofs. For basic AutoFS usage, there is no need to modify this file.
The file defines two variables:
Note
automount may be given one non-option argument, the filename of the master map, but for most users the default value (auto.master ) is fine. If you do want to change the master map filename, setting the master_map_name configuration variable in /etc/autofs/autofs.conf is probably a better way to do it. The rest of this page assumes the master map filename has been left at the default value.
/etc/autofs/autofs.conf
/etc/autofs/autofs.conf is AutoFS's own configuration file. The default installation is well commented, and the options that can be specified in this file are also documented in the manual page, which can be viewed by running
For basic AutoFS usage, there is no need to modify this file.
/etc/autofs/auto.master
/etc/autofs/auto.master is the (default) 'master map'. Each line describes an AutoFS mount.
Important
AutoFS does not use the terms 'mount' and 'mount point' in quite the same way as /bin/mount or /etc/fstab.
Typically, the lines in this file take the following format:
In brief,
mount-point specifies a directory for AutoFS to watch, and map that tells AutoFS what to mount there. For details, see #Usage below, or view the manual page by running man 5 auto.master . Neither of these fields may contain spaces.
After handling the first two (whitespace-separated) fields as
mount-point and map respectively, anything else on the line is treated as an option to be passed to either AutoFS's automount (if it starts with a dash), or mount (if it does not). Options passed to mount will follow the -o switch. See #Usage for an example.
Note
The comments in auto.master say the format is key [ -mount-options-separated-by-comma ] location . As of version 5.1.2, that is wrong. That format applies to entries in map files, such as /etc/autofs/auto.misc.
/etc/autofs/auto.miscAutomatically Mount Network Drive Mac
/etc/autofs/auto.misc is an example of a 'map file'. Only those map files actually referenced in the master map file are actually used by AutoFS, so it is safe to rename or delete this file as long as you edit /etc/autofs/auto.master to match. You can also create additional map files following the same syntax. By convention, map files are named with the pattern /etc/autofs/auto.*.
Lines in this file take the following format:
Here
key specifies a unique key associated with the AutoFS mount, which forms part or all of the path at which the filesystem will be mounted. location tells AutoFS what filesystem to mount there. -options is a comma-separated list of options to pass to mount, except for some special options which are handled by AutoFS (such as fstype ). For details, see #Usage below, or view the manual page by running
Usage
AutoFS mounts are specified by lines in /etc/autofs/auto.master. As a reminder, lines in this file take the format
FILE
/etc/autofs/auto.master
Normally,
map is the full path to a map file, such as /etc/autofs/auto.misc, which contains lines of the format
Here the
location field takes the format host:path . The host component may be left empty to refer to a path on the local machine. Otherwise, the named path from the named remote host will be mounted using NFS.
-master-options and -map-options are parsed as described above:
There are two kinds of AutoFS mounts, direct and indirect.
Direct AutoFS mounts
For a direct AutoFS mount, the
mount-point is /- , and key in the map file is the full path at which the filesystem will be mounted. For example, the manual pages for AutoFS include an example like this:
FILE
/etc/autofs/auto.master
These lines tell AutoFS to watch the directory /tst/sbin. If a program tries to access anything in that directory, AutoFS will mount the directory
/usr/sbin from the remote host bogus on the local directory /tst/sbin . In other words, it will effectively execute the command
An example of mounting a local device might look like this:
FILE
/etc/autofs/auto.master
This will effectively execute the command
Indirect AutoFS mounts
For an indirect AutoFS mount, the
mount-point is a directory path, and map is the full path to a file which describes rules for mounting devices inside that directory. For example, the default installation includes the following line (though it is commented out):
FILE
/etc/autofs/auto.master
This line would tell AutoFS to watch files and directories under /misc for filesystem accesses. When a program tries to access something under /misc, AutoFS will use the configuration in /etc/autofs/auto.misc to determine whether to automatically mount something. Each (non-comment, non-empty) line in that file corresponds to something that AutoFS will be able to mount under /misc. For example, the line
tells AutoFS to watch /misc/cd. When a program tries to access this directory, AutoFS will effectively run the command
root # mount -t iso9660 -o ro,nosuid,nodev /dev/cdrom /misc/cd
Here are some other examples:
Indirect mounts allow AutoFS to use wildcards. For example, if users' home directories are stored on a different machine and mounted over NFS, AutoFS could be configured as follows:
FILE
/etc/autofs/auto.master
This way, when a user
foo logs in and accesses some files in their home directory, AutoFS will effectively run the command
root # mount -t nfs neighborhood:/export/home/foo /home/foo
Useful options
These options can be given in the master map file.
Mac Os Automatically Mount Network Drive
For a full description of options, run
Non-file maps
In /etc/autofs/auto.master, instead of merely specifying
map , the second column can take a more complicated form such as map-type:map , which allows the map to be something other than a file. For instance, it can be an executable which prints out map specifications (the lines that would be included in a map file), or any of various types of databases. For a full description of recognized types, run
Simple Windows-like Samba share mounting
Here is a way to automatically mount network Samba shares, as Windows does. This configuration allows automounting a share by issuing the following command in a shell:
or navigatint to /net/10.50.40.32/share in a filesystem browser or dialog. The files inside will appear as if they were located on the local machine.
Automounter 1 3 – Automatically Mount Network Shares Traded
Important
For this to work, Samba must be installed and configured prior to mounting. Automounter 1 3 – Automatically Mount Network Shares Outstanding
FILE
/etc/autofs/auto.smbm
External resources
Automounter 1 3 – Automatically Mount Network Shares Buy Or Sell
Retrieved from 'https://wiki.gentoo.org/index.php?title=AutoFS/en&oldid=754276'
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |