redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

USB attached SSD not working properly [SOLVED]

Sun Sep 30, 2018 12:46 pm

I am using Raspberry Pi 2B. I am trying to attach a 120 GB WD Green SSD disk over a SATA-USB adapter.

OS: Rasbpian Lite, latest release, fully updated. Firmware updated.

I have been using the same Pi for years now and the attached USB flash drives worked without problems.

The SSD disk is recognised and I can format it as EXT4 without problems. I can mount it (manually or in fstab) and it mounts as expected.
mount shows it mounted as rw

However, when I try to write anything to the disk, even only with touch, the filesystem is immediately changed to ro

The disk and adapter are both completely new and I can see no issues when plugged to a PC via the same adapter (SMART data look OK, reading and writing works without problems).

I tried adding max_usb_current=1 to /boot/config.txt, but the problem is the same. The adaptor powering the Pi is marked as 5V 2A.

Any help would be greatly appreciated.

The system log output is as follows:



when mounting the partition:

Code: Select all

Sep 30 11:48:42 raspberrypi kernel: [ 4136.654904] JBD2: Clearing recovery information on journal
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661396] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661419] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661434] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661453] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 01 04 08 00 00 00 08 00
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661465] print_req_error: critical target error, dev sda, sector 17041408
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661478] Buffer I/O error on dev sda1, logical block 2129920, lost sync page write
Sep 30 11:48:42 raspberrypi kernel: [ 4136.661532] JBD2: Error -5 detected when updating journal superblock for sda1-8.
Sep 30 11:48:42 raspberrypi kernel: [ 4136.663599] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Sep 30 11:48:42 raspberrypi kernel: [ 4136.663618] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
Sep 30 11:48:42 raspberrypi kernel: [ 4136.663632] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
Sep 30 11:48:42 raspberrypi kernel: [ 4136.663648] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 00 00 08 00 00 00 08 00
Sep 30 11:48:42 raspberrypi kernel: [ 4136.663659] print_req_error: critical target error, dev sda, sector 2048
Sep 30 11:48:42 raspberrypi kernel: [ 4136.663671] Buffer I/O error on dev sda1, logical block 0, lost sync page write
Sep 30 11:48:42 raspberrypi kernel: [ 4136.670183] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)


when trying to write to the mounted partition (with “touch”):

Code: Select all

Sep 30 11:48:49 raspberrypi kernel: [ 4143.591651] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Sep 30 11:48:49 raspberrypi kernel: [ 4143.591704] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
Sep 30 11:48:49 raspberrypi kernel: [ 4143.591724] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
Sep 30 11:48:49 raspberrypi kernel: [ 4143.591749] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 01 04 08 18 00 00 08 00
Sep 30 11:48:49 raspberrypi kernel: [ 4143.591766] print_req_error: critical target error, dev sda, sector 17041432
Sep 30 11:48:49 raspberrypi kernel: [ 4143.591792] print_req_error: critical target error, dev sda, sector 17041432
Sep 30 11:48:49 raspberrypi kernel: [ 4143.592107] Aborting journal on device sda1-8.
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593104] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593128] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593142] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593159] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 01 04 08 00 00 00 08 00
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593172] print_req_error: critical target error, dev sda, sector 17041408
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593186] Buffer I/O error on dev sda1, logical block 2129920, lost sync page write
Sep 30 11:48:49 raspberrypi kernel: [ 4143.593256] JBD2: Error -5 detected when updating journal superblock for sda1-8.
Sep 30 11:48:50 raspberrypi kernel: [ 4144.316144] EXT4-fs (sda1): previous I/O error to superblock detected
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317146] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317166] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317180] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317198] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 00 00 08 00 00 00 08 00
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317209] print_req_error: critical target error, dev sda, sector 2048
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317223] Buffer I/O error on dev sda1, logical block 0, lost sync page write
Sep 30 11:48:50 raspberrypi kernel: [ 4144.317495] EXT4-fs error (device sda1): ext4_journal_check_start:61: Detected aborted journal
Sep 30 11:48:50 raspberrypi kernel: [ 4144.333462] EXT4-fs (sda1): Remounting filesystem read-only
Sep 30 11:48:50 raspberrypi kernel: [ 4144.342752] EXT4-fs (sda1): previous I/O error to superblock detected
Sep 30 11:48:50 raspberrypi kernel: [ 4144.343736] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
Sep 30 11:48:50 raspberrypi kernel: [ 4144.343757] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
Sep 30 11:48:50 raspberrypi kernel: [ 4144.343771] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
Sep 30 11:48:50 raspberrypi kernel: [ 4144.343790] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 00 00 08 00 00 00 08 00
Sep 30 11:48:50 raspberrypi kernel: [ 4144.343801] print_req_error: critical target error, dev sda, sector 2048
Sep 30 11:48:50 raspberrypi kernel: [ 4144.343814] Buffer I/O error on dev sda1, logical block 0, lost sync page write
Last edited by redpine on Sat Oct 06, 2018 6:01 pm, edited 1 time in total.

