if /dev/sd" >/etc/autofs/auto.mntĪutoFS provides automatically discovering and mounting NFS-shares on remote servers (the AutoFS network template in /etc/autofs/ has been removed in autofs5). Removable devices are assigned block device locations according to the next available spot, e.g. When you are done configuring your templates (see below), launch the AutoFS daemon as root by enabling and starting the rvice.ĭevices are now automatically mounted when they are accessed, they will remain mounted as long as you access them. Open the file /etc/nf and add an entry for automount: To mitigate this, only use if you will always be connected to the share, and do not use your home folder or other commonly used folders lest your file browser reads ahead into the disconnected folder When trying to access the folder, programs will get locked into waiting for a response, and either the connection has to be restored or the process has to be forcibly killed before unmounting is possible. Note: This can cause problems with resources getting locked if the connection to the share is lost. home/user/usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sdb1 etc/autofs/auto.master /- /etc/autofs/auto.template /etc/autofs/auto.template /path/to/folder -options :/device/path # ln -s /var/autofs/net/share_name /media/share_nameĪlternatively, you can have autofs mount your media to a specific folder, rather than inside a common folder. If you still want to automount to a target non-empty directory and want to have the original files available even after the dynamically loaded directories are mounted, you can use autofs to mount them to another directory (e.g. This procedure is however non-destructive, so if you accidentally automount into a live directory you can just change the location in auto.master and restart AutoFS to regain the original contents. The base directory will be mounted on to load the dynamically loaded media, which means any content in the base directory will not be accessible while autofs is on. The base directory will be created if it does not exist on your system. Setting this value to 0 will disable the timeout. Tip: The optional parameter timeout sets the amount of seconds after which to unmount directories.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |