2006-07-09 Bad Blocks on an External Drive

Damn. I dropped my 60GB external disk, which I use for all my audio needs. In a way I was lucky, having made a backup yesterday. But still: I know I cannot read some of the blocks on disk, now, but I don’t know how to exclude from being used. This used to be simple with the ext2 filesystem. What’s up with HFS+, now? How can I can mark the bad blocks such that they won’t be used? How can I do it on an external harddisk? It seems that OSX doesn’t come with a tool to do it. This is ridiculous! Suckage, big time.

When I partition the disc and create a UFS partition instead of HFS+, there is some formatting that takes place. Maybe my best bet in the short term is UFS. Weird.

By now I have switched to an UFS for the external harddisk. Thus:

Alpinobombus:~ alex$ fsck -y /dev/disk1s3


CANNOT READ: BLK 4083368
CONTINUE? yes

THE FOLLOWING DISK SECTORS COULD NOT BE READ: 4083377,

CANNOT READ: BLK 4084264
CONTINUE? yes

...

I hope it marks them as bad blocks, too! 🙂

Just like e2fsck calls badblocks to do the job.

The drive is definitely no longer usable:

Jul 11 12:12:10 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5
Jul 11 12:12:10 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5
Jul 11 12:12:10 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5
Jul 11 12:12:40 Pyrobombus kernel[0]: disk1s3: I/O error.
Jul 11 12:12:46 Pyrobombus kernel[0]: disk1s3: I/O error.
Jul 11 12:13:13 Pyrobombus kernel[0]: disk1s3: I/O error.
Jul 11 12:13:13 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5
Jul 11 12:13:40 Pyrobombus kernel[0]: disk1s3: I/O error.
Jul 11 12:13:53 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5
Jul 11 12:14:04 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5
Jul 11 12:14:04 Pyrobombus kernel[0]: jnl: flushing fs disk buffer returned 0x5

Perhaps fsck doesn’t mark bad blocks – or the disk is getting worse.

More info: Unix File System (UFS), HFS Plus (HFS+).

Unix File System

HFS Plus

​#mac ​#gadgets