OpenWrt Forum Archive

Topic: mr3020 - USB stick + Samba as share problem

The content of this topic has been archived on 6 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello everyone!
I have set up with tp-link mr3020 with chaos calmer and custom firmware.
There is basic support for usb drives and samba installed. Samba share works, but i can`t send any file to share with size greater than ~100 kb. In this case my USB stick (/dev/sda/) disconnects and connects as /dev/sdb/ , so samba share stop works(share set up for /dev/sda/). After router reboot all becomes all right...

There some info about mounted usb device settings:
2 partitions - sda1 (128 mb swap) and sda2 (1.6 GB, for share,ext4)
sda2 mounted to /mnt/share/
Access to share via password for non-root user.

Could anyone help me with this issue?

Anything interesting in the kernel logs regarding this disconnection and reconnection? Or just a line saying the device was disconnected and reconnected? Perhaps there's something in Samba's own logs? Or in the system log?

Antek wrote:

Anything interesting in the kernel logs regarding this disconnection and reconnection? Or just a line saying the device was disconnected and reconnected? Perhaps there's something in Samba's own logs? Or in the system log?

I think about it. I try to find any samba or kernel logs, but unsuccessfully. Google tells me that samba logs must be in  /var/logs/samba, but "samba" directory doesn`t consist them.
If you tell me where i can find kernel and samba logs, it`ll be great!

Sorry for the delay in response.

Kernel log can be reviewed by issuing the command "dmesg" from an SSH prompt. It prints the content of the kernel ring-buffer log.

Logs for samba are sent to the system log in OpenWrt's default config, and the amount of logging depends on the value set in the smb.conf template. You'll find it in "/etc/samba/smb.conf.template". The setting you are looking for is called "syslog". If you set it to '10', samba should print pretty much everything to the log.

System log can be viewed with the "logread" command.

Thank you so much for the reply, but i already solved my problem. Solution was the simplest - i just replace my USB flash stick to another one. I don`t know what was causing a problem, and have not much time for discovering.
However, maybe this post with your information about logs will help anyone with same problems.
Thank you one more time!

The discussion might have continued from here.