Files
Ubuntu/04_CHEATSHEET_MOUNT_SERVICE.md

50 lines
1.1 KiB
Markdown
Raw Permalink 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.
### Компактный режим
``` bash
sudo mount-service <service>
```
Пример:
``` bash
sudo mount-service wireguard
```
Будет смонтировано:
```
/srv/wireguard/config
/srv/wireguard/data
```
---
## Универсальный режим
``` bash
sudo mount-service --name <service> --ip <nfs_server_ip> --base_dir <local_base_dir> --config_path <absolute_path_on_nfs> --data_path <absolute_path_on_nfs>
```
Пример:
``` bash
sudo mount-service --name python-wiki-site --ip 192.168.1.128 --base_dir /srv --config_path /mnt/MainPool/apps/config/misc_projects/python-wiki-site --data_path /mnt/MainPool/apps/data/misc_projects/python-wiki-site
```
---
## Просмотр плана
``` bash
mount-service --name <service> --config_path <path> --data_path <path> --plan
```
Выведет команды:
mkdir -p ...
mount -t nfs4 ...
printf ... >> /etc/fstab
⚠️ В режиме `--plan` команды не исполняются, а лишь выводятся для просмотра.
---