Finished editing
parent
6798fea97a
commit
cfde3c6592
53
README.md
53
README.md
|
@ -1,3 +1,56 @@
|
||||||
# synology-nfs-mount-tools
|
# synology-nfs-mount-tools
|
||||||
|
|
||||||
This is a repo that contains tools/documentations to help nfs mounting configuration in Synology
|
This is a repo that contains tools/documentations to help nfs mounting configuration in Synology
|
||||||
|
|
||||||
|
## How to config Synology for NFS
|
||||||
|
|
||||||
|
Synology's DSM WebGUI has capability to set NFS configuration to allow Linux to access files on Synology NAS, follow [tutorial: How to access files on Synology NAS within the local network (NFS)](https://www.synology.com/en-us/knowledgebase/DSM/tutorial/File_Sharing/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS)
|
||||||
|
|
||||||
|
But the GUI's feature is limited. We need more fine tuning. Following [NFS: Overview and Gotchas](http://www.troubleshooters.com/linux/nfs.htm), we can set Synology properly. (If the URL is broken, we can refer to [NFS: Overview and Gotchas in repo](/source/NFS_Overview/NFS\ Overview\ and\ Gotchas.htm)
|
||||||
|
|
||||||
|
### Summary of how to configure NFS server
|
||||||
|
|
||||||
|
Configuring an NFS server is just placing a line in `/etc/exports` file. The line's general syntax is:
|
||||||
|
|
||||||
|
```
|
||||||
|
directory_being_shared subnet_allowed_to_access(options)
|
||||||
|
```
|
||||||
|
|
||||||
|
There are 2 kinds of options:
|
||||||
|
|
||||||
|
* General options (ignored here)
|
||||||
|
* User ID Mapping options (need to be mentioned here)
|
||||||
|
|
||||||
|
We want to make directories accessible as if the incoming request was from that user or that group, which is done by combining `all_squash` option with `anonuid` and `anongid` options.
|
||||||
|
|
||||||
|
e.g.
|
||||||
|
|
||||||
|
```
|
||||||
|
/volume1/homes 192.168.1.85(rw,sync,no_wdelay,crossmnt,all_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)
|
||||||
|
```
|
||||||
|
|
||||||
|
where:
|
||||||
|
|
||||||
|
* `/volume1/homes` is the directory to be shared
|
||||||
|
* `192.168.1.85` is the ip address of client
|
||||||
|
* `rw` is Read/Write
|
||||||
|
* `async` is for fast access. `sync` is for safer access
|
||||||
|
* `no_wdelay` is "Write disk as soon as possible"
|
||||||
|
* `anonuid=1025` is uid of "guest"
|
||||||
|
* `anongid=100` is gid of "guest/user"
|
||||||
|
|
||||||
|
### Summary of how to configure client
|
||||||
|
|
||||||
|
```
|
||||||
|
mount -t nfs -o rw 192.168.100.85:/data/altamonte /mnt/test
|
||||||
|
```
|
||||||
|
|
||||||
|
## Current solution
|
||||||
|
|
||||||
|
Due to limitation of NFS4.0, idmapping is too hard (mismatch between server and client's uid/gid), and kerberos authentication is too hard to setup. The only solution is NFS+`chown`
|
||||||
|
|
||||||
|
1. Setup NFS permission of shared folder on Synology
|
||||||
|
2. mount volume to client
|
||||||
|
3. When writing files, remember to chown afterward
|
||||||
|
|
||||||
|
For plex server, I need to align LXC's uid and gid with Synology
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,4 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html><head>
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8"><title>VimVixen console</title><script src="console_data/console.js"></script><style>html,body,*{margin:0;padding:0}body{position:absolute;bottom:0;left:0;right:0;overflow:hidden}.vimvixen-console{bottom:0;margin:0;padding:0}.vimvixen-console-command-wrapper{border-top:1px solid gray}.vimvixen-console-completion{background-color:white;font-style:normal;font-family:monospace;font-size:12px;line-height:16px}.vimvixen-console-completion-title{background-color:lightgray;font-weight:bold;margin:0;padding:0}.vimvixen-console-completion-item{padding-left:1.5rem;background-position:0 center;background-size:contain;background-repeat:no-repeat;white-space:pre}.vimvixen-console-completion-item.vimvixen-completion-selected{background-color:yellow}.vimvixen-console-completion-item-caption{display:inline-block;width:40%;text-overflow:ellipsis;overflow:hidden}.vimvixen-console-completion-item-url{display:inline-block;color:green;width:60%;text-overflow:ellipsis;overflow:hidden}.vimvixen-console-message{font-style:normal;font-family:monospace;font-size:12px;line-height:16px;border-top:1px solid gray}.vimvixen-console-error{background-color:red;font-weight:bold;color:white}.vimvixen-console-info{background-color:white;font-weight:normal;color:green}.vimvixen-console-command{background-color:white;display:flex}.vimvixen-console-command-prompt{font-style:normal;font-family:monospace;font-size:12px;line-height:16px}.vimvixen-console-command-input{border:none;flex-grow:1;font-style:normal;font-family:monospace;font-size:12px;line-height:16px}
|
||||||
|
</style></head><body><div id="vimvixen-console" class="vimvixen-console"></div></body></html>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,24 @@
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
div.centerer{text-align: center;}
|
||||||
|
|
||||||
|
div.monthfea{
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
text-align: center;
|
||||||
|
border-width: 6px;
|
||||||
|
border-style: ridge;
|
||||||
|
margin-top: 3.0ex;
|
||||||
|
margin-bottom: 2ex;
|
||||||
|
padding-top: 0.2ex;
|
||||||
|
padding-bottom: 0.0ex;
|
||||||
|
background-color: #ffffcc;
|
||||||
|
max-width: 700px;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.monthfea>p.monthfea{color: #000000; margin-top: 0ex; margin-bottom: 0.7ex;}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!-- //HIDE FROM NON-JAVASCRIPT BROWSERS
|
||||||
|
|
||||||
|
function loaddiv()
|
||||||
|
{
|
||||||
|
elm = document.getElementById('monthfea');
|
||||||
|
line1='<p class="monthfea">May 2020 featured book:</p>';
|
||||||
|
line2='<p class="monthfea"><a href=" http://www.troubleshooters.com/bookstore/ttech.htm">Troubleshooting Techniques of the successful technologist</a></p>';
|
||||||
|
|
||||||
|
elm.innerHTML=line1+line2;
|
||||||
|
}
|
||||||
|
//-->
|
Loading…
Reference in New Issue