Reading Errors from a DIR-860L used as a DLNA Server

Hi

I am using openwrt on a D-Link DIR-860L as a DLNA Server.
After some trouble setting it up all was working fine.
But during testing I often needed to restart the Device so that it was not running very long, which now seems to be a problem.

After a few days some files can not be opened and the Media-Player says file is corrupted. The File was working before, so its not that.
Also the Disk (a SSD Drive in an external case connected via USB 3.0) is fine. When I do a restart it works again.
So its not the disk, not the file, must be the Device or Software.

When I access the Files using the samba network share it seems to be slow. Reading the files is sometimes possible and sometimes not.
When its possible its always slow and with transfer errors (that is why the media player could not play it anymore).

Here is a list of packages that were installed in addition to
the packages originally included:
opkg install minidlna
opkg install luci-app-minidlna
opkg install samba36-server
opkg install luci-app-samba
opkg install kmod-usb-storage
opkg install mc
opkg install ntfs-3g
opkg install e2fsprogs
opkg install kmod-fs-ext4
opkg install f2fs-tools
opkg install kmod-fs-f2fs

If somebody has an Idea I would be happy :slight_smile:
Thanks
Nico

Please provide logfiles

  1. after fresh boot
  2. when the error occurs

Hello

I just found something that could related:
Whenever I access the usb disk while it is sleeping (the usb case sends the sata ssd drive to sleep after 1 minute of inactivity) the following line appears in the log
usb 2-1: reset SuperSpeed USB device number 2 using xhci-mtk
this seems normal and happens only when the device is woken.

Sometimes when I do access the (sleeping) usb device and access data or even write data instantly then another log-line appears showing problems:
[ 1070.035054] EXT4-fs error (device sda1): __ext4_new_inode:1120: comm smbd: failed to insert inode 22020103: doubly allocated?
This is the writing error line.
The writing itself is not done when this happens and the filesystem is showing errors after that too.
The line can also be something like "error accessing directory /sda1/test" - in that case the directory is shown empty until reboot.
After reboot its all good again.

This second line that tells the problem usually is only 0.8sec after the first line. So I'm not sure if that time is enough for the drive to respond directly from sleep (even though its an ssd drive). I was using this usb case and sdd before without openwrt on a DIR-645 and never had this problem.

So how do I tell the openwrt to give the drive a little more time in case of an error ? (Before anybody suggests that I use a different usb case and send the drive to sleep using any openwrt command - that is not working - I tried it allready - thats why I use it this way).

Thankful for any suggestions
Nico

  • Does the same happen when you do not send the SSD to sleep?
  • Is there anything forcing you to send the SSD to sleep, e.g. limited power supply on a solar panel driven system in wintertime?

I assume not. I guess it would be not necessary to try it, because without this sleeping the drive just continues to run. It would make no difference if the next access happens seconds, minutes, hours or days later.
Only when the drive is in sleep it makes a difference because then it has to wake up which might need 1 or 2 seconds to respond.

Since the sleeping saves about 90% of power yes it is very usefull.
If I could I would use a different case and handle the sleeping directly in openwrt, but that never worked no matter what I tried. Its difficult because the USB-Case needs to support that option to send it to the SATA drive. You can not send SATA commands when the SATA Drive is connected through USB. I could not find a proper USB-Case that could do that.

Today I watched a Video and paused it for more than 1 minute (so the drive went to sleep, usually I do not do that, but today I wanted to know if it works). When I came back and continued the error occured the same way. The disk could not wake up fast enough, so the openwrt thought there was a problem and could not deliver the data. The video had some errors. Rewinding it showed the same errors over and over again (Cache). But later I restarted it and went fast forward to the same position and then it was perfectly ok.

So I assume it would help to somehow tell the openwrt to wait a little longer for the response of the drive. But I am not sure if that is possible ?

Greetings
Nico

Summary:
Kingston SATA-USB Case with Firmware TB08 not useable
Kingston SATA-USB Case with Firmware V1.08 is useable

The Kingston USB Case with Firmware TB08 has Build-in Power Saving Feature which completely turns off the SATA Drive after 1 Minute of inactivity. This saves a maximum amount of Power (less than 0,05A remain) but is not 100% compatible with the openwrt.

The Kingston USB Case with Firmware V1.08 does not have this feature and seems to be 100% compatible with openwrt.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.