0

I got a WD large drive, 4T with USB enclosure (powered by a dedicated AC adapter). I formatted it in my laptop (Ubuntu 12.04) as a single ext4 file system without any partition.

mkfs.ext4 /dev/sdb

something like this command line, anyway, it works fine in my Ubuntu. Then I mounted the drive on my raspberry PI (version 1). The whole disk is mounted without any warning and I published the volume with Samba. When I was testing the disk by playing a movie that was copied to the disk, the video stopped on the first several minutes, no more than 5 minutes.

What could be the reason that makes the file system un-stable?

Please ask me if you need any more detail to diagnose. Thanks!

I reproduced the problem today, and compared the system-log between before and after, shown as below. Also compared the dmesg output.

--- system-1.log    2015-03-25 21:46:13.561099557 +0800
+++ system-3.log    2015-03-25 22:12:00.807178794 +0800
@@ -930,3 +930,52 @@
 Mar 25 21:44:05 raspberrypi ntpd[2452]: restrict: error in address '::1' on line 42. Ignoring...
 Mar 25 21:45:01 raspberrypi /USR/SBIN/CRON[2519]: (pi) CMD (   date >> /home/pi/.local/heart-beat.log)
 Mar 25 21:45:14 raspberrypi kernel: [  112.544267] EXT4-fs (sdb): mounted filesystem with ordered data mode. Opts: (null)
+Mar 25 21:50:01 raspberrypi /USR/SBIN/CRON[2556]: (pi) CMD (   date >> /home/pi/.local/heart-beat.log)
+Mar 25 21:55:01 raspberrypi /USR/SBIN/CRON[2561]: (pi) CMD (   date >> /home/pi/.local/heart-beat.log)
+Mar 25 22:00:01 raspberrypi /USR/SBIN/CRON[2578]: (pi) CMD (   date >> /home/pi/.local/heart-beat.log)
+Mar 25 22:03:48 raspberrypi rpc.mountd[2154]: Caught signal 15, un-registering and exiting.
+Mar 25 22:03:48 raspberrypi kernel: [ 1226.725949] nfsd: last server has exited, flushing export cache
+Mar 25 22:03:51 raspberrypi kernel: [ 1228.973047] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
+Mar 25 22:03:51 raspberrypi kernel: [ 1228.973182] NFSD: starting 90-second grace period (net c05f7c50)
+Mar 25 22:03:51 raspberrypi rpc.mountd[2709]: Version 1.2.6 starting
+Mar 25 22:04:51 raspberrypi rpc.mountd[2709]: authenticated mount request from 192.168.1.253:42416 for /mnt/disk (/mnt/disk)
+Mar 25 22:05:01 raspberrypi /USR/SBIN/CRON[2728]: (pi) CMD (   date >> /home/pi/.local/heart-beat.log)
+Mar 25 22:07:41 raspberrypi kernel: [ 1459.866541] usb 1-1.3.3: USB disconnect, device number 6
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.202113] sd 1:0:0:0: Device offlined - not ready after error recovery
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213123] sd 1:0:0:0: [sdb] Unhandled error code
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213160] sd 1:0:0:0: [sdb]
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213173] Result: hostbyte=0x01 driverbyte=0x00
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213187] sd 1:0:0:0: [sdb] CDB:
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213196] cdb[0]=0x88: 88 00 00 00 00 00 00 25 62 18 00 00 00 f0 00 00
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213252] end_request: I/O error, dev sdb, sector 2449944
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213659] sd 1:0:0:0: [sdb] Unhandled error code
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213682] sd 1:0:0:0: [sdb]
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213693] Result: hostbyte=0x01 driverbyte=0x00
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213706] sd 1:0:0:0: [sdb] CDB:
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213718] cdb[0]=0x88: 88 00 00 00 00 00 00 25 63 08 00 00 00 f0 00 00
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.213764] end_request: I/O error, dev sdb, sector 2450184
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.228280] Aborting journal on device sdb-8.
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.228355] JBD2: Error -5 detected when updating journal superblock for sdb-8.
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.228424] journal commit I/O error
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.522003] usb 1-1.3.3: new high-speed USB device number 7 using dwc_otg
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.623395] usb 1-1.3.3: New USB device found, idVendor=2537, idProduct=1066
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.623429] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.623445] usb 1-1.3.3: Product: HE-G130(NS1066 2.45)
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.623459] usb 1-1.3.3: Manufacturer: SSK
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.623474] usb 1-1.3.3: SerialNumber: 0123456789ABE79
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.630003] usb-storage 1-1.3.3:1.0: USB Mass Storage device detected
+Mar 25 22:07:47 raspberrypi kernel: [ 1465.635440] scsi2 : usb-storage 1-1.3.3:1.0
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.162303] scsi 2:0:0:0: Direct-Access     ATA      WDC WD40EZRX-22S 0A80 PQ: 0 ANSI: 6
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.165920] sd 2:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.166410] sd 2:0:0:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.166433] sd 2:0:0:0: [sdc] 4096-byte physical blocks
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.167085] sd 2:0:0:0: [sdc] Write Protect is off
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.167119] sd 2:0:0:0: [sdc] Mode Sense: 43 00 00 00
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.167798] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.170227] sd 2:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.195672]  sdc: unknown partition table
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.197268] sd 2:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.199044] sd 2:0:0:0: [sdc] Attached SCSI disk
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.657898] sd 0:0:0:0: Attached scsi generic sg0 type 0
+Mar 25 22:07:49 raspberrypi kernel: [ 1467.658640] sd 2:0:0:0: Attached scsi generic sg1 type 0
+Mar 25 22:10:01 raspberrypi /USR/SBIN/CRON[2761]: (pi) CMD (   date >> /home/pi/.local/heart-beat.log)

