1、你的OpenWrt必须已经支持USB和USB存储
2、将您的U盘或者USB硬盘连接到您的OpenWrt路由器,该设备及其分区可以正常识别到/dev(使用fdisk -l命令查看磁盘)

此图已经识别到1T的硬盘了
1、ntfs-3g

2、fdisk 可选择的使用热插拔脚本时自动检测文件系统类型所必需的。
安装好上面包就已经支持NTFS硬盘了,然而请注意,您只能将分区挂载到现有目录。您可以使用创建一个目录mkdir比如说
mkdir -p /mnt/usb 要手动挂载分区:/dev/sdb1代表一整块硬盘,/dev/sd1代表第一分区
ntfs-3g /dev/sdb1 /mnt/usb -o rw,big_writes 上面命令的意思就是把/dev/sdb1第一分区挂载到/mnt/usb目录
要在启动时(插入硬盘)自动挂载分区,请编辑/etc/rc.local:
sleep 1
ntfs-3g /dev/sdb1 /mnt/usb -o rw,lazytime,noatime,big_writes
exit 0 需要卸载:
执行下图命令
umount /dev/sdb1 为了让OpenWrt能够自动挂载它:
ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs 现在,您可以根据命令挂载卷了,下一步是在自动插入时挂载它。
为了让我们的驱动器挂载到插件上,我们利用热插拔系统。将以下文件创建为/etc/hotplug.d/block/10-mount
#!/bin/sh
# Copyright (C) 2011 OpenWrt.org
sleep 10 #more apps installed, need more time to load kernel modules!
blkdev=`dirname $DEVPATH`
if [ `basename $blkdev` != "block" ]; then
device=`basename $DEVPATH`
case "$ACTION" in
add)
mkdir -p /mnt/$device
# vfat & ntfs-3g check
if [ `which fdisk` ]; then
isntfs=`fdisk -l | grep $device | grep NTFS`
isvfat=`fdisk -l | grep $device | grep FAT`
isfuse=`lsmod | grep fuse`
isntfs3g=`which ntfs-3g`
else
isntfs=""
isvfat=""
fi
# mount with ntfs-3g if possible, else with default mount
if [ "$isntfs" -a "$isfuse" -a "$isntfs3g" ]; then
ntfs-3g /dev/$device /mnt/$device
elif [ "$isvfat" ]; then
mount -o iocharset=utf8 /dev/$device /mnt/$device
else
mount /dev/$device /mnt/$device
fi
;;
remove)
umount -l /dev/$device
;;
esac
fi NOW,每当你插入一个NTFS USB磁盘,它应该会自动安装。
挂载成功后的效果:

创建的/mnt/usb目录结构

硬盘的数据资料完全正常显示了
OPENWRT 网络文件共享设置

以下是是访问\\192.168.2.254(这是我OP的旁路由)


文件可以正常访问编辑。