标签:服务端 service 使用 dev 指定 size deb 生效 filesyste
$ sudo apt-get install nfs-kernel-server nfs-common
/etc/exports
文件加上以下语句:
# 增加要共享的目录,以及共享给哪个ip(或网段), fsid不要相同
/var/log/bd_files/ 192.168.3.101/32(rw,no_root_squash,fsid=0)
/var/log/bd_output_cache/ 192.168.3.101/32(rw,no_root_squash,fsid=1)
参数解释:
192.168.1.0/24
rw
读写ro
只读sync
同步模式,将内存的数据实时写入磁盘async
不同步 ,将内存的数据定期写入磁盘all_squash
限制所有用户,排除后面设定的uid的用户root_squash
限制root用户no_root_squash
不限制root用户anonuid
用于指定使用NFS的用户限定后的uidanongid
用于指定使用NFS的用户限定后的gid$ sudo service nfs-kernel-server restart
root@debian:~# showmount -e
Export list for debian:
/var/log/bd_pcap_cache 192.168.1.101/32
/var/log/bd_input_cache 192.168.1.101/32
root@debian:~#
$ sudo apt-get install nfs-common
root@debian:~# showmount -e 192.168.3.102
Export list for 192.168.3.102:
/var/log/bd_output_cache 192.168.3.101/32
/var/log/bd_files 192.168.3.101/32
root@debian:~#
$ mount -o nolock,wsize=1024,rsize=1024 192.168.3.102:/var/log/bd_files /var/log/bd_files/
$ mount -o nolock,wsize=1024,rsize=1024 192.168.3.102:/var/log/bd_output_cache /var/log/bd_output_cache
root@debian:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 197G 28G 160G 15% /
udev 10M 0 10M 0% /dev
tmpfs 6.3G 17M 6.3G 1% /run
tmpfs 16G 992K 16G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sda3 591G 337M 561G 1% /var/lib/postgresql
tmpfs 4.0G 499M 3.6G 13% /var/log/bd_input_cache
tmpfs 2.0G 5.1M 2.0G 1% /var/log/bd_pcap_cache
tmpfs 1.0G 32K 1.0G 1% /var/log/bd_tmp_cache
192.168.3.102:/var/log/bd_files 213G 46G 157G 23% /var/log/bd_files
192.168.3.102:/var/log/bd_output_cache 1.0G 0 1.0G 0% /var/log/bd_output_cache
标签:服务端 service 使用 dev 指定 size deb 生效 filesyste
原文地址:https://www.cnblogs.com/yanhai307/p/10861459.html