"incorrect block count" happens repeatedly on My Book

Hello,

I’ve been using a WD My Book 8TB since I purchsed it in Sept 2020. Recently it seems to suffer repeatedly from what I assume is a file system error and I cannot solve the issue after several attempts. Any help and advice is greatly appreciated.

Use case

The My Book is formated into two HFS Plus unjournaled partitions and connected to a Raspberry Pi 4B running Raspberry Pi OS. The Pi use the My Book as external storage for three purposes:

  1. One partition is used exclusively as a networked Time Machine for my MacBook Pro.
  2. The other partition is used as a home media server. The media files are organized in folders and configured simply as an SMB share without any server part software installed on the Pi (e.g. Plex, Kodi, etc.)
  3. I also have the Bittorrent client Transmission running on the Pi 24/7. The files are stored on the same partition as the media files.

Issue description

I first noticed something was wrong when Transmission repeated reported issues of I/O error and write failed for some torrents. To pinpoint the issue, I used fsck to run diagnosis on the two My Book partitions. Here’s an sample output:

pi@raspberrypi:~ $ sudo fsck /dev/sda1
fsck from util-linux 2.33.1
** /dev/sda1
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
   Incorrect block count for file <filename A>
   (It should be 57414 instead of 59630)
   Incorrect block count for file <filename B>
   (It should be 210 instead of 245)
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
   Volume Bit Map needs minor repair
** Checking volume information.
   Invalid volume free block count
   (It should be 492372696 instead of 489229048)
** Repairing volume.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Pi Book was repaired successfully.

where <filename A>, <filename B>, etc. are specific files. Depending on the time I last ran fsck on the partition, the number of files with incorrect block count would vary accordingly, as if the corruption would accumulate after each fsck repair.

If I run fsck immediately again, no error would be reported. But if I leave the Pi and My Book alone for a couple days and run fsck again, the same issue would happen again, persistently.

I also noticed that so far, this issue has only occurred on one partition but not the other. Specifically, the partition for media files and Transmission would suffer from this but the Time Machine partition never has.

Failed attempts

  • I have used fsck on the problematic partition every several days for many times, each time only solving the issue temporarily.
  • I have tried disconnecting the My Book from the Pi and connecting it to my MacBook Pro so that I could use macOS Disk Utility for diagnosis. The results were similar: Disk Utility seemed to be able to detect and repair the incorrect block count error, but the issue would rise again after several days.

Additional info

This last section contains info that may or may not be relevant.

  • I used to connect the My Book to my MacBook Pro and never had any issue for ~7 months, until I purchased the Pi weeks ago and changed my setup drastically. I was unable to confirm the causality between the new Pi setup and the issue, since there’re too many hardware and software variables that could go wrong.

Hello,

We would recommend you run diagnostics on the drive WD Drive Utilities to determine the optimal health of the drive.

Please refer to the following KBA article: How to Install and Use WD Security and WD Drive Utilities Features

Hello @Logan.S ,

I used WD Drive Utilities on it and passed all three tests:

What should I do next in order to solve my issues?

Thank you for your kind help.

I also noticed today that sometimes copying & pasting doesn’t work reliably in the My Book.

I copied some video files from one directory to another (both belonging to My Book) and then used ffmpeg to check the integrity of those videos. The error logs showed that the source files were intact but the copies contain various corruptions.

I assume this is further evidence that the file system of the My Book contains error?

Hello @Logan.S ,

It’s been a week since running diagnostics using WD Drive Utilities and it still suffers from the issue numerous times a day, rendering the drive barely usable. I’d appreciate it if WD support could provide help in a more timely manner so that I can get rid of the frustration sooner.

Thank you in advance.

Hey Xurc,

I ran into a similar issue like yours on My Book 4TB. I had two partitions, one HFS+ (3TB), and the other was ExFat (1TB). After some time, I did notice that some I/O errors started to show on the HFS+, yet the exFat had no problems whatsoever.

The HFS+ was used primarily as my main drive for torrent related contents, such as movies, software, and whatnot. I noticed that the I/O issues started after downloading, then sharing Acrobat DC from an untrusted source. The partition started to basically give up within 3-4 weeks.

I was lucky enough to save the partition and data after running “HFS+ catalog rebuild” using DiskWarrior on Mojave. When I upgraded to Catalina, I used Disk Drill to perform the same task, since I couldn’t find an updated DiskWarrior. There is a way to rebuild the directory structure via macOS terminal, but it took forever and don’t believe it was effective compared to apps I mentioned.

Also, a talented user goes by the name klanomath on stack exchange has posted an incredibly detailed explanations on how to restore data from deleted partitions, convert HFS+ to other formats without data loss, and much more. He did truly save me on more than one occasion with HFS+ failures in the past. I hope you find a fix. Good luck

If your HFS partition is not functioning properly, then repair the partition immediately to avoid data loss. You can repair the partition using Disk Utility by following below steps:

  1. Open Disk Utility in your Mac system.
  2. Select the partition and click “First Aid” tab and then click “Run”.
  3. If Disk Utility can’t repair the partition, it suggests the next action course. For example, “Disk Utility fails to repair the startup disk. Backup as much data as possible and erase this drive.”

In such case, recover data from failing partition with help of data recovery software.

Further, you can also check the below link for more details on how to repair partition or how to recover data from corrupt partition:

Hope it helps!