Live data from Hacker News

MacOS may lose data on APFS-formatted disk images

bombich.com

11–20 of 193 posts

Re: MacOS may lose data on APFS-formatted disk images

#14
The same behavior (the sparse bundle disk image not updating the free space amount in accordance with the underlying disk’s free space) is present if one selects ExFAT as format in Disk Utility.

I haven’t tested if file corruption is the consequence, too, of copying more data into the disk image than the underlying disk has free space.

Re: MacOS may lose data on APFS-formatted disk images

#15
Is the incident with the matching checksum that he mentions because APFS only checksum metadata (which are on preallocated space on the image), or is it his own checksum (say sha1sum), I wonder? It seems strange that the filesystem driver would cache 500 GB of sequentially written data in RAM.

Re: MacOS may lose data on APFS-formatted disk images

#16

Yes, fairly limited impact, but still. Data loss is fucking important. We aren't talking about an occasional stutter when moving windows or a sound driver that sometimes needs a reboot to resume working. This is a major bug. I would really really like it if Apple would get their shit together so that people who actually rely on their computers to work correctly can upgrade at some point.

As a counterpoint, APFS was deployed to almost a billion devices over the span of several months when it was release and, IIRC, this is the first major issue.

Re: MacOS may lose data on APFS-formatted disk images

#17

Yes, fairly limited impact, but still. Data loss is fucking important. We aren't talking about an occasional stutter when moving windows or a sound driver that sometimes needs a reboot to resume working. This is a major bug. I would really really like it if Apple would get their shit together so that people who actually rely on their computers to work correctly can upgrade at some point.

As a counterpoint, APFS was deployed to almost a billion devices over the span of several months when it was release and, IIRC, this is the first major issue.

There was the password vs password hint thing.

Re: MacOS may lose data on APFS-formatted disk images

#18

so why exactly does somebody backup into a image with variable size, when they could just dd together a fixed size image that makes these free space calculations unnecessary?

I use a sparse bundle disk image, i.e. a disk image with variable size and consisting of multiple files under the hood, because it is more efficient to back up over a network. Instead of uploading a 50 GB file to a cloud storage on every backup, only a fraction of data has to be uploaded (the sparse bundle’s changed files) which makes backing up the 50 GB file very fast if only a few megabytes were added.

If anyone is curious: I use restic[1] as backup client and Backblaze B2[2] as backup storage. Works well with sparse bundles.

[1] https://restic.net

[2] https://www.backblaze.com/b2/cloud-storage.html

Re: MacOS may lose data on APFS-formatted disk images

#19

so why exactly does somebody backup into a image with variable size, when they could just dd together a fixed size image that makes these free space calculations unnecessary?

I doubt I'd hit the bug described, but when I do a "clean install" I often create an encrypted sparse disk image onto a network volume and a copy on the Desktop of my new install. Unrelated, I do my bootable backup as a "smart backup" (only copy changes) to a usb-disk. I can see myself doing that to a sparse image on the network.

As I set up my new computer I'll move stuff or delete things out of the sparse disk image from my Desktop, then periodically reclaim space.

I only do this every 5+ years or so. I haven't done this with APFS, yet either. But those are a few of my use cases that dd wouldn't cover.

Re: MacOS may lose data on APFS-formatted disk images

#20
I upgraded my hackintosh to High Sierra with APFS. The next day, I accidentally switched off the machine while it was in the _process_ of shutting down (the screen had gone blank, but casing still emitting lights).

Next time I turned it on, I couldn't get past login screen (giving me forever beach ball).

I put the ssd inside my old MBP as slave to recover data.

The ssd was corrupted, most data gone, as in shown in Finder but couldn't be copied.

I googled for solutions, but it seems I'm the first to experience this.

Post reply on HN