---------- dmesg.diff ----

--- dmesg.log   2015-03-25 21:47:28.608906645 +0800
+++ dmesg-2.log 2015-03-25 22:19:53.323958529 +0800
@@ -245,3 +245,44 @@
 [   35.093166] NFSD: starting 90-second grace period (net c05f7c50)
 [   37.453304] Adding 102396k swap on /var/swap.  Priority:-2 extents:3 across:106492k FS
 [  112.544267] EXT4-fs (sdb): mounted filesystem with ordered data mode. Opts: (null)
+[ 1226.725949] nfsd: last server has exited, flushing export cache
+[ 1228.973047] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
+[ 1228.973182] NFSD: starting 90-second grace period (net c05f7c50)
+[ 1459.866541] usb 1-1.3.3: USB disconnect, device number 6
+[ 1465.202113] sd 1:0:0:0: Device offlined - not ready after error recovery
+[ 1465.213123] sd 1:0:0:0: [sdb] Unhandled error code
+[ 1465.213160] sd 1:0:0:0: [sdb]
+[ 1465.213173] Result: hostbyte=0x01 driverbyte=0x00
+[ 1465.213187] sd 1:0:0:0: [sdb] CDB:
+[ 1465.213196] cdb[0]=0x88: 88 00 00 00 00 00 00 25 62 18 00 00 00 f0 00 00
+[ 1465.213252] end_request: I/O error, dev sdb, sector 2449944
+[ 1465.213659] sd 1:0:0:0: [sdb] Unhandled error code
+[ 1465.213682] sd 1:0:0:0: [sdb]
+[ 1465.213693] Result: hostbyte=0x01 driverbyte=0x00
+[ 1465.213706] sd 1:0:0:0: [sdb] CDB:
+[ 1465.213718] cdb[0]=0x88: 88 00 00 00 00 00 00 25 63 08 00 00 00 f0 00 00
+[ 1465.213764] end_request: I/O error, dev sdb, sector 2450184
+[ 1465.228280] Aborting journal on device sdb-8.
+[ 1465.228355] JBD2: Error -5 detected when updating journal superblock for sdb-8.
+[ 1465.228424] journal commit I/O error
+[ 1465.522003] usb 1-1.3.3: new high-speed USB device number 7 using dwc_otg
+[ 1465.623395] usb 1-1.3.3: New USB device found, idVendor=2537, idProduct=1066
+[ 1465.623429] usb 1-1.3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+[ 1465.623445] usb 1-1.3.3: Product: HE-G130(NS1066 2.45)
+[ 1465.623459] usb 1-1.3.3: Manufacturer: SSK
+[ 1465.623474] usb 1-1.3.3: SerialNumber: 0123456789ABE79
+[ 1465.630003] usb-storage 1-1.3.3:1.0: USB Mass Storage device detected
+[ 1465.635440] scsi2 : usb-storage 1-1.3.3:1.0
+[ 1467.162303] scsi 2:0:0:0: Direct-Access     ATA      WDC WD40EZRX-22S 0A80 PQ: 0 ANSI: 6
+[ 1467.165920] sd 2:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
+[ 1467.166410] sd 2:0:0:0: [sdc] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
+[ 1467.166433] sd 2:0:0:0: [sdc] 4096-byte physical blocks
+[ 1467.167085] sd 2:0:0:0: [sdc] Write Protect is off
+[ 1467.167119] sd 2:0:0:0: [sdc] Mode Sense: 43 00 00 00
+[ 1467.167798] sd 2:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
+[ 1467.170227] sd 2:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
+[ 1467.195672]  sdc: unknown partition table
+[ 1467.197268] sd 2:0:0:0: [sdc] Very big device. Trying to use READ CAPACITY(16).
+[ 1467.199044] sd 2:0:0:0: [sdc] Attached SCSI disk
+[ 1467.657898] sd 0:0:0:0: Attached scsi generic sg0 type 0
+[ 1467.658640] sd 2:0:0:0: Attached scsi generic sg1 type 0

