我在帶有 debian 的樹莓派上設定了自己的雲端伺服器。作為大容量存儲,我使用Intenso 500 GB USB 隨身碟它被插入一個LogiLink USB 集線器因為 Raspberry pi 無法為 USB 隨身碟本身供電。當我啟動 Raspi 時,一切正常,它將開始同步我的文件,但大約過了 10 分鐘。 1h 我收到以下錯誤:
Data directory (/media/usb1/owncloud/data) not writable by ownCloud
Permissions can usually be fixed by giving the webserver write access to the ownCloud directory
當我嘗試透過 ssh 存取驅動器時,我得到
pi@raspberrypi ~ $ ls /media/usb1
ls: reading directory /media/usb1: Input/output error
我是否以 root 身分嘗試它並不重要。
我查看了我的系統日誌,發現它之前多次安裝和卸載驅動器
Dec 22 13:13:51 thecabbage kernel: [ 2.610218] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
Dec 22 13:13:51 thecabbage kernel: [ 2.618633] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Dec 22 13:13:51 thecabbage kernel: [ 2.628570] hub 1-1:1.0: USB hub found
Dec 22 13:13:51 thecabbage kernel: [ 2.634990] hub 1-1:1.0: 3 ports detected
Dec 22 13:13:51 thecabbage kernel: [ 2.919641] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
Dec 22 13:13:51 thecabbage kernel: [ 3.039878] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Dec 22 13:13:51 thecabbage kernel: [ 3.048428] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Dec 22 13:13:51 thecabbage kernel: [ 3.062073] smsc95xx v1.0.4
Dec 22 13:13:51 thecabbage kernel: [ 3.125592] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:b3:7a:73
Dec 22 13:13:51 thecabbage kernel: [ 3.249669] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
Dec 22 13:13:51 thecabbage kernel: [ 3.381573] usb 1-1.2: New USB device found, idVendor=05e3, idProduct=0608
Dec 22 13:13:51 thecabbage kernel: [ 3.396388] usb 1-1.2: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Dec 22 13:13:51 thecabbage kernel: [ 3.410539] usb 1-1.2: Product: USB2.0 Hub
Dec 22 13:13:51 thecabbage kernel: [ 3.422131] hub 1-1.2:1.0: USB hub found
Dec 22 13:13:51 thecabbage kernel: [ 3.430220] hub 1-1.2:1.0: 4 ports detected
Dec 22 13:13:51 thecabbage kernel: [ 3.719824] usb 1-1.2.1: new high-speed USB device number 5 using dwc_otg
Dec 22 13:13:51 thecabbage kernel: [ 3.841101] usb 1-1.2.1: New USB device found, idVendor=13fd, idProduct=1840
Dec 22 13:13:51 thecabbage kernel: [ 3.859642] usb 1-1.2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Dec 22 13:13:51 thecabbage kernel: [ 3.871457] usb 1-1.2.1: Product: USB 2.0 Drive
Dec 22 13:13:51 thecabbage kernel: [ 3.877793] usb 1-1.2.1: Manufacturer: PI-239
Dec 22 13:13:51 thecabbage kernel: [ 3.884178] usb 1-1.2.1: SerialNumber: 533252594A39434431313731
Dec 22 13:13:51 thecabbage kernel: [ 3.892819] usb-storage 1-1.2.1:1.0: USB Mass Storage device detected
Dec 22 13:13:51 thecabbage kernel: [ 3.901643] scsi0 : usb-storage 1-1.2.1:1.0
Dec 22 13:13:51 thecabbage kernel: [ 4.900648] scsi 0:0:0:0: Direct-Access PI-239 USB 2.0 Drive 1.08 PQ: 0 ANSI: 4
Dec 22 13:13:51 thecabbage kernel: [ 4.933311] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
Dec 22 13:13:51 thecabbage kernel: [ 4.963305] sd 0:0:0:0: [sda] Write Protect is off
Dec 22 13:13:51 thecabbage kernel: [ 4.989392] sd 0:0:0:0: [sda] Mode Sense: 23 00 00 00
Dec 22 13:13:51 thecabbage kernel: [ 4.990187] sd 0:0:0:0: [sda] No Caching mode page found
Dec 22 13:13:51 thecabbage kernel: [ 4.997069] sd 0:0:0:0: [sda] Assuming drive cache: write through
Dec 22 13:13:51 thecabbage kernel: [ 5.035068] sd 0:0:0:0: [sda] No Caching mode page found
Dec 22 13:13:51 thecabbage kernel: [ 5.059342] sd 0:0:0:0: [sda] Assuming drive cache: write through
Dec 22 13:13:51 thecabbage kernel: [ 5.089366] sda: sda1
Dec 22 13:13:51 thecabbage kernel: [ 5.096949] sd 0:0:0:0: [sda] No Caching mode page found
Dec 22 13:13:51 thecabbage kernel: [ 5.113466] sd 0:0:0:0: [sda] Assuming drive cache: write through
Dec 22 13:13:51 thecabbage kernel: [ 5.140575] sd 0:0:0:0: [sda] Attached SCSI disk
Dec 22 13:13:51 thecabbage kernel: [ 6.302336] bcm2708-i2s bcm2708-i2s.0: Failed to create debugfs directory
Dec 22 13:13:51 thecabbage kernel: [ 15.139041] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Dec 22 13:13:51 thecabbage kernel: [ 15.627170] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Dec 22 13:13:51 thecabbage kernel: [ 24.054213] EXT4-fs (sda1): recovery complete
Dec 22 13:13:51 thecabbage kernel: [ 24.063171] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
但當時它仍然有效。大約1小時後出現以下錯誤:
Dec 22 14:33:12 thecabbage kernel: [ 470.843026] usb 1-1.2: USB disconnect, device number 4
Dec 22 14:33:12 thecabbage kernel: [ 470.843063] usb 1-1.2.1: USB disconnect, device number 5
Dec 22 14:33:12 thecabbage kernel: [ 470.853453] Buffer I/O error on device sda1, logical block 38034432
Dec 22 14:33:12 thecabbage kernel: [ 470.853499] Buffer I/O error on device sda1, logical block 38034433
Dec 22 14:33:12 thecabbage kernel: [ 470.853519] Buffer I/O error on device sda1, logical block 38034434
Dec 22 14:33:12 thecabbage kernel: [ 470.853535] Buffer I/O error on device sda1, logical block 38034435
Dec 22 14:33:12 thecabbage kernel: [ 470.853551] Buffer I/O error on device sda1, logical block 38034436
Dec 22 14:33:12 thecabbage kernel: [ 470.853567] Buffer I/O error on device sda1, logical block 38034437
Dec 22 14:33:12 thecabbage kernel: [ 470.853583] Buffer I/O error on device sda1, logical block 38034438
Dec 22 14:33:12 thecabbage kernel: [ 470.853599] Buffer I/O error on device sda1, logical block 38034439
Dec 22 14:33:12 thecabbage kernel: [ 470.853614] Buffer I/O error on device sda1, logical block 38034440
Dec 22 14:33:12 thecabbage kernel: [ 470.853632] Buffer I/O error on device sda1, logical block 38034441
Dec 22 14:33:12 thecabbage kernel: [ 470.853648] Buffer I/O error on device sda1, logical block 38034442
Dec 22 14:33:12 thecabbage kernel: [ 470.853665] Buffer I/O error on device sda1, logical block 38034443
Dec 22 14:33:12 thecabbage kernel: [ 470.853681] Buffer I/O error on device sda1, logical block 38034444
Dec 22 14:33:12 thecabbage kernel: [ 470.853698] Buffer I/O error on device sda1, logical block 38034445
Dec 22 14:33:12 thecabbage kernel: [ 470.853713] Buffer I/O error on device sda1, logical block 38034446
Dec 22 14:33:12 thecabbage kernel: [ 470.853729] Buffer I/O error on device sda1, logical block 38034447
Dec 22 14:33:12 thecabbage kernel: [ 470.853746] Buffer I/O error on device sda1, logical block 38034448q
有人知道什麼可能導致此錯誤嗎?我懷疑是 USB 集線器和電源管理,但我不知道如何檢查。也許硬碟有缺陷?根據/etc/fstab掛載
UUID=915a8f36-5c7d-40e3-a451-a3babb0fa610 /media/usb1 ext4 defaults 0 0
先感謝您的幫忙!