I have always been accustomed to using the NFS service that comes with Linux, but because the NFS space occupies a large amount of itself and does not have compression capabilities, I recently used the TrueNAS SCALE version, which is known as the most popular. What is important is that it can also provide block service Block (iSCSI) Shares Targets.
The installation and configuration of TrueNAS SCALE can be searched online. I will not elaborate on it here, just the key points and results.
1. Turn on SSH service
This can be configured in the WEB management interface, please open it:
Allow Password Authentication
2. Security configuration
Limit IP and users who can get NFS output list
root@truenas:~# cat /etc/hosts.{allow,deny}|grep -Pv "^#"
mountd: 192.168.10.108,192.168.10.68
rpcbind: 192.168.10.108,192.168.10.68:allow
mountd: ALL
rpcbind: ALL:deny
3. Space occupancy comparison
1. The same occupies compressed files
-rw-r--r-- 1 root root 55846318 October 24 10:22 mysqld_109.zip
-rw-r--r-- 1 root root 60230180 October 24 10:22 mysqld_110.zip
-rw-r--r-- 1 root root 70947308 October 23 18:52
[root@BC86]# du -sh *
54M mysqld_109.zip
58M mysqld_110.zip
68M
[root@node1]# du -sh *
51M mysqld_109.zip
58M mysqld_110.zip
68M
2. The usage of text files is huge
-rw-r---- 1 root root 1325298318 October 23 19:22
-rw-r---- 1 root root 1445393021 October 23 19:24
[root@BC86]# du -sh 1*
1.3G 109
1.4G 110
[root@node1]# du -sh 1*
120M 109
129M 110
It can be seen that TrueNAS has compressed this type of file by about 10%, which is amazing.