"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: http://support-en.wd.com/app/answers/detail/a_id/13880/

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?