Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
linux_wiki:auto_mount_network_shares [2016/01/04 23:19] billdozor [Install Required Packages] |
linux_wiki:auto_mount_network_shares [2018/03/20 23:50] billdozor [Direct Map Example] |
||
---|---|---|---|
Line 6: | Line 6: | ||
**Checklist** | **Checklist** | ||
- | * Enterprise Linux 6/7 | + | * Distro(s): |
- | * Network server with shared directory (NFS or CIFS) | + | * Other: |
---- | ---- | ||
Line 30: | Line 30: | ||
===== Map Files ===== | ===== Map Files ===== | ||
- | / | + | The master map file contains entries that point to other config files for specific mount instructions. |
+ | |||
+ | * EL6: / | ||
+ | * EL7: / | ||
+ | * In EL7, the "/ | ||
+ | |||
+ | \\ | ||
+ | Master Map File Contents | ||
* First column = name of the mount point on the local client system | * First column = name of the mount point on the local client system | ||
* Second column = config file that controls its mounting | * Second column = config file that controls its mounting | ||
Line 37: | Line 44: | ||
Example | Example | ||
<code bash> | <code bash> | ||
- | # File: / | + | # File: / |
- | /home /etc/auto.home --timeout=600 | + | # Direct mounts: look in auto.direct for mappings |
/- / | /- / | ||
+ | |||
+ | # Indirect mounts: look in auto.home for mappings of subdirectories of /home/ | ||
+ | /home / | ||
</ | </ | ||
- | * Direct Maps => Network file systems that are mounted from different servers | + | * Direct Maps => One or more full path mounts to one or more remote servers. This is similar to regular NFS mounts that you would see in /etc/fstab. |
* Above example: /- / | * Above example: /- / | ||
- | * Indirect Maps => Directories on the remote server that can all be mounted under the same local mount point. | + | * Indirect Maps => Directories on the remote server that can all be mounted under the same local mount point. |
* Above example: /home / | * Above example: /home / | ||
Line 52: | Line 62: | ||
==== Direct Map Example ==== | ==== Direct Map Example ==== | ||
- | **Note:** All direct map entries must be defined as "/ | + | **Note:** All direct map entries must be defined as "/ |
<code bash> | <code bash> | ||
# File: / | # File: / | ||
+ | # Reminder of master map contents for reference: | ||
+ | # / | ||
/ | / | ||
Line 74: | Line 86: | ||
<code bash> | <code bash> | ||
# File: / | # File: / | ||
+ | # Reminder of master map contents for reference: | ||
+ | # / | ||
+ | # Indirect mappings: sub directories of /home/ | ||
yoda 192.168.1.151:/ | yoda 192.168.1.151:/ | ||
luke 192.168.1.151:/ | luke 192.168.1.151:/ | ||
Line 92: | Line 107: | ||
* 192.168.1.151:/ | * 192.168.1.151:/ | ||
</ | </ | ||
- | | + | * " |
- | | + | * The "&" |
---- | ---- | ||
Line 99: | Line 114: | ||
===== Start and Enable ===== | ===== Start and Enable ===== | ||
- | Start Auto Mounter | + | Start and Enable |
- | * EL7<code bash> | + | * EL7<code bash> |
- | * EL6<code bash> | + | systemctl enable |
- | + | * EL6<code bash> | |
- | Enable Auto Mounter on boot | + | chkconfig autofs on</ |
- | * EL7<code bash> | + | |
- | * EL6<code bash>chkconfig autofs on</ | + | |
- | Reload Auto Mount Config (to enable changes) | + | Reload Auto Mount Config (to enable changes |
* EL7<code bash> | * EL7<code bash> | ||
* EL6<code bash> | * EL6<code bash> |