开始在Linux板子之间验证sshfs挂载,openwrt系统作为客户端,纯Linux系统(hi3521)作为服务端,下面开始在openwrt系统中搭建sshfs服务。
查看内核支持的文件系统
root@WV-200:~# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev tmpfs
nodev bdev
nodev proc
nodev cpuset
nodev cgroup
nodev cgroup2
nodev configfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev ramfs
nodev hugetlbfs
nodev rpc_pipefs
nodev devpts
ext3
ext2
ext4
squashfs
vfat
nodev nfsd
nodev jffs2
nodev autofs
nodev overlay
nodev pstore
nodev mqueue
可见还不支持fuse文件系统,需要在内核中添加编译支持。
编译支持sshfs
# Filesystem
#
# CONFIG_PACKAGE_cifsd-tools is not set
# CONFIG_PACKAGE_davfs2 is not set
# CONFIG_PACKAGE_netatalk is not set
# CONFIG_PACKAGE_nfs-kernel-server is not set
# CONFIG_PACKAGE_owftpd is not set
# CONFIG_PACKAGE_owhttpd is not set
# CONFIG_PACKAGE_owserver is not set
CONFIG_PACKAGE_sshfs=m
依赖关系
Selects: PACKAGE_librt [=y] && PACKAGE_libc [=y] && PACKAGE_fuse-utils [=m] && PACKAGE_libfuse [=m] && PACKAGE_libpthread [=y] && PACKAGE_libpthread [=y] && PACKAGE_libssp [=n] && PACKAGE_glib2 [=m]
需要安装的IPK文件和顺序如下
opkg install kmod-fuse_4.14.98-1_aarch64_cortex-a53_neon.ipk
opkg install libfuse1_2.9.7-2_aarch64_cortex-a53_neon.ipk
opkg install fuse-utils_2.9.7-2_aarch64_cortex-a53_neon.ipk
opkg install libattr_2.4.48-2_aarch64_cortex-a53_neon.ipk
opkg install libffi_3.2.1-3_aarch64_cortex-a53_neon.ipk
opkg install glib2_2.58.3-3_aarch64_cortex-a53_neon.ipk
opkg install sshfs_2.10-1_aarch64_cortex-a53_neon.ipk
查看安装后的文件系统信息
root@WV-200:/tmp# cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev tmpfs
nodev bdev
nodev proc
nodev cpuset
nodev cgroup
nodev cgroup2
nodev configfs
nodev debugfs
nodev sockfs
nodev pipefs
nodev ramfs
nodev hugetlbfs
nodev devpts
ext3
ext2
ext4
squashfs
vfat
nodev jffs2
nodev autofs
nodev overlay
nodev pstore
nodev mqueue
fuseblk 【fuse安装成功】
nodev fuse
nodev fusectl
查看版本
root@WV-200:/tmp# sshfs --version
SSHFS version 2.10
FUSE library version: 2.9.7
fusermount version: 2.9.7
using FUSE kernel interface version 7.19
到这儿就在openwrt系统中支持了sshfs,就具备了客户端的条件,下面接着在纯Linux系统中安装sshfs服务端。