I also saw some error message in the console:

Message from syslogd@raspberrypi at Mar 25 22:07:47 ...
kernel:[ 1465.228424] journal commit I/O error

Does this mean the journal recording makes the trouble?

5
  • Now, the only thing I know and could try is to create a partition table.
    – Chandler
    Commented Mar 23, 2015 at 7:48
  • 3
    How are you powering the Drive? Commented Mar 23, 2015 at 9:21
  • The USB HDD enclosure has a dedicated power supply, I believe it is powerful enough.
    – Chandler
    Commented Mar 24, 2015 at 10:45
  • 1
    Are you seeing any error messages relating to the drive in the logs? less /var/log/syslog (arrows to move, Q to quit)
    – bobstro
    Commented Mar 24, 2015 at 12:11
  • I paste my system log and dmesg into the post. I am sorry, I did not find anything un-usual.
    – Chandler
    Commented Mar 25, 2015 at 14:26

1 Answer 1

1
  1. Can you make sure that the problem lies with the drive and mounting itself?

    • Did you try SCP/SFTP'ing large files to and from the drive?
    • Does the drive crash any other time. What happens when it crashes?
    • After it crashes, can you access the drive immediately or after sometime / do you have to mount/unmount it again?
    • Have you tried connecting the drive via a powered USB hub?
    • Have you noticed any power fluctuations / power related warnings?
  2. Can you make sure the problem is with the file system? Have you tried mounting the drive as NTFS-3g?

  3. Have you tried other drives of different brands, specification , size or file system? I see I/O errors in the log. I had I/O problems with an old Sony drive myself, so I'm using a newer Seagate 500 GB drive with a powered USB hub and NTFS-3g file system.

Why you're probably having problems with large drives

The problem might be happening due to sector / cluster size allocation. Use latest Raspbian image. It could also result from an incompatible HDD enclosure. Try OpenELEC/Raspbmc and check if you have problems with those distributions.

4
  • * I have just tried the SFTP and found the same problem, the drive crashed after downloading 10% of a 400MB file.
    – Chandler
    Commented Apr 19, 2015 at 8:44
  • I have just tried the SFTP and found the same problem, the drive crashed after downloading 10% of a 400MB file. So, I believe the drive always crashes when reading/writing. No, I cannot use it anymore until I reboot my raspberry PI. Cannot mount/umount. Power, already using a dedicated power supply + a powered USB hub. No, power related warning was noticed. The file system is Ext4. I don't think a NTFS-3g would be better, do you mean I should format my drive again with NTFS? Yes, I am using another 160GM drive at the same time. The smaller one works well for several months already.
    – Chandler
    Commented Apr 19, 2015 at 8:50
  • This does seem to be a H/W incompatibility issue. I suggest you try another HDD. Had the same trouble with an older Sony HDD myself but no problems with a newer Seagate 500 GB HDD. I have successfully used upto 1 TB HDD's so I can assure you that a new Seagate/ WD/ Hitachi HDD (<= 1 TB) should work just fine. I have heard of people who use 2 TB drives successfully too, but never of 4 TB drives with the RPi. Good Luck. Commented Apr 19, 2015 at 13:16
  • HW problem? I would try to mount it in a 64 bit Linux and check it with sFTP/SMB.
    – Chandler
    Commented Apr 20, 2015 at 2:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.