Files
notes/autofs_dnas.md
T
2022-05-07 22:12:11 +03:00

29 lines
974 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### Монтирование сетевых папок с помощью NFS
```bash
sudo apt install autofs
```
**Настройка**
Для настройки autofs в файле `/etc/auto.master` необходимо добавить строку
```
/nfs /etc/auto.nfs --timeout=60
```
Здесь --timeout=60 указывает отмонтировать раздел при отсутствии активности на нём более чем 60 секунд.
Создаем в корне файловой системы папку `/nfs` :
```bash
sudo touch /etc/auto.nfs && sudo mkdir /nfs
````
В файле `/etc/auto.nfs` добавляем строку
```
disk1 -rw,soft,intr,rsize=8192,wsize=8192 192.168.13.8:/mnt/disk1
disk2 -rw,soft,intr,rsize=8192,wsize=8192 192.168.13.8:/mnt/disk2
disk3 -rw,soft,intr,rsize=8192,wsize=8192 192.168.13.8:/mnt/disk3
```
Перезапускаем службу autofs :
```bash
sudo service autofs restart
```