raspberrypi / linux

Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
10.92k stars 4.91k forks source link

UNKNOWN(0x2003) SCSI Error #1287

Closed rickysarraf closed 7 years ago

rickysarraf commented 8 years ago

I've recently staretd seeing this error with my USB attached SATA 3.5" HDD. The device has been under use for more than a year. This error has been seen very recently. My guess, given the error code, and what I've understood from the conversation on debian-user [1], this could be a generic problem than being a hardware malfunction.

[62711.477903] sd 0:0:0:0: [sda] UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x00
[62711.485701] sd 0:0:0:0: [sda] CDB: opcode=0x28 28 00 9d 40 01 47 00 00 08 00
[62711.492910] blk_update_request: I/O error, dev sda, sector 2638217543
[84370.313684] sd 0:0:0:0: [sda] UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x00
[84370.321532] sd 0:0:0:0: [sda] CDB: opcode=0x28 28 00 a1 40 01 47 00 00 08 00
[84370.328721] blk_update_request: I/O error, dev sda, sector 2705326407
Reporting here hoping the latter.

I forgot to mention that I had also run a full fsck on the device, with no errors reported.

130 pi@pi:~$ sudo fsck -cvkv /dev/sdb1 
[sudo] password for pi: 
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
Checking for bad blocks (read-only test): done                                                 
SEAGATE: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

SEAGATE: ***** FILE SYSTEM WAS MODIFIED *****

       20013 inodes used (0.02%, out of 122101760)
        8944 non-contiguous files (44.7%)
          53 non-contiguous directories (0.3%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 16695/3216/62
   416471936 blocks used (85.28%, out of 488378008)
           0 bad blocks
          63 large files

       17086 regular files
        2885 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
          33 symbolic links (32 fast symbolic links)
           0 sockets
------------
       20004 files
1 pi@pi:~$ 

[1] https://lists.debian.org/debian-user/2016/02/msg00194.html

andrewufrank commented 3 years ago

I had exectly the same error msg - with a very different setup (odroid xu4 - armbian debian buster) and remembered having seen it before: it was caused by insufficient power supply (as suggested above by others). I changed the powersupply from 4A to 6A and the problem is gone. -- This mostly as a message to others!

cslev commented 6 months ago

While the thread's last comment is more than 3 years old, the problem still exists :) I am having a raspberry pi 4 enclosed in a Geekworm Naspi Gemini https://geekworm.com/collections/raspberry-pi/products/x882?_pos=4&_ss=r. While I have indeed two SSDs connected to the pi, I encounter this error also when writing/reading from only one of them. And because there are occasional writings/readings (e.g., media streams, downloads, nextcloud), I face this problem every day and only reboot helps. Power and heating are not issues for me either. I purposely use a 12V5A charger to provide sufficient power. A fan is also inside the case, and has never been above 55 C (I monitor it with Prometheus and Grafana). I believe that maybe the USB cable or the NASpi Gemini board causes the issue, but did not bother yet to open the case, and connect the disks by other means (e.g., powered USB SSD enclosure, other geekworm naspi products) before someone can confirm similar findings :)

andrewufrank commented 6 months ago

i have now several raspi4 running the debian raspi images from https://raspi.debian.net/tested-images/ and have no problems - but my power supply is 6A. I saw the issue when i had a 4A power supply. perhaps the 5A are not enough to deal with the spikes when writing. before anything else, I would put in a larger powersupply and change the usb cable!

cslev commented 6 months ago

I actually use a step-down converter which is precisely set to 5V from 12V. Since the charger can deliver 5A on 12V, after reducing the consumption to 5V only, I would not expect power issue. But you are right, I should give it a try...however, I find it quite difficult to get 5V charger with more than 4A support. Do you have any good source for buying something like yours?

pelwell commented 6 months ago

Be careful using chargers as power supplies - although they do the same job, the requirements for a charger are a bit more relaxed; a momentary loss of charging probably won't affect your device whereas a brief loss of power probably will.

cslev commented 6 months ago

oh sorry, i am using power supply, not a charger. Just usually interchange those words, but thanks for pointing this out :+1:

andrewufrank commented 6 months ago

my 5v6a power supply i bought for another cpu. it is meanwell sga60e05 and then have a converter from barel connector to usb. i see it still on offer for $28 (I hope I paid less five years ago, I bought several!). it worked well with the odroid-xu4 and now with the raspi4. @pelwell Thank you for the hint. I had naively assumed they would be to the same specs.

andrewufrank commented 6 months ago

I remember that I have troubles if added two hard drives (the second with its own power supply, the first is a regular 2.5" 3TB drive). I never investigated what was the cause; there were simpler ways to make a backup.

cslev commented 6 months ago

I use one harddrive for media, and the other one for nextcloud. But I will merge them into the same drive and use only a USB enclosure with external power instead of buying the whole gemini board. Or maybe just buy a smaller board with a single SATA slot. Thanks for the comments, though