User avatar
davidcoton
Posts: 3944
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: USB attached SSD not working properly

Sun Sep 30, 2018 2:33 pm

I'm guessing a bit, but it looks like a power problem. 2A is probably not enough for the Pi and SSD, try powering the SSD separately.
Signature retired

redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

Re: USB attached SSD not working properly

Sun Sep 30, 2018 4:07 pm

Thanks!
Would a Pi 3 run better?

I expected it to work, because I've read many people saying they are running SSDs without a problem, WD Green disks are supposed to be low-power (max 2200 mW, say the specification) and I have nothing else plugged into any other USB input.

Andyroo
Posts: 3775
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: USB attached SSD not working properly

Sun Sep 30, 2018 4:16 pm

redpine wrote:
Sun Sep 30, 2018 4:07 pm
Thanks!
Would a Pi 3 run better?

I expected it to work, because I've read many people saying they are running SSDs without a problem, WD Green disks are supposed to be low-power (max 2200 mW, say the specification) and I have nothing else plugged into any other USB input.
Thats only around 0.5 amps - it may be worth putting the drive in post boot.

I had a similar issue where I needed to give rights to the user to the /dev/xxx with SUDO CHMOD to get a stick to work. No idea why but it worked. I'll see if I can find any scribbles in my book (do not hold your breath).
Need Pi spray - these things are breeding in my house...

k-pi
Posts: 921
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: USB attached SSD not working properly

Sun Sep 30, 2018 6:30 pm

Your disk should work OK once your RPi has booted, try plugging it in after it is up & running.
You may also be able to boot from your SDHC card, & have it use the drive for it's main system.
(I think you add it to your /etc/fstab as the /, there are many topics about this, so just do a search.)

LTolledo
Posts: 1649
Joined: Sat Mar 17, 2018 7:29 am

Re: USB attached SSD not working properly

Mon Oct 01, 2018 3:15 am

If the USB-SSD will not be used as boot drive then as suggested better to connected at post boot.

Another point of interest will be the type of chipset used by the SATA to USB adaptor cable.
to check this run the command

Code: Select all

lsusb
and as pointed out by HawaiianPi on a different (but related) post, its a combination of chipset and firmware that determines if the USB-SSD/HDD is seen at boot or not.

adapters with ASM1153 Chipsets are usually RPi friendly (based on my experience/use).

and of course there is also the power requirement, as the USB-SSD draw a little bit more power, your PSU must be able to supply the sudden surge required to power the USB-SSD. Thus its always better to use a PSU (note: not any phone charger/fast charger) with a rating a bit higher than the RPF recommended specs.

if the USB-SSD (or USB-HDD, USB thumdrive) is not specified to be mounted via fstab, it will usually be automatically mounted under /media/pi
just make sure the permissions and ownership are set properly.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

W. H. Heydt
Posts: 10589
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: USB attached SSD not working properly

Mon Oct 01, 2018 5:21 am

davidcoton wrote:
Sun Sep 30, 2018 2:33 pm
I'm guessing a bit, but it looks like a power problem. 2A is probably not enough for the Pi and SSD, try powering the SSD separately.
Unlikely. An SSD like that should draw only about 300mA when fully active and almost nothing when idle.

redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

Re: USB attached SSD not working properly

Mon Oct 01, 2018 6:20 am

Thanks to everybody! I will look at the chipset as suggested when I'm back at the computer later today.
I will also try to connect the disk post boot. I didn't try it yet because I got the impression that it's a bad idea from the forum posts claiming this can cause a power surge which results in a Pi reboot.
Thats only around 0.5 amps - it may be worth putting the drive in post boot.
its a combination of chipset and firmware that determines if the USB-SSD/HDD is seen at boot or not
Strangely enough, the disk is detected normally at boot. I copied the whole filesystem from SD card to SSD (on a PC) and then changed the file on the SD boot partition and fstab on SSD - and the system booted without hiccups from the otherwise problematic SSD. If something was very wrong with communication between the Pi and SSD I would expect the boot process to fail, right?

User avatar
HawaiianPi
Posts: 4456
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: USB attached SSD not working properly

Mon Oct 01, 2018 10:18 am

redpine wrote:
Sun Sep 30, 2018 12:46 pm
I am using Raspberry Pi 2B.
Version 1.1 or 1.2?

I am trying to attach a 120 GB WD Green SSD disk over a SATA-USB adapter.
Which SATA USB adapter (product link)?

OS: Rasbpian Lite, latest release, fully updated. Firmware updated.
If you ran rpi-update you installed the possibly unstable testing firmware.

I tried adding max_usb_current=1 to /boot/config.txt, but the problem is the same.
That setting is default now. However, if your Pi2B is the older version 1.1, the higher USB current won't take effect until the system boots and loads the firmware, so if you are booting from the drive your USB current may be low at the start of the boot process.

The adaptor powering the Pi is marked as 5V 2A.
Is it a power supply or a phone charger?

And does it have a built-in micro USB power cord, or does it use a separate USB cable?

Some phone chargers have poor voltage regulation, and standard micro USB cables often won't pass more than 500mA of current without voltage loss. I have a 5V, 2.4A phone charger that dips well below 5V at only a 1A load (with a good USB cable). It still charges my phone fine, but it's a lousy Pi power supply.

Grab the latest Raspbian Stretch image from: https://www.raspberrypi.org/downloads/raspbian/
Grab the Etcher image writing software from : https://etcher.io/

