Thursday, February 15, 2018 [Tweets] [Favorites]

Data Loss on APFS Sparse Disk Images

Mike Bombich (Hacker News):

Earlier this week I noticed that an APFS-formatted sparsebundle disk image volume showed ample free space, despite that the underlying disk was completely full. Curious, I copied a video file to the disk image volume to see what would happen. The whole file copied without error! I opened the file, verified that the video played back start to finish, checksummed the file – as far as I could tell, the file was intact and whole on the disk image. When I unmounted and remounted the disk image, however, the video was corrupted.

[…]

Following the earlier example, suppose you attempt to copy 200GB of data to that 500GB disk image file. This shouldn’t be possible, because there was only 100GB of free space left on the underlying disk. The APFS disk image reports that there’s 500GB of free space available, though, so what the heck, let’s do this! The first 100GB of data does successfully get written into the disk image file – the disk image file has grown now to 100GB. But now the underlying disk is completely full, and the disk image file can no longer grow – the diskimages-helper application is getting “No space left on device” errors when trying to write data to its band files.

But diskimages-helper simply ignores these errors.

Update (2018-02-17): See also: Thomas Claburn.

kbumsik:

These are not even complex problems of the new format. It is just Apple forgot to have basic checks. It is like the root access with an empty password incident happened 2 months ago. Why these serious but basic problems happen?

Update (2018-02-19): See also: MacRumors.

5 Comments

Since there is a lot of focus on "Apple fixing bugs" right now, it seems worth noting that this is as big a bug as I can remember them shipping. I mean, am I wrong? Data loss is a bit of a show stopper...

Can.. can I just take a step back and ask the community here for a moment to consider how we'd answer the following question:

How bad would macOS have to get for you to leave the platform?

Where "leave" means "I no longer use macOS as my primary/day-to-day work OS" and/or "I will no longer develop apps for macOS". I don't want this question to be seen as antagonistic... I am just curious about what we think examples of breaking points might be.

@remmah, I don't know yet where the breaking point is, but it's said I would've never asked such question 3-20 years ago but now it lurks around more and more often. Even scarier question to me is: which OS would you use in case you "leave" macOS.

I left a few years ago. It started around 2011 for me. Then I was completely switched over in my personal use and immediate family use (the systems I have to support) by 2015. I just gave up. Lion was awful on my older Macs and I was capped at that point. Since Linux ran well, why replace working hardware for low use email/web/photo organization works just fine?

I started my migration in seriousness in late 2012.

In other words, if you are starting to question the platform now, I give you a year until you start hedging your platform use, perhaps a Linux box here or a Windows box there....if things seem to work well enough the transition will take a few years to complete. In my experience anyway. Your mileage may vary.

Honestly, I don't know many people who are so heavily indebted to the Apple way to switch overnight. It's usually a process. Good luck!

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment