No space left on device?

HI,

I added an usn drive to my router (netgear R7800) the usb drive has 60GB, and I upload a movie (2gb) on it with scp. Usualy I do that without any problem but this time, I try, I try, and after the upload is done, I see ''no space left''. The movie is in mnt/sda1 but only 2 minutes is there instead of 60 minutes. I don't know why this time it does not work and why the R7800 memories is full when I upload that on the usb drive.
?
thanks

Try use this external hdd as root:

https://openwrt.org/docs/guide-user/additional-software/extroot_configuration

1 Like

extroot would explicitly not be the way to go for adding a data partition meant for fileserver (or similar) uses.

The description suggests that your USB stick wasn't mounted or at least not mounted where you think it was, meaning the uploaded file probably ended up on the internal flash (~90 MB), instead of the USB stick. Revisit your blockd settings, check the output of mount and df -h, continue from there.

--
I do not recommend adding server tasks, including fileserver functionality, to your router, as this increases the attack surface on a device that should be as closed down as possible. But functionally, it works, it's still not a great idea.

2 Likes

The way to do this is to mount the data partition in a certain place such as /srv. Then store data only in subdirectories of this such as /srv/shared/movies. If the partition does not mount, /srv will still exist, but /srv/shared will not, so your filesharing software does not find the shared directory and will not allow any writing.

This prevents accidentally storing a movie to the root partition instead of the data partition.

4 Likes

It should be "/mnt/sda1", but only if you have mounted your drive there.

1 Like
root@OpenWrt:~# mount
/dev/root on /rom type squashfs (ro,relatime,errors=continue)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_1 on /overlay type ubifs (rw,noatime,assert=read-only,ubi=0,vol=1)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
bpffs on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
pstore on /sys/fs/pstore type pstore (rw,noatime)
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                18.0M     18.0M         0 100% /rom
tmpfs                   231.0M      5.7M    225.3M   2% /tmp
/dev/ubi0_1              65.3M      1.3M     60.6M   2% /overlay
overlayfs:/overlay       65.3M      1.3M     60.6M   2% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# 


also, it is the right place cause when I check in /mnt/sda1 the movie is there

At least right now, the USB drive is not mounted.

2 Likes

Seriously, I really don't know.why, I took my backup, my same setting as usual...
I don't know what to do cause usually it is mounted with that setting.
Thanks