mirror of
https://github.com/DoTheEvo/selfhosted-apps-docker.git
synced 2026-07-03 14:06:40 +02:00
update
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
# Mounting Network Shares in Linux
|
||||
|
||||
possible ways to mount stuff - fstab, autofs, systemd, docker volumes if its for docker
|
||||
|
||||
possible types of shares
|
||||
|
||||
* smb/samba/cifs - the most common share, support on all OS
|
||||
* nfs - mostly used between linux machines, bit better performance
|
||||
* iSCSI - the share is mounted as a block device as if it was really a disk,
|
||||
great performance for small files
|
||||
|
||||
More on setup of these shares is in
|
||||
[TrueNAS Scale guide.](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/trueNASscale)
|
||||
|
||||
# smb/samba/cifs
|
||||
|
||||
[Arch wiki](https://wiki.archlinux.org/title/samba#As_systemd_unit)
|
||||
on samba systemd mount
|
||||
|
||||
* you will create two files in `/etc/systemd/system`
|
||||
* one will have extension `.mount` the other `.automount`
|
||||
* the name will be the same for both and it MUST correspond with the planned
|
||||
mount path. Slashes `/` being replaced by dashes `-`.<br>
|
||||
So if the share should be at `/mnt/mirror` the files are named
|
||||
`mnt-mirror.mount` and `mnt-mirror.automount`
|
||||
* copy paste the bellow content, edit as you see fit,
|
||||
changing description, ip address and path, user and password,..
|
||||
* linux command `id` will show your current user `uid` and `gid`
|
||||
* after ther changes execute command `sudo systemctl enable mnt-mirror.automount`
|
||||
This will setup mounting that does not fail on boot if there are network issues,
|
||||
and really mounts the target only on request
|
||||
|
||||
`mnt-mirror.mount`
|
||||
```ini
|
||||
[Unit]
|
||||
Description=3TB truenas mirror mount
|
||||
|
||||
[Mount]
|
||||
What=//10.0.19.11/Mirror
|
||||
Where=/mnt/mirror
|
||||
Type=cifs
|
||||
Options=rw,username=kopia,password=aaa,file_mode=0644,dir_mode=0755,uid=1000,gid=1000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
`mnt-mirror.automount`
|
||||
```ini
|
||||
[Unit]
|
||||
Description=3TB truenas mirror mount
|
||||
|
||||
[Automount]
|
||||
Where=/mnt/mirror
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
### Useful commants
|
||||
|
||||
`smbclient -L 10.0.19.11` - list shares mounted from the ip
|
||||
`systemctl list-units -t mount --all`
|
||||
@@ -66,7 +66,7 @@ lets put here also vlan stuff
|
||||
as you would need to deal with extra cables, extra interfaces, extra hardware..
|
||||
* **Tag based**<br>
|
||||
The real deal vlan. At layer2 a **vlan tag** is added to frames.
|
||||
It contains a **vlan ID** which is a number between 0 and 4095.
|
||||
It contains a **vlan ID** which is a number between 1 and 4094.
|
||||
These are used to create virtual networks that are separate
|
||||
from each other but share same hardware, same cables.<br>
|
||||
The standard is called **802.1Q**.
|
||||
@@ -79,8 +79,8 @@ Some aspects:
|
||||
when entering or leaving switch.
|
||||
* A tag is 4 bytes in size, contains [several pieces of info](https://i.imgur.com/86zeYgG.png),
|
||||
the most important being vlan ID.
|
||||
* **Vlan ID** (VID) is just a number between 0-4095, often picked as
|
||||
multiplies of ten - 10, 20, 30, 40, ... with the ip address of that VLAN
|
||||
* **Vlan ID** (VID) is just a number between 1-4094, often picked as
|
||||
multiplies of ten - 10, 20, 30, 40, ... with the ip address pool on that VLAN
|
||||
having it somewhere too.<br>
|
||||
Like vlan30 would be set as 192.168.30.0/24 or 10.30.30.0/24.
|
||||
* Tagged frames **get dropped** if they would arrive to a regular machine,
|
||||
|
||||
Reference in New Issue
Block a user