Hello forum,
I try to mount a USB storage attached to my router. I would like to have access to the storage via sftp from other Linux-Clients. I have a working sftp server and I have added a user.
I can read from my Linux-Clients logged in as user (not root), but I can not write.
But I can read and write when I log in as root like (in Nautilus)
sftp://root@192.168.1.1/mnt/shareWhat I do:
root@OpenWrt:~# mount -t ext4 /dev/sda1 /mnt/share -o rw,sync
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /mnt/share type ext4 (rw,sync,relatime,data=ordered)
It mounts and I can read(write) from Linux client
The dir looks like this:
root@OpenWrt:~# cd /mnt/
root@OpenWrt:/mnt# ls -l
drwxr-xr-x 3 root root 4096 Feb 17 22:27 share
But it does not mount when I do
root@OpenWrt:~# block mount
block: /dev/mtdblock3 is already mounted
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)[nothing mounted at /mnt/share/] -> so it will not mount at boot time either, I presume.
My /etc/config/fstab looks like this:
config 'global'
option anon_swap '0'
option anon_mount '0'
option auto_swap '1'
option auto_mount '1'
option delay_root '5'
option check_fs '0'config 'mount'
option target '/mnt/share'
option uuid '0ab082bd-7b6a-4c04-9ccb-3afd8fe9afca'
option fstype 'ext4'
option enabled '0'
option options 'rw, sync'
option enabled '0'
option enable_fsck '0'
I have followed the instructions and examples here http://wiki.openwrt.org/doc/uci/fstab but I did not succeed
My question:
What do I have to do to get my USB hardrive mounted at boot time?
How do I have to configure fstab to have write access for users to the mounted storage?
Thanks for helping me over this problem and lots of regards
Ruuter
here some system informations:
Hostname OpenWrt
Model TP-Link TL-WDR4300 v1
Firmware Version OpenWrt Barrier Breaker 14.07 / LuCI Trunk (0.12+svn-r10530)
Kernel Version 3.10.49
(Last edited by ruuter on 18 Feb 2015, 21:27)
