我在装有 Debian 的树莓派上设置了一个 owncloud 服务器。作为大容量存储,我使用Intenso 500 GB USB 驱动器插入一个LogiLink USB 集线器因为 Raspberry pi 本身无法为 USB 驱动器供电。当我启动 Raspi 时,一切正常,它会开始同步我的文件,但大约 1 小时后,我收到以下错误:
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
提前感谢您的帮助!