Use Etcher to write the Raspbian image directly from the .zip download to the SSD (don't extract the image first). If you have any trouble writing or verifying the image, check the SHA256 hash sum against the one published on the download page.

If it writes and verifies correctly, safely eject the drive and try to boot your Pi from it. If you have the older Pi2Bv1.1, or have not set the OTP USB boot bit on the v1.2, then you will need to use a FAT32 formatted micro SD card with just the "bootcode.bin" file on it (you can copy the bootcode.bin file from the imaged USB drive, or download it from https://github.com/raspberrypi/firmware/ ... /bootcode.bin).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

Re: USB attached SSD not working properly

Mon Oct 01, 2018 5:25 pm

OK, I'll try to systematically go through all the suggestions and questions.

Thats only around 0.5 amps - it may be worth putting the drive in post boot.
Your disk should work OK once your RPi has booted, try plugging it in after it is up & running.
Tried it now, same problem.

Another point of interest will be the type of chipset used by the SATA to USB adaptor cable.
Which SATA USB adapter (product link)?
This is the full lsusb output:

Code: Select all

Bus 001 Device 004: ID 152d:0567 JMicron Technology Corp. / JMicron USA Technology Corp. JMS567 SATA 6Gb/s bridge
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
https://www.amazon.co.uk/ewent-Adaptor- ... B01CI2CBJ0
Ewent Adapter USB 3.0 to SATA za 2.5" SSD/HDD

Version 1.1 or 1.2?

Code: Select all

Revision        : a01041

If you ran rpi-update you installed the possibly unstable testing firmware.
I hade the same problem before updating (I was testing whether the update would solve it and it didn't).

Is it a power supply or a phone charger?
It is a PSU. I just tested another one I hot my hands on (same specs, different manufacturer), same result.

Use Etcher to write the Raspbian image directly from the .zip download to the SSD (don't extract the image first).
I tried both copying the filesystem from SD to SSD and directly writing it to SSD as suggested. In both cases Pi was able to boot normally from SSD, however the SSD itself was read-only after booting.

pws
Posts: 89
Joined: Mon Apr 11, 2016 4:16 pm

Re: USB attached SSD not working properly

Mon Oct 01, 2018 7:31 pm

redpine wrote:
Mon Oct 01, 2018 5:25 pm

"It is a PSU. I just tested another one I hot my hands on (same specs, different manufacturer), same result."

Does that not suggest that you might try a power supply with MORE capability? I would try one capable of providing at least 2.5 or 3.0AMPS.

redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

Re: USB attached SSD not working properly

Thu Oct 04, 2018 8:41 pm

An update to this topic.

I got the newest Pi (3+), official 2.5A PSU, installed Raspbian Lite.

Exactly the same problem, SSD disk is not working correctly.

I guess this rules out everything but the SATA2USB adapter. Can that be working incorrectly with the Pi (and without problems on the PC with Bodhi Linux)?

Code: Select all

[  833.154225] EXT4-fs error (device sda1): ext4_journal_check_start:61: Detected aborted journal
[  833.157397] EXT4-fs (sda1): Remounting filesystem read-only
[  833.159061] EXT4-fs (sda1): previous I/O error to superblock detected
[  833.159855] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[  833.159870] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x5 [current]
[  833.159881] sd 0:0:0:0: [sda] tag#0 ASC=0x24 ASCQ=0x0
[  833.159896] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 08 00 00 08 00 00 00 08 00
[  833.159905] print_req_error: critical target error, dev sda, sector 2048
[  833.159917] Buffer I/O error on dev sda1, logical block 0, lost sync page write

User avatar
HawaiianPi
Posts: 4456
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: USB attached SSD not working properly

Fri Oct 05, 2018 9:26 am

redpine wrote:
Thu Oct 04, 2018 8:41 pm
...
Can that be working incorrectly with the Pi (and without problems on the PC with Bodhi Linux)?
Yes, but this is the first time I've heard of that particular error. Usually the problem is that the system will not boot, or it will cold boot but not reboot. Read-only file system is a new one to me. It may be the USB adapter, or it may be the SSD, or it may be the combination of both.

Have you tried writing Raspbian to an SD card, booting from the card and testing the SSD as a storage device only?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

LTolledo
Posts: 1649
Joined: Sat Mar 17, 2018 7:29 am

Re: USB attached SSD not working properly

Fri Oct 05, 2018 9:50 am

Well the only thing left (as you mentioned as well) is the SATA to USB adaptor cable.... better start searching for another one.

but do try what HawaiianPi suggested just to check if the SATA to USB adaptor + SSD will be recognized as "USB drive" on a microSD booted Pi.
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

Re: USB attached SSD not working properly

Fri Oct 05, 2018 12:57 pm

Have you tried writing Raspbian to an SD card, booting from the card and testing the SSD as a storage device only?
I have - both having the SSD plugged during boot and plugging it into an already running Pi. It is recognised, but immediately throws out errors and at the first attempt to write something on it is turned read-only.
The weird thing is that it can be formatted on Pi without problems, new partitions made, formatted to EXT4 and everything. And the SSD+adapter work great on PC.

So if it is adapter, it has to be adapter+Pi combination that's the problem. I'll try to find a new adapter and report the result.

User avatar
HawaiianPi
Posts: 4456
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: USB attached SSD not working properly

Fri Oct 05, 2018 5:28 pm

redpine wrote:
Fri Oct 05, 2018 12:57 pm
So if it is adapter, it has to be adapter+Pi combination that's the problem. I'll try to find a new adapter and report the result.
See this post for SATA adapters that have worked well for me.
https://www.raspberrypi.org/forums/view ... 0#p1372790
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

redpine
Posts: 10
Joined: Fri Nov 08, 2013 9:51 am

Re: USB attached SSD not working properly [SOLVED]

Sat Oct 06, 2018 6:00 pm

First of all a big thanks to everybody who offered their suggestions and help!

In case of someone else having a similar problem, the reason for it was indeed the SATA adapter (listed above). I replaced it with a new one (an enclosure, actually): LC-25U3B-Elektra (LC-POWER).

Works on Pi perfectly (3B+, original 2.5 A PSU, I didn't test the older model).

Return to “Troubleshooting”