Since a few days back I have been having problem with my external SSD-drive connected to my Rpi5 with DietPi. I’m using the drive as a backup drive to which i sync several folders from my desktop-PC over SFTP. This has worked fine for over a year but recently i started having problems.
While transferring over SFTP the transmission stops after a few minutes. Soon I receive an error message in my software (FreeFileSync) stating “Cannot write file location and file name LIBSSH2_ERROR_TIMEOUT: Operation timed out after 10 seconds. [libssh2_sftp_open]”
I’ve tried changing drives, cables and so on but it does not help. I have tried with the same drive etc. on my RPi4 running the same version of DietPi and it does not have any problems.
When I try to open dietpi-drive_manager nothing happens and I receive no error message.
After i reboot the Rpi5 and try to start dietpi-drive_manager it’s still unresponsive. I then have to run sudo nano /etc/fstab and remove the line for the drive, save and then reboot. Then I can start Dietpi-drive_manager again but the drive is not visible. My only course of action is to remove the drive and reformat it on my desktop.
I have searched the existing open and closed issues
Required Information
- DietPi version | 9.11.2
- Distro version | Bookworm
- Kernel version | 6.6.74+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux
- Architecture | arm64
- SBC model | Rpi5
- Power supply used | Raspberry pi 5 original 27w
- SD card used | Kingston SDCG3/128GB
- External drive used | Samsung 870 EVO 2TB EXT4 GPT UASP
Additional Information (if applicable)
- Software title | SFTP using openssh
- Was the software title installed freshly or updated/migrated? Fresh
- Can this issue be replicated on a fresh installation of DietPi? Not on my other Pi (4).
Steps to reproduce
- Start tranfer of files over SFTP to my mounted external drive.
Expected behaviour
The file transfer over SFTP should continue and complete.
Actual behaviour
- After a few minutes the tranfer stops and the external drive is unresponsive.
as soon as this happen, can you check for kernel error logs
dmesg -l 0,1,2,3
[ 529.161560] I/O error, dev sda, sector 38855879 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161586] I/O error, dev sda, sector 38856903 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161590] sd 0:0:0:0: rejecting I/O to offline device
[ 529.161599] I/O error, dev sda, sector 38663719 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161609] I/O error, dev sda, sector 38664743 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161619] I/O error, dev sda, sector 38665767 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161620] I/O error, dev sda, sector 38858951 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161629] I/O error, dev sda, sector 38666791 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161637] I/O error, dev sda, sector 38667815 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161644] I/O error, dev sda, sector 38668839 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161651] I/O error, dev sda, sector 38860999 op 0x1:(WRITE) flags 0x4000 phys_seg 32 prio class 2
[ 529.161668] Buffer I/O error on device sda1, logical block 4824773
[ 529.161673] Buffer I/O error on device sda1, logical block 4824774
[ 529.161675] Buffer I/O error on device sda1, logical block 4824775
[ 529.161682] Buffer I/O error on device sda1, logical block 4824776
[ 529.161690] Buffer I/O error on device sda1, logical block 4824777
[ 529.161695] Buffer I/O error on device sda1, logical block 4824778
[ 529.161699] Buffer I/O error on device sda1, logical block 4824779
[ 529.161702] Buffer I/O error on device sda1, logical block 4824780
[ 529.161706] Buffer I/O error on device sda1, logical block 4824781
[ 529.161710] Buffer I/O error on device sda1, logical block 4824782
[ 529.163583] Aborting journal on device sda1-8.
[ 529.163607] Buffer I/O error on dev sda1, logical block 243826688, lost sync page write
[ 529.163620] JBD2: I/O error when updating journal superblock for sda1-8.
[ 529.163726] EXT4-fs (sda1): ext4_do_writepages: jbd2_start: 256 pages, ino 19665486; err -30
[ 529.163744] EXT4-fs error (device sda1): ext4_journal_check_start:84: comm kworker/u12:1: Detected aborted journal
[ 529.163763] Buffer I/O error on dev sda1, logical block 0, lost sync page write
[ 529.163866] EXT4-fs (sda1): I/O error while writing superblock
[ 529.163872] EXT4-fs (sda1): Remounting filesystem read-only
[ 529.163876] EXT4-fs (sda1): ext4_do_writepages: jbd2_start: 256 pages, ino 19665487; err -30
[ 540.845366] usb 2-1: device not accepting address 3, error -62
[ 551.853366] usb 2-1: device not accepting address 4, error -62
[ 564.397370] usb 2-1: device not accepting address 6, error -62
[ 575.405369] usb 2-1: device not accepting address 7, error -62
there you go, quite some I/O errors. How is the SSD connected? Using USB? If yes, is it powered by an external PSU?
The SSD is connected to one of the RPi5 USB3-ports. No external PSU. The Enclosure is this one: Cable Matters Aluminum 10Gbps USB C Hard Drive Enclosure for 2.5 inch SSD/HDD
I have three of the same enclosure and the same drive (Samsung 870 EVO 2TB SATA). The two others work just fine on my RPi4 running DietPi. They used to work fine with my Rpi5 also but recently i encoutered this problem. So the hardware is the same as before.
hmm so far we know such a behavior from the RPI4. normally there are problems if hard disks are only operated via USB, as the USB ports of the RPI4 are not designed for this. It is therefore recommended to always use powered USB hubs or similar on a RPI4.
On the RPi5 it could possibly have something to do with the power settings. Maybe @MichaIng can help on this.
Ok, I tried switching out my enclosure to the SSD for a SATA to USB adapter with external power: Startech USB312SAT3. When using this I never experienced any problem during the SFTP transfer. It completed in 3 hours as usual (when starting with an empty drive) and no errors. I guess some update to the Pi5 (maybe kernel or firmware-related?) in the last few weeks increased the power usage of the device and as a consequence it was not able to provide the necessary additional power over USB to the external drive anymore, therefore the need of an external power source. My speculation.
That sounds similar to how RPi4 behaves. But on RPi4 it’s a technical limitation of the USB ports.
Theoretically you could try playing around with voltage settings on your RPi5 to see if this changes something.
Ok, I have not tried changing voltage on RPi5 before. Do you have any suggestions regarding which setting i should adjust in this case? If I understand it correctly it’s either one of these three strings i should modify (I have not changed any frequency settings):
over_voltage_min
over_voltage_delta
over_voltage
On the Raspberry Pi 5 (and 4), if you want to reduce the voltage a bit to save power, use the over_voltage_delta
setting. It keeps the dynamic voltage adjustment active, but lowers the base value. Use e.g. -25000
to reduce base voltage by 25,000 microvolts. The over_voltage
and over_voltage_min
were the old settings, to set idle (min) and active voltage values, but those disable dynamic voltage adjustment on RPi 4 and 5.
See also here, though the over_voltage_min
is actually falsely described there: https://www.raspberrypi.com/documentation/computers/config_txt.html#overclocking-options
EDIT: Ah, I should have read the context of the question. So if you system has stability problems, indeed try to raise the value instead. E.g. over_voltage_delta=50000
to raise it by 50,000 microvolts = 50 milivolts.
Thank you for the reply! I will play around with over_voltage_delta
this weekend and hopefully find a “sweet spot” for stability.