Toggle menu
Manjaro
Export translations
personal-extra
Toggle personal menu
Personal tools
English
Create account
Log in
Toggle search
Search
Random page
Export translations
Views
Language statistics
Message group statistics
Export
Actions
Namespaces
Translate
Variants
Tools
Printable version
Settings
Group
"What should I be aware of if I'm not on an LTS kernel?"
About Manjaro
Add a Storage Partition & Modify your System to Suit
Aliases in .bashrc
ALSA
Alternative way to install ManjaroISO
Amlogic TV boxes
Arch User Repository
Audio Players
Avidemux - Cutting out sections of video
Awesome Community Edition
Basic Submission Rules
Basic Tips for conky
BIOS and UEFI
Block Lists for Deluge & qBittorrent
Bmpanel2
Btrfs
Budgie
Build Manjaro ISOs with buildiso
Buildiso with AUR packages: Using buildpkg
Burn an ISO File
Change to a Different Download Server
CheatSheet
Check a Downloaded ISO Image For Errors
ClamAV
Configure Graphics Cards
Configure NVIDIA (non-free) settings and load them on Startup
Contributing
Create Manjaro Packages
Deepin
Desktop Environments and Window Managers
Developer Tools
Did X.server recognise your monitor correctly?
Display Managers / Login Screens
Displaymanager / Loginmanager
DMenu
Dolphin
Downgrading packages
Download Manjaro
Enable Touchpad Horizontal and Vertical Scrolling
Encfs
File Systems
Firejail
Firewalls
Firewalls and Security
Flatpak
Forum Rules
Fstab
Fstab - Use SystemD automount
GNOME
Graphical Software Managers
GRUB/Restore the GRUB Bootloader
How to mount Windows (NTFS) filesystem due to hibernation
How-to verify GPG key of official .ISO images
Important hidden .dot files in your home partition
Improve Font Rendering
Install Desktop Environments
Install Display Managers
Installation Guides
Installation with Manjaro Architect
Internet Browsers
KDE
Kernel Fails to Load (pata acpi error)
Keyboard and Mouse Sharing
Keyboard Shortcuts
Kvantum
Limit the size of .log files & the journal
Linux Security
List of Qt Applications
Locale
LXDM Configuration
LXQt
LXQt with kwin
Main Page
Make GRUB menu & boot-up/down fonts bigger
Makepkg
Manjaro
Manjaro FAQ
Manjaro Forums
Manjaro Hardware Detection
Manjaro Hardware Detection Overview
Manjaro IRC
Manjaro Kernels
Manjaro Mirrors
Manjaro Online
Manjaro Packaging Standards
Manjaro Polkit Rules
Manjaro Settings Manager
Manjaro-ARM
Manjaro-tools
Manjaro:A Different Kind of Beast
ManjaroISO
Mounting disk images
Mozilla Firefox
Mplayer
Networking
Octopi
Openbox
Pacman
Pacman Overview
Pacman troubleshooting
Pacman-mirrors
Page Translation
Pamac
Partitioning Overview and Existing Partition Tables
PCmanFM-Qt
PKGBUILD
Plymouth
Power Management
Preserve Manjaro Bootloader
Printing
Proper ~/.xinitrc File
Reactivating the Backlight
Repositories and Servers
Set all Java apps to use GTK+ font & theme settings
Set all Qt app's to use GTK+ font & theme settings
Setup Kmail & Davmail to connect to an Exchange server
Sharing files with Python
Snap
Software Applications
Some basics of MBR v/s GPT and BIOS v/s UEFI
Spotify
Swap
Switching Branches
Sync dynamic IP with openDNS service via ddclient
System Maintenance
Systemd-boot
TeamViewer
The Rolling Release Development Model
UEFI - Install Guide
Undervolt intel CPU
Using autofs (automount) with NFS
Using Compton for a tear-free experience in Xfce
Using Manjaro for Beginners
Using Manjaro for Windows users
Using Samba in your File Manager
Various screen tearing fixes
VCS PKGBUILD Guidelines
Viewing and editing configuration files
Virt-manager
VirtualBox
Vivaldi Browser
VMware
Wacom Tablet And Pen
Western Digital Green - Drive Fix - Linux
Wiki tweak page
Worker - An Introduction
Workflow states
Language
aa - Afar
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
ak - Akan
aln - Gheg Albanian
alt - Southern Altai
am - Amharic
ami - Amis
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
ban-bali - ᬩᬲᬩᬮᬶ
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bcl - Central Bikol
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bg - Bulgarian
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Turkish
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - español (formal)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Gan (Simplified)
gan-hant - Gan (Traditional)
gcr - Guianan Creole
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
grc - Ancient Greek
gsw - Swiss German
gu - Gujarati
guc - Wayuu
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hu-formal - magyar (formal)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kcg - Tyap
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjp - Eastern Pwo
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lld - Ladin
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mad - Madurese
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mni - Manipuri
mnw - Mon
mo - Moldovan
mr - Marathi
mrh - Mara
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Muscogee
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Min Nan Chinese
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
nia - Nias
niu - Niuean
nl - Dutch
nl-informal - Nederlands (informeel)
nn - Norwegian Nynorsk
no - Norwegian
nov - Novial
nqo - N’Ko
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nys - Nyungar
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Vlax Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy - Shawiya
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
smn - Inari Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - себертатар
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
szy - Sakizaya
ta - Tamil
tay - Tayal
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tly-cyrl - толыши
tn - Tswana
to - Tongan
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
trv - Taroko
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - Saisiyat
yi - Yiddish
yo - Yoruba
yue - Cantonese
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
qqq - Message documentation
Format
Export for off-line translation
Export in native format
Fetch
<languages/> __TOC__ <div lang="en" dir="ltr" class="mw-content-ltr"> =Autofs – Automount (en)= </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [[File:Manjaro-logo.png|left]] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> <br clear="all"/> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Autofs= Autofs is a program which makes it possible to mount external devices on demand. Other ways of mounting can be done with the use of a manual command for a temporary mount, or by using the /etc/fstab file if you want to mount a device permanently. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Autofs can be used to mount: *USB-flash-disks *external hard disks *network attached storage devices *CD-ROM / DVD / BlueRay and so on. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Autofs mounts these devices in local folders. When you want, or a program you use wants, to read from or write to the device, autofs will do that in those local folders. When you work a lot with mounted systems you will love the way this is done. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Some people believe that since autofs is not maintained heavily it won’t exist much longer, but think about this: why do you need to maintain a program which already does what it is supposed to do? </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Another way of mounting on the fly is described on this wiki page: [[Fstab_-_Use_SystemD_automount|Fstab - Use SystemD automount]] </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Installation= At the time of writing, the autofs version number was 5.1.3-1. It can be installed from the standard Manjaro repositories using Octopi, Pamac or Pacman. When you want to use autofs with nfs you need one extra package and that is nfs-utils. So, install that as well. The description calls it: ''support programs for the network filesystem'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Testing the mounts= Before you will install and setup autofs it is a good thing to test if you can mount the device you want to mount. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Let’s find out first what you can mount. The nfs-utils package has a nice command for that: showmount: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''showmount -e 192.168.1.9''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When the device is on the output will be something like: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''Export list for 192.168.1.9:''' '''/HDD1 *''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> There is a disk called HDD1 in the device on address 192.168.1.9. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Remark: ''You do need to know the IP-address of the device to use showmount.'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Now let’s mount it to our local folder /mnt: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ‘’’sudo mount -t nfs 192.168.1.9:/HDD1 /mnt’’’ </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Type ‘ls /mnt’ to find out what is on the disk you just mounted. When you see contents the mount has succeeded and we can now continue with the configuration of autofs. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Terminal commands= Commands you can use are: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl enable autofs''' ''Command to enable autofs so it can be started either manually or at next boot'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl start autofs''' ''Command to manually start autofs'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl restart autofs''' ''Command to manually restart autofs'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl stop autofs''' ''Command to manually stop autofs'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl status autofs''' ''Command to read the status of autofs'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When autofs is running this is the output of the status command: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl status autofs''' ● autofs.service - Automounts filesystems on demand Loaded: loaded (/usr/lib/systemd/system/autofs.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2017-12-02 07:13:22 CET; 1h 9min ago Process: 1069 ExecStart=/usr/bin/automount $OPTIONS --pid-file /run/autofs.pid (code=exited, status=0/SUCCESS) Main PID: 1089 (automount) Tasks: 5 (limit: 4915) CGroup: /system.slice/autofs.service └─1089 /usr/bin/automount --pid-file /run/autofs.pid Dec 02 07:13:22 Desktop-Jan systemd[1]: Starting Automounts filesystems on demand... Dec 02 07:13:22 Desktop-Jan automount[1089]: - Dec 02 07:13:22 Desktop-Jan systemd[1]: Started Automounts filesystems on demand. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> After a stop it looks like this: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl status autofs''' ● autofs.service - Automounts filesystems on demand Loaded: loaded (/usr/lib/systemd/system/autofs.service; enabled; vendor preset: disabled) Active: inactive (dead) since Sat 2017-12-02 08:27:27 CET; 1s ago Process: 1069 ExecStart=/usr/bin/automount $OPTIONS --pid-file /run/autofs.pid (code=exited, status=0/SUCCESS) Main PID: 1089 (code=exited, status=0/SUCCESS) Dec 02 07:13:22 Desktop-Jan systemd[1]: Starting Automounts filesystems on demand... Dec 02 07:13:22 Desktop-Jan automount[1089]: - Dec 02 07:13:22 Desktop-Jan systemd[1]: Started Automounts filesystems on demand. Dec 02 08:27:26 Desktop-Jan systemd[1]: Stopping Automounts filesystems on demand... Dec 02 08:27:27 Desktop-Jan systemd[1]: Stopped Automounts filesystems on demand. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Configuration= After installation we need to configure a few files specific to what we need and want. These files are placed in the folder: '''/etc/autofs'''. In fact there are 2 files needed: auto.master and auto.<any name you like>. Since /etc/autofs is a folder owned by root you need root privileges to write and/or edit them. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> In auto.master we write: * the base folder where mounts are connected to the local filesystem * the name of the file in which the mount can be configured * a timeout value (time after which the mount is automatically unmounted when not needed anymore) * ghost, an option which places empty folders in the base folder to make it possible, after the time-out, to mount the device again. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> A typical line in the auto.master file can look like this: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''/mnt /etc/autofs/auto.NAS1 --timeout=10 --ghost''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When you have more than one external device you want to mount using autofs you can do 2 things: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * write an extra line in the auto.master file for each device. For example: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''/mnt /etc/autofs/auto.NAS1 --timeout=10 --ghost''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''/mnt /etc/autofs/auto.NAS2 --timeout=10 --ghost''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> and create extra config files for each device, or </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * use 1 line in the auto.master file using 1 config file for all devices and write more than 1 line in this config file. This is totally up to you. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> I use this: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ''/etc/autofs/auto.master:'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''/mnt /etc/autofs/auto.shares --time-out=5 --ghost''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ''/etc/autofs/auto.shares:'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''NAS-Seagate -fstype=nfs,rw,soft,retry=0 Seagate:/shares/Folder1''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''NAS-WD -fstype=nfs,rw,soft,retry=0 WD:/nfs/Public''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This way I have one master file which, with one line, controls the base of the system and one file which controls all my shares. But again, this is totally up to you. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Explanation of auto.master= This file is created when you install the autofs package. You will need to edit it to make it work for you. The complete file looks like this when created: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> # key [ -mount-options-separated-by-comma ] location # For details of the format look at autofs(5). # #/misc /etc/auto.misc # # NOTE: mounts done from a hosts map will be mounted with the # "nosuid" and "nodev" options unless the "suid" and "dev" # options are explicitly given. # #/net -hosts # # Include central master map if it can be found using # nsswitch sources. # # Note that if there are entries for /net or /misc (as # above) in the included master map any keys that are the # same will not be seen as the first read key seen takes # precedence. # #/net -hosts -nosuid +auto.master </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Add your line or lines just before the last visible line: +auto.master </div> <div lang="en" dir="ltr" class="mw-content-ltr"> After that line an empty line should exist or the configuration will not succeed, so place the cursor after +auto.master and click on ENTER. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Format of the line you add: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ''base-folder name_of_share_file options''. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> In my example this is: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''/mnt /etc/autofs/auto.shares --time-out=5 --ghost''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''''NOTE: Make sure the used filename in the auto.master file should be exactly the same as the name of the file you use, including the path.''''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The base folder can be /. In this case it is written as: /- You use direct addressing now. The address you write in the shares file (see next paragraph) becomes the complete address. When you write the name of a folder in the master file you use indirect addressing: the complete path is now the sum of the path in the master file + the one in the shares file. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Explanation of auto.shares= This file can have any extention name you like. Make it a descriptive one to easily find it, especially when you use more than one. The line or lines in this file are all built according to this template: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ''name_of_sub-folder options source'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> (separated with at least one space) </div> <div lang="en" dir="ltr" class="mw-content-ltr"> After mounting the external device can be found in the following directory structure: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''/base-folder/sub-folder''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> You define the base folder in the auto.master file (first item in the line) and the sub-folder is defined in the auto.xxxx file (also first item on the line) </div> <div lang="en" dir="ltr" class="mw-content-ltr"> My shares are mounted at: /mnt/NAS-WD and /mnt/NAS-Seagate. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> /mnt is the base-folder (from auto.master) and both NAS folders are written in the shares file. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Options you can use are plenty. See the man pages for autofs, automount and nfs. The ones I used here work for me. They take care of the following: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> *'''-fstype=nfs''' The used filesystem is nfs (Network File System), a file-system used much in Linux environments. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> *'''rw''' The mount is readable and writable. If you only need read access then use ro (read only) </div> <div lang="en" dir="ltr" class="mw-content-ltr"> *'''soft''' If the server fails an I/O error is given, but the file-manager keeps running. When you use hard instead of soft, it hangs till the connection has been re-established. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> *'''retry=0''' This makes sure that mount stops immediately when the server is not reachable. If not, mount will keep trying for 2 minutes to reach the server and block the program which wants to reach the server. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> =Remarks= </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * It is said that when you make a change in the shares file, the change will be active straight away. When changing the master file you need to restart the autofs.service like this: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''sudo systemctl restart autofs''' ''It is advisable to also restart after changing the shares file, just to be sure.'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * The permissions of both the master and the share file(s) should be 644. That means Read/Write permission for user, Read for group and Read for others. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * Test if the system works. First example is the result when nothing is mounted, in the second example you see the result when the NAS-WD is mounted: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ /etc/autofs > '''sudo ps -A|grep "nfs\|rpc"''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> 240 ? 00:00:00 rpcbind 23222 ? 00:00:00 rpciod 23227 ? 00:00:00 nfsiod $ /etc/autofs > '''cd /mnt/NAS-WD''' ''Change directory to the mount'' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> $ /mnt/NAS-WD > '''sudo ps -A|grep "nfs\|rpc"''' </div> <div lang="en" dir="ltr" class="mw-content-ltr"> 240 ? 00:00:00 rpcbind 23222 ? 00:00:00 rpciod 23227 ? 00:00:00 nfsiod 29106 ? 00:00:00 rpc.statd </div> <div lang="en" dir="ltr" class="mw-content-ltr"> There are many webpages about autofs, with and without nfs. Just google it and you will find many different ways of setting it up. The way described here works for me and is pretty easy to setup. </div> [[Category:Contents Page{{#translation:}}]]
Cookies help us deliver our services. By using our services, you agree to our use of cookies.
OK