ubuntu作为客户端,嵌入式设备作为服务端
1、ubuntu配置
1.1、client serices
1.2、防火墙配置
NFS端口为2049,如果没有允许可以关闭防火墙或执行sudo ufw allow nfs或sudo ufw allow 2049
2、嵌入式设备配置
2.1、kernel配置
配置kernel支持NFS(服务端和客户端,版本V2和V3),如果设备只作为客户端可以不用配置NFS server support
2.1.1、error: unknown field 'flush' specified in initializer
fs/nfsd/export.c:259:2: error: unknown field 'flush' specified in initializer
.flush = expkey_flush,
^
fs/nfsd/export.c:259:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.flush = expkey_flush,
^~~~~~~~~~~~
fs/nfsd/export.c:259:12: note: (near initialization for 'svc_expkey_cache_template.match')
cc1: some warnings being treated as errors
CC fs/nfsd/nfscache.o
make[2]: *** [scripts/Makefile.build:333:fs/nfsd/export.o] 错误 1
2.1.2、error: implicit declaration of function
fs/nfsd/filecache.c:520:18: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.handle_event = nfsd_file_fsnotify_handle_event,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfsd/filecache.c:520:18: note: (near initialization for